Router node

The Router node branches the flow. It evaluates conditions that live on its outgoing edges and follows exactly one matching branch.
How it works
- The Router receives a payload.
- Each outgoing edge carries a condition (path, operator, value).
- The first edge whose condition matches is taken.
- If none match, the unconditional/default edge is taken.
- If there is no matching edge and no default, the run fails with a graph error.
Conditions
Conditions are configured in the edge inspector. Available operators:
| Operator | Meaning |
|---|---|
eq / neq | equals / not equals (coerced) |
gt / gte | greater than / or equal |
lt / lte | less than / or equal |
contains | string contains |
startsWith | string prefix |
endsWith | string suffix |
regex | matches a regular expression |
The path is a dot-path into the payload, e.g. label or outputs.agent.label.
Example — route on a classification
An Agent outputs { "label": "refund", "confidence": 0.9 }. Wire it into a
Router with two edges:
- Edge A:
labeleq"refund"→ a Refund HTTP Request node. - Edge B:
labeleq"support"→ a Support Agent node. - Edge C (no condition): fallback → an Output node.
Notes
- Numeric comparisons (
gt/lt) coerce strings to numbers first, so"10"compares as10, not lexicographically. - Exactly one branch runs per execution — a Router never fans out.
Related
- Agent — structured output that a Router can branch on.
- HTTP Request — a common branch target.
- Use cases — a complete lead-scoring flow built on a Router.