policy.get
get(agentId) → Policy Read an agent's spending policy from the on-chain IdentityRegistry (ERC-8004 metadata). The agent must be ACTIVE.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
agentId | string | ✓ | The agent's UUID. |
Returns
Type:
object Returns spendingLimit (wei), spendingLimitOKRW (decimal), and allowedTargets array.
Errors
| Code | Name | Description |
|---|---|---|
AGENT_PENDING | AgentPending | Agent has no on-chain record yet. Wait 1-3 minutes. |
Examples
Get Policy
{
"agentId": "123e4567-e89b-12d3-a456-426614174000"
}