@abstraxn/agent-kit). Agent Kit evaluates them before every MCP tool call — agents and LLMs cannot bypass them.
Use interaction policies to restrict what on-chain actions an agent may attempt (contracts, calldata, recipients, amounts). For paid MCP tool budgets (x402), use spend policy instead.
Operators can view policies in the dashboard under All agents → Policies (read-only). Create and update policies from your server via the SDK.
For autonomous transaction settings (auto-sign / delegated queue), see Autonomous transactions. The dashboard All agents table shows an Autonomous column when enabled.
Interaction policy vs spend policy
Enforcement order on
tools/call:
- Interaction policy — all enabled policies must pass (AND).
- Spend policy — USD budget for paid tools.
- Tool execution — reads run directly; writes may need backend signing.
Who configures policies
Map your authenticated user →agent.id from SDK quickstart, then attach one or more policies per agent.
Rule types
All rules are per-chain (for exampleethereum, base, polygon). You can combine multiple rule types in a single policy.
Policy fields:
If an agent has no enabled policies, all tool calls are allowed (subject to spend policy and signing).
SDK — create and manage policies
SDK methods
Authentication
REST API
Same operations are available over REST if you prefer not to use the SDK:
Base URL matches your Agent Kit host (same host as MCP without
/mcp).
MCP denial (-32404)
When a tool call breaks a policy withhardBlock: true, MCP returns JSON-RPC error -32404:
reason values:
See Troubleshooting — interaction policy denied for common fixes.
Method whitelist tips
- Patterns are full hex calldata strings — include the 4-byte selector and encoded arguments.
- Use
*as a wildcard for any hex digit (0-9,a-f). - Pattern length must match the calldata you expect (pad with
*for dynamic fields like addresses).
transfer(address,uint256) selector is 0xa9059cbb, followed by 32-byte padded address and 32-byte amount — 136 hex chars after 0x for the arguments portion.
Which tools are evaluated
Interaction policy runs on MCPtools/call when the tool implies an on-chain interaction — for example transfer, token moves, and paid tools that settle on-chain. Read-only tools such as get_balance and discover_services are generally unaffected unless the tool extracts chain interaction context from arguments.
When in doubt, test with a restrictive policy in dev and inspect -32404 violations in your dashboard activity logs.
Security checklist
- Configure policies from your backend — not the browser.
- Use multiple policies only when you need separate rule sets; remember all enabled policies must pass (AND).
- Start with
hardBlock: truein production; use advisory mode (hardBlock: false) only for shadow testing. - Pair policies with spend policy and ERC-8004 identity for full agent accountability.
Next steps
- SDK quickstart —
createAgentand other SDK methods - x402 payments — spend policy for paid tools
- Full-stack app integration — sample backend with policy UI patterns
- Troubleshooting —
-32404,-32403, and MCP errors