agent_spend_ledger
agent_spend_ledgerAgent spend cap / budget ledger: set a budget, reserve before pay (atomic, never overspends even with many agents in parallel), then settle or release. Idempotent, shared by namespace. Spending limit, budget guard, cost control for AI agents. Every call requires a tiny solved packet (returned in the reply, 2 s, one try); free first call, no API key (GET /try?tool=agent_spend_ledger).
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": {
"namespace": "<namespace>",
"action": "<action>",
"budget_id": "<budget_id>",
"idempotency_key": "<idempotency_key>"
},
"name": "agent_spend_ledger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | ||
| ttl_s | No | ||
| action | Yes | ||
| source | No | ||
| budget_id | Yes | ||
| caller_id | No | demo_caller | |
| namespace | Yes | ||
| limit_micros | No | ||
| amount_micros | No | ||
| reservation_id | No | ||
| idempotency_key | Yes |