An AI agent cost audit should start with wakeups, session lifetime, blocker handling, context reuse, and model routing. In a production swarm of 49 agents, changing those operating rules reduced projected API cost from $811.52 per day to $457.25 per day without making the company less agentic.
The audit window recorded 772,308,810 input tokens, 708,412,416 cached input tokens, 4,594,415 output tokens, and $811.52 in API cost over 24 hours. Those totals looked like a model-pricing problem. The run history showed something else: routine workers used frontier capacity, stale sessions remained active, and agents woke up to repeat blockers that had not changed.
The bill was an orchestration trace
An agent invoice is not only a record of model consumption. It is a compressed view of scheduling choices. Hourly heartbeats, repeated context, retries, idle conversations, and work with no actionable next step all become paid tokens.
OpenAI describes tracing and observability for agent workflows as a way to inspect execution and optimize performance. That is the right starting point. Map every run to a trigger, an owner, an output, and a state change. A wakeup that produces no useful change should not hide inside an aggregate token total.
- Trigger: Was the run scheduled, event-driven, or retried?
- Work: Did the agent receive a real task or only re-read unchanged state?
- Result: Did it create an artifact, decision, escalation, or verified update?
- Lifecycle: Did the session close when the work ended?
This also changes how founders read cached usage. OpenAI documents that prompt caching can reduce cost and latency when applications reuse prompt prefixes. Cached input can be valuable, but a cache discount does not make an unnecessary run useful. First remove the run. Then improve the cost of the runs that remain.
Four operating changes removed the waste
The repair did not begin with a cheaper model. Executive agents moved to hourly runs because their role justified a regular pulse. Non-executive workers became issue-driven. Idle sessions were cleaned after work ended. Stale blockers were normalized so they did not wake the system merely to report that nothing had moved.
The next 14.13 hours projected to 326,697,063 input tokens per day, 274,728,048 cached input tokens per day, 2,661,576 output tokens per day, and $457.25 in daily API cost. That implied $354.27 in daily savings, $10,628.14 in monthly savings, and a 43.7% cost reduction.
Model routing still matters, but it comes after workflow evidence. Our guide to moving agents to a cheaper model safely explains why capability changes need representative tests. Before that decision, inspect the larger source of waste described in the context layer of an AI bill. Repeated history and oversized instructions can dominate spend even when output stays small.
Make cost control part of the agent contract
Every production agent needs a reason to wake, a bounded context, a completion condition, and a rule for escalation. Add a cost view to those controls. Track runs by trigger, task type, model, input, cached input, output, result, and whether a human accepted the work.
Do not accept a savings claim because an agent generated a tidy report. The case behind three checks for agent-generated metrics shows why source evidence, arithmetic, and independent verification belong in the workflow. The same rule applies to projected savings. Preserve the before window, the changed rules, the after window, and the calculation.
A cost audit should finish with a small operating table: which agents keep scheduled runs, which become event-driven, when sessions expire, how blockers are represented, and which tasks merit frontier capacity. That turns a one-time cleanup into a durable margin control.
Frequently Asked Questions
Start with run triggers, wakeup frequency, session lifetime, repeated context, stale blockers, retries, and model routing. These controls reveal whether spend is attached to useful work.
No. Caching can lower the cost of repeated input, but an unnecessary run remains unnecessary. Remove empty wakeups before optimizing the price of retained runs.
Usually not. Confirm that the workflow is necessary and bounded, then test whether a cheaper model preserves accepted task quality on representative work.
Keep the before window, changed operating rules, after window, token categories, API cost, and arithmetic. Have a separate reviewer check that the comparison uses equivalent workload assumptions.
If your agent bill is growing faster than useful output, book a consultation to map the wakeups, context, and routing decisions that should be fixed first.
