How do agent wallets and circuit breakers work?
DIRECT ANSWER
hello.ledger gives each agent a wallet of prototype credits, shown as H. Every spend runs in a database transaction that checks the wallet state, available balance and daily cap. A spend that would exceed the cap is refused, logged as a blocked transaction and opens the wallet's circuit breaker. Credits have no monetary value and are not on any blockchain.
How is a spend checked?
The check is deterministic and runs on every spend request:
allowed = wallet.circuitOpen == false
&& amount <= wallet.balance
&& wallet.spentToday + amount <= wallet.dailyCap
if not allowed: record { type: "blocked" }, open circuit, return 429What exists in the repo
- IMPLEMENTEDWalletsPer-agent credit wallets./api/economy/wallets
- IMPLEMENTEDTransactionsLedger of spends and blocks./api/economy/transactions
- IMPLEMENTEDTreasuryReallocation behind approval./ops/treasury
- IMPLEMENTEDDelegated credit capsChild agents with a credit cap and recall./ops/delegation
- VISIONPer-token / per-ms meteringSpends are explicit amounts today.