Skip to content
TechnicalNovember 24, 202610 min read

Shared AI agent budgets: accounting for spending across parallel workers

Parallel agent workers share one budget while their calls settle late. Separate estimates, reservations and settled charges, with a worked ledger.

Antonella Serine

Antonella Serine

Founder, KLA

Founder of KLA, building the independent runtime governance control plane for regulated AI agents under the EU AI Act.

The question

When several agent workers draw on one allowance, which authority decides what still fits, and what happens to a call whose charge is still unknown?

The research

BudgetPM (revised 16 October 2026) separates the policy that proposes checks from the executor that enforces limits. BAGEN and Token Budgets supply earlier foundations.

What we checked

Two size-selected BAGEN data files: 85 and 87 prefix records from 83 and 66 rollouts. Repeated prefixes are correlated samples of the same task.

The resource

A shared-budget ledger that keeps available balance, unresolved reservations and settled charges apart, worked through a timeout and a late receipt.

A research agent starts with a budget of 100 units. It delegates two investigations, and each worker asks for 60. Both workers can produce sensible estimates, and both could finish useful work. The system still needs one authority that decides which commitments fit inside the shared balance. The case gets harder when a worker times out after it has submitted paid work. The coordinator sees silence while the provider may still be processing the request. Releasing the reservation at once could hand the same money to another worker. Holding it forever can block legitimate work.

The scenario is illustrative. It frames one research question: how should agents allocate a scarce shared allowance while the execution system keeps an accurate account of its commitments? This post reviews recent preprints, reports a small check of public cost-estimation data, and gives platform owners a worked ledger they can reuse. This is the sixth post in our research notes on agent execution, after reviewer independence, evaluation boundaries, skill-artifact handoffs, recovery after external effects and payment-dispute evidence.

One “spent” number hides four states

Budget dashboards often show a single figure for money spent. During failures that figure mixes states with different meanings, and the uncertainty that matters most disappears into it. An operational ledger should keep them apart:

  • Estimate: a prediction of what a call or task will cost. It changes nothing.
  • Reservation: an allowance set aside for an operation. It reduces available capacity for every other worker.
  • Dispatch: a recorded attempt to make an external commitment, with the request identifier the provider received.
  • Settlement: the usage or charge that the accounting system finally accepts for that operation.

Deciding which checks deserve the remaining capacity

BudgetPM, a preprint first submitted on 29 September 2026 and revised on 16 October, studies when an agent should spend part of a shared budget checking external state before it acts on a stored intention. Its policies propose observations, and a shared executor applies episode and per-step limits. The comparisons include periodic monitoring, deadline scheduling, backoff and matched learned controls. The main temporal experiments count queries at unit cost, so carrying their conclusions over to monetary billing needs further evidence. We located no code artifact in the inspected paper. BudgetPM, v3.

For a team building agents, the paper suggests a practical split. A planner can estimate the value of one more search or status check. A budget owner can decide whether the proposed commitment is affordable. The planner’s decision quality and the owner’s accounting correctness deserve separate evaluations. Allocation quality asks how much useful work a controller preserves when several opportunities compete for the remaining capacity. Accounting correctness asks whether the balance is right after every failure.

Cost estimates come from replayed prefixes

BAGEN, a preprint published on 29 May 2026, evaluates remaining-cost estimates by replaying prefixes of recorded agent trajectories. Estimation runs separately from the original task, so the estimation calls do not interfere with it. The authors leave closing the loop between estimates and later actions as an open direction. BAGEN, v1.

The project’s code repository was updated on 23 October 2026, after the paper. That activity does not change the paper’s May submission date or make it a new research result. BAGEN code at commit 54df9bf.

What we checked in the public BAGEN data

