Off-chain interaction policies are guardrails you configure per agent from your backend (via @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:
  1. Interaction policy — all enabled policies must pass (AND).
  2. Spend policy — USD budget for paid tools.
  3. Tool execution — reads run directly; writes may need backend signing.

Who configures policies

Call policy CRUD from your server only — use your dashboard application API key or the agent’s agent.apiKey. Never expose these keys in the browser.
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 example ethereum, 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 with hardBlock: true, MCP returns JSON-RPC error -32404:
Violation 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).
Example: ERC-20 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 MCP tools/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: true in 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