Cost Controls for Agent Fleets: Budgets, Caps, and Kill Switches
Token spend is a product feature. Per-run budgets, model tiers by state, revision caps, and kill switches keep agent fleets from becoming surprise invoices.
An agent without a budget is a blank check. Fleets without kill switches are how finance learns about your AI program from the card statement. Cost control is not accounting theater after the fact. It is part of the runtime.
This spoke is under the Agentic Systems Operating Manual. It assumes you already have evaluators and a state machine — those are where caps get enforced.
Control AI agent costs: the control plane
You need four layers:
- Unit economics — expected cost per successful job, agreed with the buyer.
- Runtime budgets — hard caps per run, per day, per tenant.
- Shape controls — max tool calls, max revisions, max retrievals, max tokens in/out.
- Kill switches — automatic abort + human alert when thresholds trip.
If you only have dashboards, you have observation. If you have enforced caps, you have control.
Token budget for agents (make it real)
A token budget is useless as a sticky note. Implement it as counters the runner checks before every model call and expensive tool call.
Practical scheme:
- Attach
budget_usdandbudget_tokensatintake - Decrement after each billable call (use provider usage when available; estimate with margin when not)
- Refuse transition into
act/revisewhen remaining budget < cost of the next step - Land in
escalateorabortwith a clear reason code:budget_exhausted
Carry remaining budget in handoff packages so multi-agent paths cannot each assume a full wallet.
Model tiers by state
Not every state needs the flagship model.
| State | Typical tier | Why |
|---|---|---|
intake classify | Small / cheap | Narrow schema output |
plan | Mid | Needs judgment, not essays |
act tool choice | Mid | Schema-constrained |
| Draft prose | Mid or high | Quality-sensitive |
evaluate mechanical | Code | Free |
evaluate judgement | Mid/high, short context | Accuracy over creativity |
Measure cost per passing run, not cost per token in isolation. A cheaper model that needs eight revisions can lose.
Caps that prevent spirals
- Revision ceiling — usually 3
- Max tool calls per run
- Max parallel agents
- Max retrieval calls
- Context assembly cap — hard truncate with structured preference for job contract + last failures over ancient scratch
- Fan-out cap — one job cannot spawn unbounded child jobs
Spirals look like “the agent is trying.” Ops experience them as a melting budget.
Kill switches
Define trips:
- Spend > X in 10 minutes for a tenant
- Error rate > Y% over N runs
- Evaluator fail rate spike after a deploy
- Single run exceeds Z× the p95 cost
On trip: stop scheduling new runs, abort in-flight if safe, page the owner, leave a receipt. Soft mode: degrade to human-only queue. Hard mode: freeze tool writes.
Test the kill switch on purpose in staging. Untested switches do not exist.
Cost in the evaluator loop
Track:
- Cost per pass
- Cost per escalate
- Cost per abort
- Pass rate × cost to get expected cost per successful business outcome
When you change prompts or models, require the golden set to hold pass rate and cost band. “Slightly better, 4× cost” is a product decision, not an automatic ship.
Fleet-level practices
- Per-tenant budgets for multi-tenant products
- Separate keys/projects per environment so staging cannot burn prod quota silently
- Weekly cost review next to quality scores — same meeting, same dashboard
- Label runs by
job_typeso you can kill expensive job types without freezing everything
What not to do
Unlimited “agent days” for internal demos. Demo keys need caps too.
Hiding cost from builders. If engineers cannot see spend per run, they will not optimize it.
Optimizing only cache hit rate. Useful, secondary to revision spirals and over-retrieval.
Paying for giant contexts as a memory strategy. See memory patterns.
Pilot economics at Spurlock Studios
The $1,500 · 5-day pilot includes wiring budgets and a revision ceiling for one job so you see real unit cost on your data before a larger build. Surprises belong in week one, not month three.
/agentic · /contact?intent=agentic-pilot
A simple policy sketch
per_run_usd_max: 2.00
per_day_tenant_usd_max: 50.00
max_revisions: 3
max_tool_calls: 20
max_retrieval_calls: 8
on_budget_exhaust: escalate
on_day_cap: freeze_new_runs + alert
Encode it. Do not trust a prompt that says “be frugal.”
Forecasting before launch
Before widening a job to production volume, estimate:
expected_daily_jobs × cost_per_pass_p95 × 1.3 safety ≈ daily spend
If that number scares finance, either raise automation share, narrow autonomy, or raise the business value threshold for which jobs enter the agent path. Hope is not a forecast.
Include escalate cost: human minutes × loaded rate. An agent that “saves” five minutes but escalates 40% at fifteen minutes each is a loss.
Caching without corrupting truth
Prompt and retrieval caches save money. They also serve stale policy if keys ignore doc_version. Cache keys should include policy versions and evaluator criterion versions for high-stakes jobs. Prefer short TTLs on knowledge-grounded answers.
Chargeback and incentives
If product teams do not see spend, they will externalize it onto a shared key. Per-job-type and per-tenant tags make chargeback possible. Incentives should reward cost per successful outcome, not raw call count reductions that tank quality.
Provider outages and fallback tiers
Fallbacks to another model can protect availability and sometimes cost — but only if the golden set still passes. Wire fallback as an explicit state transition with its own budget multiplier. Blind failover to a cheap model is how silent wrongness spikes while the cost chart looks healthy.
Kill switches belong in your runner, not only in the provider’s billing UI. By the time the provider emails you, the loop may have finished.
Install thin budgets in week one via the Spurlock Studios pilot ($1,500): /agentic. Stack context: operating manual.
Per-tool pricing awareness
Some tools cost more than models (enrichment APIs, scrapers). Budgets must include tool invoices, not only tokens. Put estimated USD on each tool definition; decrement the same counter.
Abort vs escalate on budget
Abort when continuing cannot help (auth broken, daily cap). Escalate when a human might finish cheaply. Do not abort quietly without an ops event — silent aborts look like “AI is flaky” in the business’s mouth.
Quarterly model renegotiation
Re-benchmark mid and small tiers on your golden set every quarter. Provider price cuts do not matter if your revision rate doubles. Record decisions in the same log fractional architecture uses.
Tie-in: observability, /agentic.
Token budget for agents: worked example
Job value: ~$8 of human time saved when successful. Target cost per pass ≤ $0.80 (10×). Set per-run max $1.20 to allow variance. If golden-set average is $0.35 at 90% pass, you have room. If average is $1.10 at 70% pass, fix quality and revisions before scale — not after the card spikes.
Communicating cost to non-engineers
Show $/successful job and weekly spend next to jobs completed. Avoid raw token charts in exec meetings; they invite the wrong debate. Invite the right one: is this job still worth calling an agent?
Fleet freezes
Document who can freeze a job_type. Practice a freeze in staging. Control AI agent costs is an ops skill you rehearse, like restores.
Pilot wiring: /agentic · $1,500 · 5 days.
Budget ownership model
Every job_type has a budget owner (usually product or ops) and a technical owner (engineering). The budget owner sets the dollars; the technical owner implements caps and kill switches. When spend spikes, both are in the thread. Orphan budgets become everyone’s problem and nobody’s priority.
Scenario planning
Run three scenarios quarterly: volume 2×, model price 0.5×, pass rate −10%. Update caps. Agent fleets that only plan for the happy cost curve get surprised by success (more volume) as often as by failure (more revisions).
Token budget for agents inside multi-agent relays
Allocate a parent budget at intake and give children allowances. Children must request more via the hub rather than spending silently. Control AI agent costs across handoffs or the graph will hide the burn in specialist hops.
Practical kill-switch tiers
- Warn — Slack/email at 70% daily cap
- Degrade — disable noncritical job_types at 90%
- Freeze — stop new runs at 100%; finish in-flight only if safe
- Hard stop — abort in-flight writes if error-rate trip accompanies spend trip
Test each tier. Document who can override and for how long.
Spurlock Studios includes thin budgets in the pilot so unit cost is visible before Tier builds. /agentic · $1,500 · 5 days · /contact?intent=agentic-pilot. Parent doctrine remains the operating manual.
Closing note on kill switches
If you cannot freeze a job_type in one action, you do not yet control AI agent costs — you observe them. Put the freeze button next to the dashboard ops already opens. Carry token budget for agents in the run context from intake onward. Spurlock Studios wires this thinly in week one of the pilot because surprise invoices destroy trust faster than a mediocre draft. /agentic
One more operating rule
Publish the per-run cap next to the job contract so builders see the number while they prompt. Invisible caps get treated as suggestions; visible caps shape design.
Review cost per pass in the same meeting as quality scores. Separating those conversations is how teams ship expensive mediocrity with a green demo narrative.
FAQ
How do you control AI agent costs in production?
Enforce per-run and per-tenant budgets in the runner, cap revisions and tool calls, tier models by state, track cost per passing run, and install kill switches that abort and alert. Review cost beside quality weekly.
What is a practical token budget for agents?
Start from the business-acceptable cost per successful job, convert to tokens/USD with margin, attach at intake, decrement on each call, and escalate when exhausted. Carry remaining budget across handoffs.
Will cheaper models always save money?
No. If pass rate drops and revisions spike, total cost rises. Always measure cost per pass on a golden set before switching tiers.
How fast should a kill switch react?
Minutes, not months. Spend anomalies and error spikes should freeze or degrade automatically, then page a human. Batch monthly reviews are too slow for runaway loops.
Does Spurlock Studios include cost controls in builds?
Yes — budgets, caps, and kill switches are part of production agentic work, and thin versions ship in the pilot. See /agentic and the operating manual.
How do cost controls interact with evaluators?
Evaluators decide quality; cost controls decide whether another attempt is affordable. Both can send a run to escalate. Neither replaces the other.