● Layer 1 — Basic · covers 95% of needs
Quick start — built-in templates
Your agents / roles / players
▲ Layer 3 — Expert · direct Python expressions
For parameter relationships, output validation, complex conditions.
invariant — input constraints
# Evaluated against call parameters — all must hold
invariant=["amount > 0", "amount <= budget"]
invariant=["price * qty <= notional_limit"]
invariant=["withdrawal <= available_balance"]
optional_invariant — conditional
# Only checked when the parameter is present in the call
optional_invariant=["price >= cost * 1.1"]
postcondition — output validation
# Checked against the function return value ("result")
postcondition=["result.get('status') == 'ok'"]