Skip to content

If Edge

Routes to the next node only when a condition evaluates to true.

When to use

  • Confidence thresholds, keyword checks, tool/API success.
  • Guardrails before calling sensitive actions.
  • Multi-branch routing (use multiple If edges in order).

Evaluation order

  • If multiple If edges exist from the same node, they are checked top to bottom.
  • The first condition that returns true wins; later Ifs are skipped.
  • If none match and there's an Else edge, the Else is taken;

Condition examples (copy-paste)

Intentions Branching

{{ state['nodes']['Model']['output']['intent'] == 'escalate_to_human' }}