Operators
Built-in comparison operators
Comparison Operators
#equals(value)— Exact match (case-insensitive for strings)#contains(value)— String or array contains value#matches(regex)— Regex pattern match#one_of(a,b,c)or#in(a,b,c)— Value in comma-separated list
Numeric Operators
#greater_than(n)or#gt(n)#less_than(n)or#lt(n)#greater_than_or_equal(n)or#gte(n)#less_than_or_equal(n)or#lte(n)
Existence Operators
#exists— Variable is defined and not empty#not_existsor#doesnt_exist— Variable is undefined, null, empty string, empty array, or empty object
AI Operators
#ai_gate(question)— LLM evaluates a yes/no question about the variable
Example: Order Support Agent
order-support.echo
You are a support agent handling order inquiries.
[#IF {{user.role}} #one_of(admin,support_lead)]
**Agent Powers:** You can issue refunds up to $500 and override shipping policies.
[END IF]
[#IF {{order.status}} #equals(shipped)]
The order has shipped. Tracking: {{order.tracking_number}}
[END IF]
[#IF {{order.total}} #gt(100)]
This is a high-value order. Prioritize resolution and consider goodwill gestures.
[END IF]
[#IF {{customer.notes}} #exists]
**Previous notes about this customer:**
{{customer.notes}}
[END IF]Example: Using #not_exists
not-exists.echo
[#IF {{user.preferences}} #not_exists]
No preferences found. Using default settings.
[END IF]