Configuring Spending Policy
How to set and verify an agent's on-chain spending limits and allowed targets.
Policies are stored on-chain in the IdentityRegistry. You update them using the
policy.set tool.Prerequisites
- An ACTIVE agent
Setting the Policy
Instruct your agent to call
policy.set. You can specify a spendingLimit (in OKRW) and/or allowedTargets (comma-separated addresses).{
"agentId": "your-agent-id",
"spendingLimit": "1000000",
"allowedTargets": "0xAddress1,0xAddress2"
} Verifying the Policy
Use
policy.get to read the metadata back from the chain.{
"agentId": "your-agent-id"
} Note: The owner address is always implicitly allowed, even if it's not in the
allowedTargets list. Conclusion
The policy is now active and will be enforced by both the MCP server (preflight) and the Maroo chain (PCL).