Agent spend

Know what every agent spent, to the cent.

Give each agent a wallet account. Every model call or tool it pays for is a balanced entry against that wallet, and top-ups are transfers from your bank account.

Updated

Where agent spend goes wrong.

  1. 01

    One card, many agents

    Every agent's API calls land on one bill, and nobody can say which agent spent what.

  2. 02

    Duplicates go unnoticed

    An agent retries a charge and records it twice. The total looks fine until the invoice arrives.

  3. 03

    Budgets live in a spreadsheet

    Top-ups and balances are tracked by hand, apart from the spend they're meant to cover.

Scenarios

Questions an operations lead can answer.

How OpenLedger answers

Each wallet is an asset account, so get_balance returns what's left, and get_account_ledger shows every charge and top-up.

What changes.

  • Spend by agentEach wallet's ledger lists every charge that agent made.
  • Exact amountsWhole cents, so sub-dollar API charges add up exactly.
  • Duplicates corrected in the openA reversal cancels a duplicate without deleting it.
  • Profit and loss by periodModel and tool spend next to the revenue it supports.

Controls.

  • Balanced on write

    An entry that doesn't balance is refused, and nothing is written.

  • Whole cents

    Every amount is an integer number of cents.

  • Reversals, not edits

    The original stays beside a reversal and its reason.

  • Audit log

    Every change writes an audit row in the same transaction.

  • Read-only SQL

    run_query accepts SELECT statements only.

  • Self-hosted

    One SQLite file on infrastructure you control.

Questions.

Does it stop an agent overspending its wallet?

No. The server checks that entries balance, not that a wallet has funds, so a wallet can go negative. Attri adds spending limits and approval rules in managed deployments.

Does it pull charges from our API providers?

No. Your agent posts each charge, or a script posts it from your provider's usage export. There are no built-in connectors.

Does it have sign-in?

Not yet. The open-source server has no sign-in or access control, and Docker binds it to localhost. Keep it off shared networks. API keys are planned for v0.2, and Attri adds access control in managed deployments.

Let your agents keep the books. Keep the rules on the server.

Run OpenLedger on sample books in minutes, or have Attri deploy it inside your environment with access control and approval rules.