Harness-Zero:通过Agent-as-Harness进行Harness蒸馏
研究论文 · 2026/09/22
Agent harness 是介导模型与环境交互的外部系统,能显著提升 agent 性能,但其收益在部署时仍绑定于该 harness。由于最佳 harness 因领域、实例和模型而异,通用 agent 要么接受次优的共享 harness,要么在日益增多的专用 harness 间路由。为此,本文研究 agent harness 蒸馏:将领域或实例优化的 harness 作为训练时指导,将其诱导的行为迁移到模型权重中,使收益在单一固定目标 harness 下依然保留。难点在于两个 harness 的动作空间和可用信息不同,优化 harness 的指导无法直接作为目标 harness 的监督。作者提出 Harness-Zero,通过 agent-as-harness 实现 harness 蒸馏:在优化 harness 指导下,一个 harnessing agent 在目标 harness 的动作空间中执行前修正学生响应,将 harness 指导转化为训练示范。对所得轨迹进行微调,将 harness 诱导的行为内化到模型中,从而在部署时移除专用 harness。实验涵盖知识工作、工具使用和科学领域,表明:(1) 对于使用同一进化 harness 的前沿 LLM,agent-as-harness 优于 code-as-harness。(2) 部署时移除专用 harness 后,Harness-Zero 将基础模型的宏平均任务成功率从 23.3% 提升至 44.3%,甚至超过仍附带该 harness 时的 41.7%。(3) Harness-Zero 恢复了基础模型中缺失的 harness 诱导行为,在三个领域的 28 种模式上平均恢复率达 82.3%。
该研究提出了一种将专用 agent harness 的收益蒸馏进模型权重的方法,使模型在部署时无需依赖特定 harness 即可获得性能提升,对构建通用且高效的 agent 系统具有重要参考价值。
Agent harnesses, the external systems that mediate model-environment interaction, can substantially improve agent performance, but their gains remain tied to the harness at deployment. Because the best harness varies across domains, instances, and models, a general-purpose agent must either settle for a suboptimal shared harness or route among an ever-growing set of specialized ones. We therefore study agent harness distillation: using a domain- or instance-optimized harness as training-time guidance and transferring the behaviors it induces into model weights, so that its gains survive under a single fixed target harness. The challenge is that the two harnesses differ in action space and available information, so guidance from the optimized harness cannot serve directly as supervision for the target one. We introduce Harness-Zero, which enables harness distillation through agent-as-harness. Guided by the optimized harness, a harnessing agent corrects student responses before execution in the target harness's action space, turning harness guidance into training demonstrations. Fine-tuning on the resulting trajectories internalizes harness-induced behavior into the model, so the specialized harness can be removed at deployment. Our experiments spanning knowledge work, tool use, and science domains show that: (1) For frontier LLMs using the same evolved harness, agent-as-harness outperforms code-as-harness. (2) With the specialized harness removed at deployment, Harness-Zero improves the base model's macro-average task success from 23.3% to 44.3%, even exceeding the 41.7% it reaches with that harness still attached. (3) Harness-Zero recovers harness-induced behaviors absent from the base model, with 82.3% average recovery across 28 patterns in the three domains.