Bitcoin AI Agent Spending Budgets: Daily Limits, Total Caps, and bbolt
An AI agent with SEND permission needs a financial boundary stronger than a sentence in a system prompt. WAB AI AGENT V0.1 proposes a separate spending-policy layer backed by bbolt. This is a design proposal, not a claim that the feature is deployed.
Two budgets, enforced together
A daily budget limits the aggregate amount an agent may spend during a defined UTC day. A total budget caps spending across the lifetime of an authorization, even when the day changes. Each SEND request must satisfy both budgets as well as a per-transaction minimum and maximum. The accounting unit is integer satoshis, not floating-point BTC.
The amount evaluated should be the sender's total debit. The wallet engine's signed fee law remains authoritative; the agent must not assume that the recipient receives the same amount the sender spends.
Configuration and durable state have different jobs
An installation script can ask the operator for the permitted tools, SEND enablement, minimum and maximum transfer sizes, daily cap, total cap, approval mode, engine address, and AI provider. Those settings are written to a protected local configuration such as .env. The wallet's BTC KEY is local and must never be forwarded to a model provider or included in logs.
bbolt stores mutable facts: the authorization version, reservations, transfer states, spent amounts, and audit records. Editing .env must not reset consumed budgets. Restarting a container must not clear outstanding reservations.
Atomic reservation, external execution
Suppose the daily limit is 50,000 sat and 40,000 sat is already spent. Two simultaneous requests each ask for 8,000 sat. If both read the same balance without synchronization, both might pass. A single bbolt write transaction can check the current remaining budget and reserve funds atomically, so only one reservation succeeds.
However, a local database update and a Bitcoin network broadcast cannot be one atomic transaction. A robust workflow records RESERVED, then SUBMITTING, then a known broadcast identifier or an uncertain state requiring reconciliation. An HTTP timeout is not proof that a transaction failed. The agent must not blindly retry a SEND with a fresh idempotency key.
Daily rollover and total-budget persistence
Daily reservations need a defined accounting day and consistent rules for transactions that remain pending across midnight. Total limits do not reset at midnight. The system should protect against clock rollback, duplicate requests, and concurrent sends. If the ledger disappears or is corrupted, SEND should fail closed until the state is recovered or reconciled; deleting the database must not mint a new allowance.
Approval is distinct from budget
Even a transfer inside budget may require human approval. A later autonomous mode could allow preapproved purchases, but the authorization must bind the permitted amount, purpose, and conditions. A model cannot raise its own limits or modify the owner policy through conversation text.
What bbolt is not
The agent database is a spending-authorization ledger, not the Bitcoin balance source of truth. Wallet balances, UTXOs, and transaction states still come from the engine. The ledger answers what this particular agent was authorized to spend, what it reserved, and what it actually used.