Before building a cost dashboard on data like this, it helps to know what one row represents. We downloaded the dataset manifest at a pinned revision, 5818957, and the two smallest estimation-pair files by declared size. The manifest lists 445 unique paths: 393 in the origin group and 52 in the estimation group. We chose the files for small download size. The sample is neither random nor representative, and it supports no model ranking. Pinned BAGEN dataset.

  • Repeated prefixes are correlated. Two prefixes from one rollout describe the same task at different points. Treat them as independent completed tasks and you overcount the evidence. Rollout indices are scoped to each file.
  • The accounting fields differ. One file carries request-token usage alongside completed-turn usage; the other omits the request-token fields. A pipeline cannot assume one schema for every file.
  • The arithmetic check is narrow. In all 172 rows, summed completed-turn usage equalled the recorded cumulative usage. That establishes neither the correctness of the original token measurement nor any match with a provider invoice.
Two size-selected BAGEN estimation files, checked 26 October 2026
ObservationFirst fileSecond file
Size in bytes, matching the manifest873,328963,174
Prefix records8587
Rollout indices in the file8366
Rollouts with one prefix / with two81 / 245 / 21
Rows carrying request-token usage85 of 850 of 87
Rows where completed-turn usage sums to the cumulative total85 of 8587 of 87

A timeout needs an accounting decision

Consider a proposed ledger with three quantities: available balance, unresolved reservations and settled charges. Under its stated cost model, their sum should stay equal to the original allocation, adjusted for explicit top-ups or refunds. Every worker that shares the allocation must acquire reservations atomically through one authority.

The difficult case starts after dispatch. A worker may lose its response, restart, or send a duplicate reconciliation message. The ledger needs a stable operation identifier, so that repeated reports resolve the same commitment, and a state for an uncertain external outcome. When a worker’s lease (its time-limited permission to dispatch new work) expires, it can start no new calls. Lease expiry says nothing about whether work it already submitted incurred a cost.

These are proposed design requirements. Demonstrating them would take controlled failure cases against a real implementation, followed by provider-specific checks of cancellation and usage reporting. A local counter or a synthetic invoice cannot establish the final charge.

Token Budgets, a preprint from 2 June 2026, helps frame that boundary. Its Rust case study addresses ownership of budget values inside one process. The authors report that disciplined alternatives, including a simple single-agent counter, also succeeded. Distributed reservation remains a proposed extension, and monetary bounds depend on estimation assumptions. We read the paper; its linked implementation repository returned a 404 on 26 October, so its measurements and incident catalogue remain author-reported here. Token Budgets, v1.

A worked ledger: two workers and a delayed receipt

The shared-budget ledger follows the opening example through a timeout, a late receipt and a duplicate confirmation. The units are synthetic and the arithmetic was worked by hand. It assumes one authority serialises reservations, each dispatched operation costs at most its reservation, each authoritative settlement is final, every paid operation passes through the authority, and identifiers survive restarts. A provider that breaks these assumptions needs additional controls.

Shared-budget ledger (extract): available + reserved + settled = 100, synthetic units
EventAvailableReservedSettledDecision
Start10000Workers A and B share one allocation
A requests 60; authority reserves A140600Admit A1
B requests 6040600Refuse: insufficient available capacity
A dispatches A140600Record the external request identifier
A times out after dispatch40600Mark outcome uncertain; keep reservation
A’s lease expires40600Block new dispatch under that lease; A1 stays unresolved
Final receipt for A1 reports 3565035Settle 35 and release the unused 25 in one step
Duplicate receipt for A1 reports 3565035Stable operation ID prevents a second debit or refund
B retries; authority reserves B1 for 6056035Admit B1
B cancels before dispatch is possible65035Release B1 once it provably cannot dispatch

Compare useful work under the same constraints

The timeout row is the critical ambiguity. Releasing A1 there would admit another 60-unit reservation while A1 could still cost up to 60. The test for any design is whether the available balance excludes every unresolved commitment that could still incur a charge.

