Skip to main content

What is a policy?

A policy is a set of rules that govern what an agent can do. Every agent has exactly one active policy at a time. When a transaction is validated, the policy engine evaluates it against these fields in sequential order. You configure policies through the Policy Builder in the dashboard or via the POST /api/agents/{agentId}/policies endpoint. New agents receive a default policy after claiming: 100pertransactionlimit,100 per-transaction limit, 1,000 daily limit, risk scanning enabled, and no address restrictions.

Policy schema

Spend limits

Spend limits use a reservation system. When an intent is validated, the amount is reserved against the budget. Reservations are released when intents fail, expire, or are rejected. They convert to permanent spend records when confirmed on-chain.

Address controls

Set allowed_addresses to restrict where funds can go. This is the strongest protection against prompt injection attacks that attempt to redirect transfers to attacker-controlled addresses.

Action controls

Approval rules

EVM transaction limits (raw validation only)

Schedule

The days array uses ISO day numbers: 1 (Monday) through 7 (Sunday). The hours array lists allowed hours in 24-hour UTC format. Both arrays must be present in the schedule object.

Guard rules

See Write MANDATE.md for best practices on writing guard rules.

System fields

Example policy

A production-ready policy for a trading agent:
This policy allows swaps and transfers up to 250each,250 each, 5,000/day, 50,000/month.Bridgesrequireapproval.Betsareblocked.Transactionsabove50,000/month. Bridges require approval. Bets are blocked. Transactions above 1,000 require approval. Only the Base USDC contract is allowed. Trading hours: weekdays 8am-8pm UTC.

Next Steps

Policy Builder

Configure policies visually in the dashboard.

Write MANDATE.md

Author guard rules for nuanced policy enforcement.

Policy Engine Concepts

How the 14-check pipeline evaluates transactions against your policy.