Get your account
Developer API

Agent and Policy Endpoints

Beta. Parts of what these docs describe are still being built. The roadmap shows what is live today.

Use these endpoints to create agent accounts and control their spend policies programmatically. With just a few requests, an agent gets a wallet of its own, wrapped in limits that are actually enforced. For the underlying ideas, read Spend Policy Engine.


Register a new agent

POST /v1/accounts/me/agents

Body

{
  "name": "research-bot",
  "spend_policy": {
    "daily_limit_usdg": 500.00,
    "per_transaction_limit_usdg": 50.00,
    "allowed_recipients": ["api.market", "*.anthropic.com"],
    "assets": ["USDG"],
    "active_hours": "00:00-23:59",
    "hitl_threshold_usdg": 25.00
  }
}

Response

{
  "account_id": "acct_9d3a2f",
  "handle": "@yourname/research-bot",
  "public_key": "9d3a2fXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "active",
  "spend_policy_id": "policy_4471"
}

Update a policy

PATCH /v1/agents/{account_id}/spend-policy

You can send only part of the policy. Fields included in the request are updated, and all others keep their current values.

{
  "per_transaction_limit_usdg": 75.00,
  "hitl_threshold_usdg": 40.00
}

Updates apply to every payment the agent attempts to sign after this request, and settled payments are unaffected. You can make limits stricter or looser while the agent keeps running.


Get a policy

GET /v1/agents/{account_id}/spend-policy

Response

{
  "policy_id": "policy_4471",
  "daily_limit_usdg": 500.00,
  "per_transaction_limit_usdg": 75.00,
  "allowed_recipients": ["api.market", "*.anthropic.com"],
  "assets": ["USDG"],
  "active_hours": "00:00-23:59",
  "hitl_threshold_usdg": 40.00,
  "updated_at": "2026-07-02T10:11:00Z"
}

Approve or reject a held payment

Payments over hitl_threshold_usdg are held instead of being signed automatically, so the important ones always come down to your decision.

POST /v1/agents/transactions/{transaction_id}/approve
POST /v1/agents/transactions/{transaction_id}/reject

Each call responds with the new state of the transaction. Approving signs and submits it right away. Rejecting drops the request without moving any funds.


List pending payments

GET /v1/agents/transactions/pending

Response

{
  "pending": [
    {
      "transaction_id": "tx_5c1e2a",
      "agent": "@yourname/research-bot",
      "to": "compute-provider.io",
      "requested_at": "2026-07-02T14:00:00Z",
      "expires_at": "2026-07-03T14:00:00Z"
    }
  ]
}

As elsewhere in the API, amounts are left out because they are encrypted and can only be read by decrypting on the client with your key. When you open a pending approval in the dashboard, it does that decryption locally.


Error responses

Status Code Description
400 invalid_policy One of the policy fields is not valid (a negative limit, for example)
403 not_agent_owner That agent belongs to a different account than the one making the call
404 transaction_not_found There is no pending transaction with that ID
409 transaction_expired The time allowed for approval has run out