Costs & Budgets
What it is
End-to-end spend accounting and guardrails — every model call is metered, priced, attributed, and checked against budgets and quotas.
Operator surface
costs_query,costs_summary,costs_by_scope,costs_by_mission,costs_record.- Usage views —
usage_summary,models_list. budget_status— the agent-facing remaining-budget check used inside mission phases.
REST is CostsController / UsageController, and the dashboard renders cost and usage dashboards.
How it works
Each call writes a CostTrackingRecord capturing input / output and cache-read / creation tokens, batch-pricing flags, usage units, the resolved pricing row, original-currency cost, and an estimated USD figure — attributed by BillingScope to a mission, conversation, task, and project. Quota windows (QuotaWindow) and effective billing mode let subscription vs metered usage be tracked side by side (including a "would-be" cost for subscription calls). These records roll up into mission token / cost totals and the budget checks agents consult before doing expensive work (see the per-tick budget envelope in the Agents guide).