A fair experiment gives every policy the same tasks, initial capacity and accounting rules. Atomic shared reservation belongs in it as a serious baseline, compared with a serial queue and a conservative fixed allocation per worker. Each may keep the cap while trading latency against utilisation. A read-then-write counter that races can serve as a negative control. Fix the cost assumptions in advance and name every charge the experiment cannot observe. We have not built or run this experiment.

  • Scenarios: concurrent requests that exceed capacity, a crash before dispatch, a timeout after dispatch, delayed usage, a duplicate confirmation, an ambiguous retry and reuse of a stale lease.
  • Measures: completed work, overdraw under the stated assumptions, affordable requests refused, reserved capacity left stranded and reconciliation delay.
  • Time: AgentTime, a preprint first posted on 7 October 2026 and revised on 8 October, studies runtime forecasting, following a requested duration, and explicit waiting after apparent completion in native agent harnesses. Its limited repeats and small set of agents make it background for time allocation. Elapsed time is a separate measure from useful work. AgentTime, v2.
  • Wider costs: an October 2026 simulation preprint models mixed human and agent teams, including downstream bug costs and supervision. Its conclusions rest on simplifying assumptions and need validation against real projects; it offers hypotheses for what to measure alongside model spend. Mixed-team cost optimisation, v1.

How KLA run budgets relate to the ledger

In the KLA Runtime, a run can carry four limits: steps, tokens, cost in US dollars and wall time. The worker adds token usage from the model responses it receives and prices that usage from the providers’ published list prices. Once a run’s tokens or priced cost reach the limit, the run stops before its next model request and records an execution.budget_exceeded event with the budget type, the limit and the amount consumed.

In the ledger’s terms, the priced cost is an estimate. It counts cached input at the full input rate, so it is an upper bound when a provider served part of a prompt from cache, and a model without a published price adds nothing to the cost count while the token limit still applies. Reconciling those figures with a provider invoice is a separate step. The research in this post did not test KLA.

Frequently Asked Questions

How do you share one budget between parallel AI agents?

Give one authority the shared balance and make every worker reserve an allowance from it atomically before dispatching paid work. Track available balance, unresolved reservations and settled charges separately, so their sum stays equal to the allocation. Serial admission and fixed per-worker allocations are alternatives that also keep the cap, with different latency and utilisation.

What happens to an AI agent’s cost when a call times out?

The cost is unknown until the provider reports it. The provider may still be processing the request, so the reservation should stay in place with the outcome marked uncertain. Expiring the worker’s lease stops new calls. The reservation is released only when an authoritative receipt settles the charge or the call provably cannot run.

Is an AI agent’s token count the same as what you are billed?

No. Token counts, unit-cost query counts and priced estimates are different measures from a settled charge. Caching, pricing changes and missing usage fields can separate them. In our check of two BAGEN files, the cumulative token arithmetic was consistent, which says nothing about invoice accuracy.

How should you evaluate AI agent cost estimates?

Check what each row represents before counting. In the BAGEN files we inspected, several prefixes came from the same rollout, so they are correlated samples of one task. Group results by rollout, keep each cost field’s definition, and confirm that every file carries the fields your method needs.

Key Takeaways

Parallel agent workers need one owner for the shared balance and a ledger that keeps estimates, reservations and settled charges apart. Keep a timed-out call reserved until its charge is known, give every operation a stable identifier, and measure allocation quality separately from accounting correctness. Start with the shared-budget ledger, and read the kill-switch architecture for the enforcement point where a budget check runs before each side effect.

Sources were checked on 26 October 2026. BudgetPM, BAGEN, Token Budgets, AgentTime and the mixed-team study are preprints, and their reported results are the authors’ own; we reproduced none of them. Our observations cover two size-selected public data files and their arithmetic. The ledger is a hand-worked synthetic example. No execution system, provider billing or production cap was tested.

See It In Action

Ready to automate your compliance evidence?

Book a 20-minute demo to see how KLA helps you prove human oversight and export audit-ready Annex IV documentation.

Shared AI agent budgets: accounting for spending across parallel workers | KLA Blog