We gave our AI agent fleet a credit limit, and it hit it the same day
Description and use
The system automatically capped autonomous agent spending by replaying event logs into ledgers and applying a rolling budget threshold, preventing overspending.
Problem
Uncontrolled AI agent fleet spending exceeded budget, risking runaway costs.
Outcome
The system automatically prevented overspending by throttling new work once a rolling 5‑hour budget was exceeded, providing audit trails, real‑time alerts, and a fail‑open design that avoided paralysis.
Workflow
- 1. Replay board events into three hledger journals (money, promises, labour).
- 2. Validate ledgers with hledger check and independent replay for parity.
- 3. Compute rolling 5‑hour labour spend per mind using mesh‑labor.
- 4. Price spend via token‑to‑USD rate table (mesh‑ledger).
- 5. Monitor spend against configured cap with mesh‑labor‑alert (edge‑triggered).
- 6. When spend exceeds cap, mesh‑pace throttles new task dispatch until spend falls below threshold.
- 7. Operators can manually raise cap or bypass throttle via dedicated channels.
- 8. Ensure environment variables for cap are sourced in all entry points to avoid stale values.
Evidence
The board gets replayed into three separate double-entry hledger journals, each tracking a different commodity: money, promises, labour.
mesh‑pace reads that rolling spend and, once it crosses the cap, holds every dispatch of new board work.
- Record date: 2026-09-15T06:15:34.931Z