Agent Economics

How We Measure Token Waste in AI Agents

Published
Paper
How Do AI Agents Waste Your Money? (arXiv:2611.07238)
Code
github.com/huiminzeng/How_Do_AI_Agents_Waste_Your_Money
Data
huggingface.co/datasets/huiminz3/How_Do_AI_Agents_Waste_Your_Money
Links

Our earlier post 1 and post 2 focused on the findings from our token-waste analysis. This page introduces the framework behind those results.

Introduction

AI agents consume massive numbers of tokens, but how many of those tokens are really necessary? Token consumption and token waste are different quantities: a long trajectory may be expensive because the task genuinely needs many turns, while a short one may still spend most of its tokens repeating what it already knows. Aggregate token counts cannot tell the two apart. LLMaJ is a judge that can. It reads one complete agent trajectory and marks every span that could be deleted without changing the outcome, the marks are verified against the provider's own token accounting, and the result is a waste ratio in tokens and dollars, per turn, per trajectory and per model1.

Figure 1. Left: one trajectory as LLMaJ sees it, advancing turn by turn: the transcript with every removable span highlighted by kind, the task as a floor plan with the agent's route, and the tokens written, the removable tokens and the waste ratio so far. Right: the workflow that the judged trajectories of a customer-service benchmark follow, as a transition graph that simulated agents walk.

Three things make it usable as a tool rather than an opinion. It works on any agent, any benchmark and any harness: trajectories are normalized into one representation, so the same definition of waste applies across providers that expose their reasoning and providers that do not. It separates strict waste, which is directly avoidable, from detours, exploration that was reasonable at the time and unnecessary only in hindsight. And its marks are validated by intervention: delete what the judge marked, resume the agent, and the task outcome and the agent's next actions are largely unchanged.

What the judge finds when it is pointed at six frontier models on four benchmarks2,3,4,5, at four reasoning efforts and across six harnesses, is the subject of the paper and of two earlier posts here: how much of the output bill is waste and which tasks waste most6, and what more reasoning effort buys7. This post is about the tool itself, and about running it on your own agent: Play with LLMaJ, or hand skill.md to your coding agent and let it do the work.

Framework

The framework consists of three stages, namely tracing, identifying, and verifying (Figure 2). First, heterogeneous benchmarks and harnesses can be connected to the framework with only a few lines of code changes, and the resulting agent trajectories are normalized into a common representation across models, benchmarks, and harnesses. Second, token waste is defined as content that can be removed without eliminating useful work from the trajectory, and based on this definition, an LLM-as-a-Judge (LLMaJ) identifies such waste spans within reasoning, visible responses, and tool interactions. Finally, the identified waste is verified and quantified using token-counting tools provided by the original model providers, so wasted tokens and monetary cost are measured under each provider's native accounting scheme while the same span-level definition of waste applies across heterogeneous agent systems.

Overview of the framework: benchmark patching, proxy-based tracking, LLM-as-a-Judge, and the intervention check
Figure 2. The framework minimally instruments agent benchmarks, routes model interactions through a unified proxy for trajectory tracing, and uses LLM-based judges to annotate agent actions and identify token waste, followed by span-level verification and token measurement.

What the judge marks

Our definition of token waste follows a principle of minimalism, under which an agent trajectory should contain no more generated content than is necessary to preserve the useful work required for completing the task. Content is waste when it can be removed without eliminating useful work from the trajectory. Inspecting trajectories by hand, four patterns recur:

  • Restate: the agent repeats information that already exists in the current context, such as quoting a policy that is in the system prompt, paraphrasing a tool response, or restating the same plan before each step.
  • Duplicate-Fetch: a repeated tool call that retrieves information already available from previous turns and unchanged since.
  • Padding: text that does not help advance the task: preambles, sign-offs, restatements of the user's request, narration of an action immediately before performing it.
  • Detour: exploratory work that appears reasonable when attempted but turns out to be unnecessary: a plausible approach that leads nowhere, information retrieved and never used.

Restate, Duplicate-Fetch and Padding are strict waste: directly avoidable. Detours are kept apart, because exploration is sometimes necessary and an exploratory path can be reasonable given what was known at the time; they are unnecessary in hindsight and could be reduced through better optimization, not deleted outright.

Examples of the four waste patterns from real agent trajectories
Figure 3. Examples of the waste patterns drawn from real agent trajectories, with the judge's reason for each mark.

Is the marked waste really removable?

A judge that calls things waste is only useful if deleting them changes nothing. Before using the framework at scale, we validate whether the identified waste is consistent with the removability criterion, by intervening on real trajectories of Kimi-K3, the model whose reasoning is fully exposed, on SWE-bench Verified and MCP-Atlas.

  • Task outcomes. Remove the strict-waste spans marked before an intervention point and resume the agent from the next turn. Removing LLMaJ-identified strict waste generally preserves task performance; the first-turn intervention on MCP-Atlas is the main exception.
  • The next action. Remove the marked spans from the reasoning of previous turns and sample the agent's next action 16 times from the original and the intervened context. Measured by an energy-distance permutation test over the actions' tokens, deleting the marked waste shifts the next-action distribution in far fewer turns than deleting all previous reasoning does.
  • Online pruning. Let a judge restricted to Restate and Padding prune the current reasoning while the agent is running, and regenerate the action from the pruned reasoning. In these experiments 41-46% of the model's reasoning is removed while task performance is largely preserved on both benchmarks, where removing the reasoning entirely costs far more.

Together these support both the minimalism-based definition of token waste and the judge's ability to find content that can be removed with limited effect on agent behavior and task performance. The paper reports the three experiments in full.

Interactive demos

The two animations of Figure 1, live. The first replays one judged trajectory: pick one from the menu and watch the transcript, the floor plan and the token curves advance together. The second sends simulated agents through the transition graph measured on the τ²-bench trajectories; switch between the retail and airline domains.

Agent walk one trajectory, three views in stepopen full screen
Workflow swarm simulated agents on the τ²-bench transition graphopen full screen

Authors

Huimin Zeng, Yuxuan Lu, Jesse Cai, Eric Hanchen Jiang, Di Wu, Po-Nien Kung, Wenbo Hu, Ziyi Wang, Dakuo Wang, Jiaxin Pei, Kai-Wei Chang

References

  1. The framework: tracing proxy, benchmark patches and LLMaJ. github.com/huiminzeng/How_Do_AI_Agents_Waste_Your_Money.
  2. τ²-bench. github.com/sierra-research/tau2-bench.
  3. Claw-Eval. github.com/claw-eval/claw-eval.
  4. SWE-bench Verified, run with mini-swe-agent. swebench.com.
  5. MCP-Atlas. github.com/scaleapi/mcp-atlas.
  6. How Much Do AI Agents Waste on Tokens? agenteconomics.org/posts/ai-agent-token-waste.
  7. When More Reasoning Stops Paying Off. agenteconomics.org/posts/reasoning-effort-returns.
  8. The paper's labeled trajectories. huggingface.co/datasets/huiminz3/How_Do_AI_Agents_Waste_Your_Money.

Citation

Please cite the paper as:

@misc{zeng2026aiagentswastemoney,
  title         = {How Do AI Agents Waste Your Money?},
  author        = {Huimin Zeng and Yuxuan Lu and Jesse Cai and Eric Hanchen Jiang and Di Wu and Po-Nien Kung and Wenbo Hu and Ziyi Wang and Dakuo Wang and Jiaxin Pei and Kai-Wei Chang},
  year          = {2026},
  eprint        = {2611.07238},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CL},
  url           = {https://arxiv.org/abs/2611.07238}
}