Skip to content
ndStill is in development. These docs describe the v2 API as designed; the SDKs and the hosted MCP server are previews and not generally available.
Docs

Budgets and reservations

One budget across every rail: windows, scopes, reservations, settlement and forecasts.

A budget is a spending limit for a scope over a window: "the Travel desk agent may spend $5,000 a month", "the Research team may spend $20,000 a quarter". ndStill keeps one budget across every rail: a card payment, an x402 call in USDC, a bank payout and an OpenAI bill all draw on the same numbers. That is the point of putting one control plane in front of many providers.

Scopes and windows#

Budgets attach to the same scopes as policies and freezes:

Budget scopes
ScopeBinds
agentOne agent's payments.
treeAn agent and every child agent under it.
teamEvery agent in the team and its sub-teams.
orgEverything the org spends.
funding_sourceEverything paid from one account, card program or wallet.

Each budget has a window: day, week, month, quarter or total. Windows are calendar windows in the policy's time zone (a month budget in America/Los_Angeles resets at midnight Pacific on the first). A policy can set several at once, for example $200 a day and $1,500 a month.

A payment must fit every budget in scope. A $300 payment by a child agent checks the child's own budgets, its parent's tree budget, its team's, the org's, and the funding source's allowance.

Reservations: why budgets never race#

When the pipeline approves a payment, the budget stage places a reservation: a pending debit on every budget in scope at once, all or nothing. Ten agents paying at the same moment can't overspend a shared budget, because each reservation either fits everywhere or fails everywhere.

Text
approve   → reserve $540.00 on: Travel desk (month), Travel tree (month), Operations team (quarter), Org (month)
settle    → post the final amount ($552.40 with fees) and release the rest
decline   → nothing reserved
expire    → the reservation times out and releases itself
refund    → the window is credited back

So a budget has three numbers:

  • spent: settled payments in the window.
  • reserved: approved payments that haven't settled yet (a card authorization waiting for capture, a bank payment in flight).
  • remaining: limit − spent − reserved.

The budget bar in the console shows reserved as a lighter segment, and turns warning or danger only near or over the limit.

What happens near the limit#

Budget outcomes
SituationReason codeOutcome
The payment would take a budget past its limitover_budgetDeclined, with the scope, window and the amount over
The payment fits but leaves very little roombudget_nearly_exhaustedHeld for a person, when the policy asks for it

The agent gets a reason it can act on, such as "Over the Travel desk's weekly budget by $112.00". Agents can check before they try: the check_budget MCP tool and the SDK's budgets.check() return what's left in each budget in scope and whether a given amount fits.

Forecasts and alerts#

Each budget carries forecast_breach_at: the date it will run out at the current burn rate, or null when it's on track. When a budget crosses its warning line, ndStill emits budget.threshold_reached, so you can alert a channel or pause work before agents start getting declines. See the event catalogue.

JSON
{
  "id": "bud_01JD9…",
  "object": "budget",
  "name": "Travel desk monthly",
  "scope": { "kind": "agent", "id": "agt_01JD8Q3W6Z", "name": "Travel desk" },
  "window": "month",
  "limit": { "amount": 500000, "asset": "USD" },
  "spent": { "amount": 318250, "asset": "USD" },
  "reserved": { "amount": 54000, "asset": "USD" },
  "remaining": { "amount": 127750, "asset": "USD" },
  "forecast_breach_at": "2026-11-24T00:00:00Z"
}

Budgets and assets#

Money is always an integer in minor units with an asset. Budgets are kept in the org's default asset, usually USD. USDC payments count at par; other currencies are converted at the rate snapshot recorded on the decision. A budget never mixes assets silently.

Where budgets come from#

Budgets are defined in policies (the budgets list in the policy document) and in team and agent settings. A child policy can lower a parent's budget for its scope but never raise it. To change one directly, use PATCH/budgets/{id}, which needs a passkey step-up when the org requires it. Read Agents and agent trees for how budgets roll up a tree.