Concepts

Budgets and reservations

How organization, team and agent budgets stay correct when many agents pay at once, and how held money becomes committed or is released.

View as .mdUpdated
Every payment holds its amount at organization, team and agent level in one transaction before anything is signed. Parallel agents cannot spend the same last cent, and an approval cannot lift a budget.

Who needs it

Owners and finance, who set one limit for many agents and need it to hold. Agent developers, whose agents can read their own budget left before they buy.

Three levels, three numbers

A budget exists for the organization, for each team and for each agent. Each one has a limit and two running amounts:

AmountMeans
ReservedHeld for payments that are decided but not yet confirmed.
CommittedSpent: payments the rail confirmed.
LeftThe limit minus committed minus reserved.

The tree is consistent: a team's limit cannot exceed its organization's, and an agent's cannot exceed its team's (or the organization's when the agent has no team). An edit that breaks this is refused.

Budget tree with meters for organization, teams and agents
Budgets at organization, team and agent level, with reserved and committed amounts.Captured 2026-11-16

How a reservation works

When the policy says ALLOW (or a person approved and the policy then allows), Abazi reserves the amount in one database transaction:

Lock the organization's budget row, then the team's, then the agent's. Always in that order, so two payments never wait on each other in a circle.
Check that each of the three has enough left.
Only if all three do, add the amount to reserved on all three. Otherwise reserve nothing and deny with BUDGET_EXCEEDED, naming the level that ran out.

A reservation then moves through three states:

StateWhenEffect on all three budgets
HeldThe reservation succeededReserved goes up
CommittedThe rail confirmed the paymentReserved goes down, committed goes up
ReleasedDenied after reserving, rail failure, cancellationReserved goes down

The policy engine also reads the budgets, without locks, at step 4, so it can explain a denial early. The reservation is the real check.

Boundary

  • Budgets are limits, not thresholds. An approval clears only the "ask a person" steps of the policy. It never lifts a budget or the hard cap. See Approvals.
  • Unknown outcome keeps the money held. If the rail sent the payment but Abazi cannot confirm it yet, the reservation stays held until reconciliation settles it. The payment is never signed twice.
  • Plans reserve once. An installment plan reserves its total when it is approved and commits one share per pull. Cancelling releases the rest.
  • Refunds give the budget back. A settled refund lowers committed at all three levels.
  • An agent sees only its own budget. Through get_spending_status, an agent reads how much of its own budget is left, never another agent's.
  • Early warning. When committed plus reserved reaches 80% of a limit, an alert is sent once for that budget. It can be switched off per budget.

Example

A typical mandate uses these budgets: organization 5.00 USDC, each team 3.00 USDC, each agent 2.00 USDC.

Two agents of the same team request a purchase at the same moment, and the team has room for only one.

MomentFirst agentSecond agent
Both pass policyLocks organization, team, agentWaits on the organization lock
First transaction endsReservedGets the lock, reads the reduced amount left
CheckTeam level too low: DENY BUDGET_EXCEEDED, scope team, nothing reserved

Failure cases

CaseWhat happens
One level has too little leftDENY BUDGET_EXCEEDED with that level. Nothing is reserved anywhere.
An approval comes back after the budget was used meanwhileThe policy runs again with the approval and denies. Nothing is reserved.
The rail rejects the payment before broadcastThe intent fails and the reservation is released.
The outcome is unknown after signingThe reservation stays held while the payment is reconciled.
A plan is cancelled after two of four pullsTwo shares stay committed; the rest is released.

How to verify

  • The Console's budget page shows the limit, committed, reserved and what is left for every level.
  • Each payment's detail page shows its reservation and when it was held and committed.

Next steps

On this page