Skip to main content
Budget enforcement is structural, not a report you read the next morning. Every call is priced before it is made and refused if it would breach the cap. This is what makes it safe to leave an agent running unattended overnight.
An agent is not creatable without a budget. A null cap would mean no limit and no per-agent spend record at all.
Money is integer micro-USD on the wire. Every amount is carried and stored as an integer number of micro-USD (1 USD = 1,000,000 micro-USD), in fields suffixed _micro_usd (cap_micro_usd, max_task_micro_usd, consumed_micro_usd). Clients display dollars for humans but convert before sending: the CLI --budget-usd accepts a decimal and converts client-side, and the SDK takes whole-micro-USD strings (never a bare number, to avoid float rounding).

Creating an agent with a budget

A budget is set at agent-creation time — a period cap, a per-task ceiling, and the reset period.
Every model call or priced tool call then passes through a pre-flight gate before it is allowed to run:

How pre-flight pricing works

Before each model call or priced tool call, Vetta computes a quote — an upper bound on what the call will cost at the session’s completion window. The quote is checked against, in order:
  1. The organization balance — is there money? See Credits & billing.
  2. The agent period cap (cap_micro_usd) minus what it has already spent this period.
  3. The task ceiling (max_task_micro_usd) minus what this session has already spent.
  4. Any session budget you set explicitly.
If the quote would breach any of these, the call is refused and a budget.exceeded event is emitted. The agent is told, in-band, that it is out of budget, so it can wrap up cleanly rather than crash.

Session budgets

Beyond the agent budget, a session can carry its own cap. Work pauses at the cap and resumes when you raise or remove it.
Rules:
  • A replacement cap must be strictly greater than the session’s already-consumed cost.
  • Removal is one-way: you cannot re-add a cap to a session that had one removed, or add one to a session created without it.
  • Raising or removing a cap automatically resumes work that paused at it.

Reading spend

Everything is metered against real backend cost in integer micro-USD and attributed per component and per session. Model spend is metered across the five-tier token ledgerinput, cache_write, cache_read, output, and reasoning — the same tiers the model router prices each call against.
CLI
Amounts are integer micro-USD: 11902000 is $11.902. The model component decomposes into the five token tiers above; the other components are computer, search (web tools) and media (generation). A component with no spend is absent, not zero.

Configuration reference

An agent budget has three required fields:
integer
required
The total the agent may spend within its period, in integer micro-USD. The CLI --budget-usd and SDK helpers convert dollars to this before sending.
integer
required
The ceiling for a single task, in integer micro-USD. A session cannot exceed this even if the period cap has room.
string
required
The reset window: day, week, or month.

Next: durable runtime

Waiting costs storage, not compute.