Skip to main content
A draft is generated, the workflow pauses to ask the operator to approve it, and only then does the publisher run. This is the canonical human-in-the-loop pattern: an autonomous pipeline with one explicit gate where a human decides whether to continue.

What it demonstrates

  • The human node type
  • Resolving {{ draft.output }} inside the prompt shown to the operator
  • A when: edge that only routes to publish if the human answered "yes"
  • timeout + on_timeout: use_default so an unattended workflow doesn’t hang forever

Run it

The CLI will print the draft, then block on stdin. Type yes to publish or no to reject.

Workflow

docs/cookbook/content-approval/workflow.yaml
human nodes consume no LLM tokens. They block on stdin (or any caller-supplied input function), and the operator’s response is written to the workflow context just like an agent’s output — so downstream when: conditions, prompt interpolation, and writes paths all work identically.

Timeout semantics

Setting on_timeout: use_default with default_output: "no" (as above) makes the workflow fail-closed: an unattended pipeline never auto-publishes.

Graph

Next steps

Budget Guarded

Cap a workflow’s total spend with the budget: block.

Conditional Pipeline

Route to different handlers based on an LLM classification.