arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.25850cs.CLcs.SE
收藏

代理 harness 工程:基于可观测性的自动进化编码代理 harness

Agentic Harness Engineering: Observability-Driven Automatic Evolution of Coding-Agent Harnesses

Fudan University(复旦大学);Peking University(北京大学);Shanghai Qiji Zhifeng Co., Ltd(上海启智锋科技有限公司)

Jiahang Lin, Shichun Liu, Chengjun Pan, Lizhi Lin, Shihan Dou, Zhiheng Xi, Xuanjing Huang, Hang Yan, Zhenhua Han, Tao Gui, Yu-Gang Jiang

AI总结:

本文提出了一种基于可观测性的代理 harness 工程方法,通过三个支柱解决 harness 工程中的挑战,使 harness 进化过程自动且可控,实验表明其在多个基准测试中表现优异。

摘要:

harness 现在是编码代理性能的核心,调解模型与工具和执行环境的交互方式。然而,harness 工程仍然是手工制作,因为自动化面临可编辑组件的异质动作空间、大量轨迹隐藏可操作信号以及编辑效果难以归因的挑战。我们引入了代理 harness 工程(AHE),一个闭环系统,通过三个匹配的可观测性支柱来解决这些挑战:(1)组件可观测性为每个可编辑的harness组件提供文件级表示,使动作空间明确且可回退;(2)经验可观测性将数百万个原始轨迹令牌提炼成分层、可深入查阅的证据库,使进化代理可以实际消耗;(3)决策可观测性将每个编辑与自我声明的预测配对,随后通过下一轮任务级结果验证。共同,这些支柱使每个编辑都成为可检验的合同,使harness进化过程自主进行而不陷入试错。实证上,十次AHE迭代使Terminal-Bench 2的pass@1从69.7%提升到77.0%,超过人工设计的harness Codex-CLI(71.9%)和自进化基线ACE和TF-GRPO。冻结的harness无需重新进化:在SWE-bench-verified中,它在比种子少12%的token上达到最高聚合成功率,并在Terminal-Bench 2上,相对于三个替代模型家族,产生+5.1到+10.1个百分点的跨家族增益,表明进化组件编码了通用工程经验而非基准特定调优。消融分析将增益局部化到工具、中间件和长期记忆,而非系统提示,表明事实性的harness结构转移,而语义层面的策略不转移。

英文摘要:

Harnesses are now central to coding-agent performance, mediating how models interact with tools and execution environments. Yet harness engineering remains a manual craft, because automating it faces a heterogeneous action space across editable components, voluminous trajectories that bury actionable signal, and edits whose effect is hard to attribute. We introduce Agentic Harness Engineering (AHE), a closed loop that addresses these challenges through three matched observability pillars: (1) component observability gives every editable harness component a file-level representation so the action space is explicit and revertible; (2) experience observability distills millions of raw trajectory tokens into a layered, drill-down evidence corpus that an evolving agent can actually consume; and (3) decision observability pairs every edit with a self-declared prediction, later verified against the next round's task-level outcomes. Together, these pillars turn every edit into a falsifiable contract, so harness evolution proceeds autonomously without collapsing into trial-and-error. Empirically, ten AHE iterations lift pass@1 on Terminal-Bench 2 from 69.7% to 77.0%, surpassing the human-designed harness Codex-CLI (71.9%) and the self-evolving baselines ACE and TF-GRPO. The frozen harness transfers without re-evolution: on SWE-bench-verified it tops aggregate success at 12% fewer tokens than the seed, and on Terminal-Bench 2 it yields +5.1 to +10.1pp cross-family gains across three alternate model families, indicating the evolved components encode general engineering experience rather than benchmark-specific tuning. Ablations localize the gain to tools, middleware, and long-term memory rather than the system prompt, suggesting factual harness structure transfers while prose-level strategy does not.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