Documentation
DocsUsing withHumanApproval pipelines

Conditions

Choose which requests a branch, a Delegate block or an escalation path step applies to.

Updated Oct 6, 2026

A condition picks out the requests a rule applies to. You write conditions in three places:

Each condition has a field, an operator and, where needed, a value to compare it with.

Fields

The field picker includes Tool name, MCP server, Agent slug, Agent name and fields from the tool's arguments. Tool names are the names servers define, so the same tool matches whichever runtime called it; use MCP server to tell apart tools that share a name across servers. Suggestions come from requests, the tool catalogue and your test sample. On the hosted edition, the MCP server field also lists every server registered on the Gateway page by its slug, with the server's name beside it, so you can gate a server before any agent has called it. Nested argument fields use dotted names, such as customer.email.

Choose an operator that fits the field's type. A numeric comparison needs a number; a text comparison needs text. Text comparisons are case-sensitive. The operator list shows the available choices.

Example: A $500 refund limit

Our organization should deny USD refunds over $500, regardless of which agent sends them. In the entry pipeline, we'll add a branch named Deny refunds over $500 with these conditions in its When.

FieldOperatorValue
Tool nameequalsissue_refund
currencyequalsUSD
amountgreater than500

We'll use All so every condition must match, and put an Outcome block that denies the refund inside the branch. A $600 USD refund enters the branch and is denied; a $75 refund skips it. Other tools and currencies also skip it because they don't match.

Our tool sends amounts in dollars. A tool that sends cents would need a different comparison value.

Condition groups

All requires every condition in a group to match. Any requires at least one. Groups can contain other groups, so one part of a rule can offer alternatives while the rest remains required.

Example: Alternative refund reasons

Suppose we only want to approve small refunds for duplicate charges or missing items. We'll give a branch named Approve small refunds this grouping in its When.

  • All: the tool is issue_refund, the currency is USD and the amount is at most 20.
  • Within that group, Any: the reason is duplicate_charge or item_not_received.

Inside the branch, an Outcome block approves the refund. Either reason is enough, but the tool, currency and amount checks still apply.

A branch's When combining an All group for USD refunds up to $20 with an Any group of refund reasons
Our Any group allows either refund reason while All keeps the other checks in place. Select any screenshot to view it full size.

Testing conditions

Test request, in the pipeline's action menu, shows whether a sample matched each branch and Delegate block. A branch the sample matches lights the line into its blocks; one it skips is dimmed.

Changing one field at a time helps show which condition affects the result. If a condition reports an error, check the field's type and the operator it uses.

Example: A nested refund rule

Our $10 USD refund with reason duplicate_charge should enter Approve small refunds and be approved. We'll then change the reason to changed_mind, the amount to $75 or the currency to EUR, one change at a time. Each variant should skip the branch instead.

A test showing the $10 duplicate-charge refund entering the Approve small refunds branch and being approved
Our $10 duplicate-charge refund matches the branch's conditions.

Once the rule behaves as intended, it can be saved and activated.

Operator list

These are the operators available in the visual editor. Check the field's actual type and value when choosing a comparison.

OperatorWhat it checks
equalsThe field equals the value, including its type.
does not equalThe field is present and differs from the value.
is one ofA text field equals one of the listed text values.
is not one ofA text field equals none of the listed text values.
less thanA number is below the value.
at mostA number is at or below the value.
greater thanA number is above the value.
at leastA number is at or above the value.
containsText contains the supplied text, or a list contains that item.
does not containText doesn't contain the supplied text, or a list doesn't contain that item.
contains any ofText contains at least one supplied substring, or a list contains at least one supplied item.
contains all ofText contains every supplied substring, or a list contains every supplied item.
starts withText starts with at least one of the listed prefixes.
ends withText ends with the supplied suffix.
matches regexText matches the supplied regular expression.
is trueA boolean field is true.
is falseA boolean field is false.
is emptyA list has no items.
is not emptyA list has at least one item.
existsThe field is present, including when its value is null.
does not existThe field is missing.
is nullThe field is present with a null value.
is not nullThe field is present with a value other than null.

For a missing field, only does not exist matches. Missing isn't the same as null or an empty list. If a field has the wrong type for an operator, such as text in a numeric comparison, evaluation can fail. In a branch or Delegate block, that sends the request to human review instead of skipping it.