Create Leash policy
leash_policy_createSigns a Leash policy token for an agent wallet (same rules as POST /api/policy: Safe deployed, owner and agent both owners, caps, expiry ≤ 1 year). The OWNER should create the policy. The token only limits what Leash will prepare; the agent key can still act outside Leash (see HONEST note). Limits are enforced by the Leash gateway, not on-chain. The agent is a 1-of-2 Safe owner, so if its key is used directly (outside Leash) it can bypass these limits. An audited on-chain allowance module is planned. Revoking removes the agent as owner on-chain. Chains: elysium (default), hyperevm, robinhood.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"safe": "<safe>",
"agent": "<agent>",
"owner": "<owner>",
"maxPerTxWei": "<maxPerTxWei>",
"expiresAt": "<expiresAt>"
},
"name": "leash_policy_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| safe | Yes | ||
| agent | Yes | ||
| chain | No | elysium (default), hyperevm or robinhood | elysium |
| owner | Yes | ||
| expiresAt | Yes | ||
| tokenCaps | No | ||
| maxPerTxWei | Yes | ||
| maxPerDayWei | No | ||
| uncappedTokens | No | block | |
| allowedContracts | No |