403 POLICY_VIOLATION with a specific reason code.
Policy shape
Read a policy
Update a policy
Evaluate a policy before attempting
Before an agent tries to spend, it can dry-run policy evaluation:Rule types
Global limits
Hard caps on total spending per transaction, day, month. Always enforced regardless of merchant.Merchant rules
Allow- or block-list specific merchants or merchant categories. First matching rule wins. Fall-through behavior configurable (default_action: allow or block).
Velocity rules
Rate-limit transactions: “at most N in window W”. Useful for abuse prevention.Time rules
Permit spending only during defined windows. Outside the window →POLICY_VIOLATION.
Approval threshold
Any transaction overamount doesn’t execute directly — it creates an approval request that a human (with approver_role) must confirm. See approval workflows.
Kill-switch
Named humans can instantly freeze the wallet (POST /v1/agent-wallets/:id/freeze). Policy includes who they are and how to reach them, so incident response doesn’t require Sly support involvement.
Freeze and unfreeze
- Freeze — spending blocked, auth still works (agent can still read, observe, coordinate)
- Revoke — auth blocked (agent cannot authenticate at all)
Exposures (projected spending)
For scenario planning:Endpoints
| Endpoint | Purpose |
|---|---|
GET /v1/agent-wallets/:id/policy | Read policy |
POST /v1/agent-wallets/:id/policy | Update policy |
POST /v1/agent-wallets/:id/evaluate-policy | Dry-run evaluation |
POST /v1/agent-wallets/:id/freeze | Freeze spending |
POST /v1/agent-wallets/:id/unfreeze | Resume spending |
GET /v1/agent-wallets/:id/evaluations | Audit log of past evaluations |
GET /v1/agent-wallets/:id/exposures | Projected future spend |
