Agency:不改模型也能让 Claude Code 等智能体框架省 35% 成本
System Optimizations for Cost-Efficient Agent Harnesses
这篇论文发现智能体的钱主要花在 harness 层而不是模型上,同一任务换个提示词和工具配置能差 2.6 倍成本。作者做了个叫 Agency 的平台,直接套在 Claude Code 和 OpenAI Codex 上就能省 35% 花费,准确率不掉。天天跑 agent 的开发团队值得把这套思路抄过去。
arXiv 论文(编号 2611.12122)研究了智能体 harness 层面的成本优化空间。论文指出,任务准确率主要由底层 LLM 决定,而 harness 侧的变动(如系统提示词、工具配置)对准确率影响很小,却能让同一模型同一任务的成本相差最多 2.6 倍。
作者通过分析多份 agent trace 的成本积累模式,找出了减少 token 消耗和 LLM 调用次数的系统级优化机会。据此他们构建了 Agency,一个 harness 介入平台,提供统一抽象层,可以在 Claude Code、OpenAI Codex 等现成框架上以可移植的方式实现这些优化,无需修改模型。
基于 Agency 实现的原型优化技术在多个真实基准上取得最高 35% 的成本降低,且不损失任务准确率。对大量使用 Claude Code、Codex 等框架跑智能体负载的团队而言,这类 harness 层优化是比换模型更直接的降本路径。
System Optimizations for Cost-Efficient Agent Harnesses
AI agent harnesses play the critical role of providing LLMs with an interface to a computing environment. Recent studies show that AI agents' task-execution accuracy depends mostly on the LLM used, while harness-side variances such as system prompts or tools have minimal impact. Rather, such harness-side variances show a larger impact on the cost of agent executions, achieving cost reductions up to 2.6 times on the same model and task. To further explore these harness-side cost optimization opportunities, we analyze the cost accumulation patterns across various agent traces and identify system opportunities to reduce token use and LLM calls without modifying the model or affecting task accuracy. Based on this analysis, we design Agency, a harness interposition platform that provides a unified abstraction and allows easy and portable implementation of harness-side system optimizations on existing off-the-shelf harnesses such as Claude Code or OpenAI Codex. Using Agency, we implement proof-of-concept optimization techniques based on our analysis and achieve cost reductions up to 35% across various real-world benchmarks on existing harnesses without compromising accuracy.
This report is categorized under AITOP's "Papers" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Claude Code, OpenAI Codex, 智能体, 成本优化.
Primary source verification: published directly by arXiv: OpenAI with first-party authority.