How to Cut Agent Token Bills: Technical Strategies to Tame Soaring Inference Costs
The article analyzes why AI agents' token consumption escalates—due to stateful execution, ReAct loops, and Plan‑and‑Solve architectures—and examines real‑world cases of massive token burn before presenting emerging model‑side budgeting, routing, and prompt‑compression techniques to reduce costs.
What causes the stepwise increase in Agent inference cost?
1. The stateful nature of agents requires persistent execution code and runtime error handling; without effective mitigation, small failures can cause token consumption to explode. [1-2]
2. Multi‑agent collaboration adds additional overhead: task allocation, state synchronization, and result aggregation. Anthropic data show that a single agent completing a standard task consumes about four times the tokens of a traditional single‑turn dialogue, while coordinated multi‑agent workflows can exceed fifteen times the baseline. [1-2]
ReAct reasoning paradigm
Agents using the ReAct paradigm decompose a task into repeated “think‑act” cycles. Each cycle re‑encodes the full conversation history, so token usage accumulates with the depth of the loop, and termination depends on task complexity, making cost hard to predict. [1-3]
Complex tasks may require dozens of think‑act cycles.
In edge cases agents can enter indefinite loops, leading to unbounded token growth. [1-3]
Plan‑and‑Solve architecture
When a task is first split into a planning phase and then executed step‑by‑step, each step triggers its own ReAct loops. The repeated context windows multiply the token count, adding another layer of cost amplification. [1-4]
Plan‑and‑Solve generates an ordered multi‑step plan, then executes each sub‑task sequentially, each invoking independent ReAct cycles. [1-4]
Real‑world incidents illustrating scale
In 2026 a MiHoYo engineer deployed dozens of agents for a multi‑agent test without a token cap; the agents ran for 13 hours and burned tokens worth roughly ¥2 million. [1-5]
OpenClaw founder Peter Steinberger disclosed that a three‑person team directing 100 Codex agents consumed 6.03 × 10¹² tokens and 7.6 million requests over 30 days, resulting in a $1.3 million bill. [1-6]
Cost‑reduction approaches emerging in the industry
Model vendors embed inference‑budget controls directly into the model.
Some open‑source projects add request‑level routing between agents and models to filter or batch calls.
Tools that remove redundant context from inputs or compress prompts to lower fixed token consumption.
Code example
1、过去数月,AI 智能体加速从实验室走向企业生产,企业通过 Harness 把 Agent 接入自动化流程。与此同时,Agent 的 Token 消耗量呈指数级上升,模型厂商希望企业扩大用量、企业希望控制成本,二者之间的诉求正在推动行业寻找技术降本的解法。[1-1]
① 智能体的有状态特性使其在长时运行中需持久化执行代码并处理过程性错误,小规模系统故障在缺乏有效缓解措施的条件下,可对智能体产生灾难性影响,导致 Token 消耗急剧膨胀。[1-2]
② 多智能体协作系统进一步放大这一成本压力。在单 Agent 循环消耗之外,Agent 间的任务分配、状态同步与结果汇总叠加了额外开销。Anthropic 团队研究数据表明,运行单一 Agent 完成一项标准任务的 Token 消耗量约为传统单轮对话的 4 倍,而多智能体协同架构下的 Token 消耗量达到标准对话的 15 倍以上。[1-2]
2、相比传统大语言模型的单轮请求-响应,Agent 采用的 ReAct 推理范式将任务拆解为多轮「思考-行动」循环,每轮均需重新编码完整历史上下文,Token 消耗随循环深度持续累积,且循环终止条件取决于任务复杂度,难以提前预估。[1-3]
① 在复杂任务中,Agent 可能需要数十轮推理-行动循环才能收敛到答案,边缘情况下 Agent 甚至可能陷入循环无法自行终止,导致 Token 消耗无上限增长。[1-3]
3、即使单次循环的成本尚可接受,当 Agent 采用 Plan-and-Solve 架构将任务拆解为数个甚至数十个执行步骤且每一步都独立触发 ReAct 式的多轮循环时,上下文窗口的累积增长便构成了成本放大的另一层因素。[1-4]
① Plan-and-Solve 是一种将任务分解为「先规划、再执行」两个阶段的提示架构,模型首先生成有序多步执行计划,随后逐步执行每个子任务。[1-4]Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
