What it demonstrates
- Conditional edges with
when:expressions - Writing to a nested
working.*path (working.triage.intent) - Safe expression evaluation — only
workingandoutputare in scope - Branching without duplicating agent definitions
Run it
Workflow
docs/cookbook/conditional-pipeline/workflow.yaml
How branching works
Aftertriage writes its one-word label to working.triage.intent, the executor evaluates both outgoing when: expressions. Only the matching node runs. If neither expression matches (e.g. the LLM returns an unexpected label), both nodes are skipped and output.reply is never written.
Graph
Next steps
Adversarial Pair
Two agents take opposing sides; a judge scores the debate.
YAML Reference
Full edge and when: expression syntax.