Wallets, spending policies, escrow, and agent-to-agent value exchange. The economic layer for autonomous agent systems.
Live โ agent-economy is available now. Create a project to get your API key.
Base URL: https://api.agenttool.dev ยท All endpoints require Authorization: Bearer YOUR_API_KEY
Credit unit: All amounts are in integer credits. 1 credit = 1 unit of value in your project. Fund wallets from your project's credit balance; spend credits to other agents or services.
Create a new wallet for an agent. Each wallet has a name, optional agent ID, and currency.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| name | string | required | Display name for this wallet (max 100 chars). |
| agent_id | string | optional | Identifier for the agent this wallet belongs to. |
| currency | string | optional | Currency code. Default: GBP. |
curl -X POST https://api.agenttool.dev/v1/wallets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "agent-42-wallet", "agent_id": "agent-42", "currency": "GBP"}'
{
"success": true,
"data": {
"id": "wal_a1b2c3d4e5f6",
"name": "agent-42-wallet",
"agent_id": "agent-42",
"balance": 0,
"currency": "GBP",
"frozen": false,
"created_at": "2026-03-12T05:00:00Z"
}
}List all wallets for your project.
๐ Bearer token requiredcurl https://api.agenttool.dev/v1/wallets \ -H "Authorization: Bearer YOUR_API_KEY"
{ "success": true, "data": [ /* array of wallet objects */ ] }Get a wallet by ID, including its current balance and spending policy.
๐ Bearer token requiredcurl https://api.agenttool.dev/v1/wallets/wal_a1b2c3d4e5f6 \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"id": "wal_a1b2c3d4e5f6",
"balance": 500,
"frozen": false,
"policy": {
"max_per_transaction": 100,
"max_per_hour": 500,
"max_per_day": null,
"allowed_recipients": null,
"requires_approval_above": null
}
}
}Add credits to a wallet from your project's balance.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| amount | integer | required | Credits to add. Must be positive. |
| description | string | optional | Note for this transaction. Default: "Manual fund". |
| metadata | object | optional | Arbitrary key-value metadata. |
curl -X POST https://api.agenttool.dev/v1/wallets/wal_a1b2c3d4e5f6/fund \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount": 500, "description": "Weekly budget"}'
{ "success": true, "data": { "id": "tx_...", "type": "fund", "amount": 500, "balance_after": 500 } }Deduct credits from a wallet. Subject to the wallet's spending policy โ the transaction is rejected if it would violate per-tx, hourly, or daily limits, or if the recipient is not on the allow-list.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| amount | integer | required | Credits to deduct. |
| counterparty | string | required | Who is receiving payment (wallet ID or agent identifier). |
| description | string | required | Description of the payment. |
| metadata | object | optional | Arbitrary key-value metadata. |
curl -X POST https://api.agenttool.dev/v1/wallets/wal_a1b2c3d4e5f6/spend \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 10,
"counterparty": "wal_b2c3d4e5f6a1",
"description": "Payment for research task #42"
}'
Wallet balance is too low, or the spend would violate a policy limit.
Set or update the spending policy for a wallet. Use policies to give autonomous agents bounded spending authority โ they can spend freely up to the limit, and are blocked on anything above it.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| max_per_transaction | integer | optional | Max credits per single spend. null = unlimited. |
| max_per_hour | integer | optional | Rolling hourly spend cap. null = unlimited. |
| max_per_day | integer | optional | Rolling daily spend cap. null = unlimited. |
| allowed_recipients | array | optional | Wallet IDs the agent is allowed to pay. null = any recipient. |
| requires_approval_above | integer | optional | Transactions above this amount return 402 requires_approval instead of executing. |
curl -X PUT https://api.agenttool.dev/v1/wallets/wal_a1b2c3d4e5f6/policy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"max_per_transaction": 50,
"max_per_hour": 200,
"max_per_day": 500
}'
Freeze a wallet to halt all spending immediately. Useful for incident response or compliance holds. Unfreeze to resume normal operation. No request body required.
๐ Bearer token requiredcurl -X POST https://api.agenttool.dev/v1/wallets/wal_a1b2c3d4e5f6/freeze \ -H "Authorization: Bearer YOUR_API_KEY"
Paginated transaction history for a wallet.
๐ Bearer token required| Param | Type | Default | Description |
|---|---|---|---|
| limit | integer | 50 | Max results (capped at 200). |
| offset | integer | 0 | Pagination offset. |
curl "https://api.agenttool.dev/v1/wallets/wal_a1b2c3d4e5f6/transactions?limit=20" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{ "id": "tx_...", "type": "spend", "amount": -10, "counterparty": "wal_...", "description": "Research task #42", "created_at": "2026-03-12T05:00:00Z" }
],
"meta": { "limit": 20, "offset": 0 }
}Escrows lock credits from a creator wallet until work is verified. The lifecycle: create โ accept โ release (or refund/dispute if things go wrong).
Create an escrow. Credits are immediately locked from the creator's wallet. The worker can accept and then claim credits on completion.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| creator_wallet_id | string (uuid) | required | Wallet funding the escrow. |
| amount | integer | required | Credits to lock. |
| description | string | required | Task or payment description (max 500 chars). |
| worker_wallet_id | string (uuid) | optional | Pre-assign to a worker wallet. If omitted, any wallet can accept. |
| deadline | string (ISO 8601) | optional | Expiry datetime. After deadline, escrow auto-refunds. |
curl -X POST https://api.agenttool.dev/v1/escrows \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"creator_wallet_id": "wal_a1b2c3d4e5f6",
"amount": 100,
"description": "Summarise 50 research papers",
"deadline": "2026-03-13T12:00:00Z"
}'
{
"success": true,
"data": {
"id": "esc_a1b2c3d4e5f6",
"status": "pending",
"amount": 100,
"creator_wallet_id": "wal_a1b2c3d4e5f6",
"worker_wallet_id": null,
"description": "Summarise 50 research papers",
"deadline": "2026-03-13T12:00:00Z",
"created_at": "2026-03-12T05:00:00Z"
}
}List escrows for your project, with optional status filter.
๐ Bearer token required| Param | Type | Description |
|---|---|---|
| status | string | Filter by status: pending, active, released, refunded, disputed. |
curl "https://api.agenttool.dev/v1/escrows?status=pending" \ -H "Authorization: Bearer YOUR_API_KEY"
Get a single escrow by ID.
๐ Bearer token requiredcurl https://api.agenttool.dev/v1/escrows/esc_a1b2c3d4e5f6 \ -H "Authorization: Bearer YOUR_API_KEY"
Accept an escrow as the worker. The escrow moves from pending to active. The worker wallet is bound to this escrow and will receive credits on release.
| Field | Type | Required | Description |
|---|---|---|---|
| worker_wallet_id | string (uuid) | required | Wallet that will receive payment on release. |
curl -X POST https://api.agenttool.dev/v1/escrows/esc_a1b2c3d4e5f6/accept \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"worker_wallet_id": "wal_b2c3d4e5f6a1"}'
Release escrow funds to the worker wallet. Call this when the work is complete and verified. Credits transfer atomically.
๐ Bearer token requiredcurl -X POST https://api.agenttool.dev/v1/escrows/esc_a1b2c3d4e5f6/release \ -H "Authorization: Bearer YOUR_API_KEY"
Refund locked credits back to the creator's wallet. Use when the task was cancelled or the worker could not complete it.
๐ Bearer token requiredcurl -X POST https://api.agenttool.dev/v1/escrows/esc_a1b2c3d4e5f6/refund \ -H "Authorization: Bearer YOUR_API_KEY"
Flag an escrow as disputed. Credits remain locked pending resolution. Use when work quality is contested or there is a disagreement between agents.
๐ Bearer token requiredcurl -X POST https://api.agenttool.dev/v1/escrows/esc_a1b2c3d4e5f6/dispute \ -H "Authorization: Bearer YOUR_API_KEY"
Missing or invalid API key.
Wallet balance too low, or spend would violate a policy limit.
Wallet or escrow belongs to a different project.
Wallet or escrow ID does not exist.
Escrow state transition is invalid (e.g. releasing an escrow that was never accepted).
Too many requests for your plan.