if compares two values and runs its then chain or its else chain. It is
the only branching operation, and it is terminal: nothing may follow it, and the
branch it takes is where the tool ends.
Config
then and else sit on the operation, beside config. Both are optional; a
missing branch does nothing.
Operators
There is no
gte, lte, substring or regex operator. For >=, use lt and
swap the branches. For anything richer, compute the answer in a
code operation and branch on what it published.
How values compare
eqis case-sensitive:"Gold"is not"gold"."5"equals5.- Compare a boolean against a JSON boolean,
"right": true. The string"true"never matches a boolean. The dashboard’siffields are plain text, so a tool edited there should publish strings such as"open"and compare against those. gtandltfail the operation when either side is not a number, with`gt` needs two numbers, and cannot compare '7:26 PM' with '09:00'. They do not fall through toelse.{{system_vars.time}}(7:26 PM) and{{system_vars.date}}(Wednesday, 19 August 2026) are for speaking, not comparing. Do time logic in acodeoperation; see business hours.existsis the test for “did a value come back”. A missing value does noteqan empty string.
on_error: "continue" on an if means that when the comparison fails, neither
branch runs and the tool ends there.
Nesting
A third path is a secondif as the only operation in a branch. This refund
check requires a status and a window:
silent, so the tool is silent
and each branch speaks for itself. For the early-exit shape, see
guard, then continue.
Next
The operation tree
Terminal operations,
on_error and derived silence.Handoff operation
Routing to another agent from a branch.