agenthub · if
Route on a single comparison. It reads a value, compares it, and forwards the data out either the true or the false branch.
Why the node earns its place
The branch primitive. It is deliberately domain-agnostic: nothing in it knows about members, phones or tickets, so any workflow that needs to fork composes it rather than baking a branch into a domain node.
It is also a router in the strict sense — it fires exactly one outgoing branch and prunes the other. And because each branch carries the input data through, you wire the branch straight into the next node; there is no separate data edge to run alongside it.
How it works at run time
left input, then left_context_key from run context, then the left dotted path into data, then a bare-key fallback so a simple wiring just works.normalize is set, element-wise across lists.eval anywhere in this node.What you wire
Configuration
| Key | Type | Default & options | What it does |
|---|---|---|---|
| left | string | — | Left operand as a dotted path into `data` (e.g. 'result.body.total'). Overridden by a wired `left` input or left_context_key. When the `left` input IS wired, this path navigates within that wired value. |
| left_context_key | string | — | Read the left operand from run context instead of data (e.g. 'phone' for the caller's number). Wins over `left`. |
| operator * | string | default "truthy" truthy · falsy · exists · absent · eq · ne · gt · gte · lt · lte · contains · not_contains · in · not_in | Comparison. truthy/falsy/exists/absent are unary. contains: left (a list/string) holds right. in: left is a member of right (right is a list/string). |
| right | string | — | Literal right operand (fallback). Numeric strings compare numerically. Overridden by right_path / right_context_key. |
| right_path | string | — | Dotted path for the right operand — point at a LIST (e.g. 'values' from Extract List). Applies within a wired `right` input if present, else into `data`. Wins over the `right` literal. |
| right_context_key | string | — | Read the right operand from run context. Wins over right_path and the literal. |
| normalize | string | default "none" none · trim · lower · phone10 | Normalize BOTH operands before comparing (element-wise for a list). phone10 = last 10 digits, so a raw +91… caller phone matches a phone10-normalized list. |
What usually goes wrong
Watch for this
Do not re-converge both branches onto one node that waits for several inputs. One input never arrives, the fan-in never releases, and the run finishes with that step silently skipped and no error raised. If both branches must reach the same next step, use two copies of it, or restructure so the join happens after a non-routing node.
For phone comparisons set normalize to phone10. A raw +91… caller number never equals a roster cell stored as ten digits, and the branch silently takes the false path forever.
Behaviour & provenance