Large language models are increasingly deployed as agents for long-horizon tasks, yet their performance is shaped not only by model capability and environment design, but also by the harness that mediates agent--environment interaction. Existing harnesses are largely manually engineered, making them difficult to scale as trajectories grow longer and interactions become more complex. In this work, we ask whether harness can be generated by a learnable plug-in module that can be trained in an end-to-end fashion. We introduce HarnessBridge, a lightweight learnable harness controller that parameterizes the agent--environment interface as a bidirectional projection. HarnessBridge learns two bidirectional projections: observation projection, which distills raw trajectories into compact, decision-relevant states, and action projection, which converts proposed actions into executable transitions or trajectory-grounded rejections. We train HarnessBridge on a harness supervision dataset via unified instruction tuning. On Terminal-Bench~2.0 and SWE-bench Verified, HarnessBridge matches or surpasses strong specialized harnesses while substantially reducing token usage and trajectory length, and generalizes from smaller generators to larger commercial models.
翻译:大语言模型越来越多地被部署为执行长周期任务的智能体,其性能不仅受模型能力和环境设计的影响,还受到调节智能体-环境交互的“调控器”(Harness)的制约。现有调控器大多依赖人工设计,随着轨迹长度增加和交互复杂性提升,难以扩展。本文探讨调控器能否由可学习的插件模块生成,并以端到端方式训练。我们提出HarnessBridge——一种轻量级可学习调控控制器,将智能体-环境接口参数化为双向投影。HarnessBridge学习两种双向投影:观测投影将原始轨迹浓缩为紧凑、与决策相关的状态;动作投影将提议动作转换为可执行的状态转移或基于轨迹的拒绝。我们通过统一指令微调,在调控监督数据集上训练HarnessBridge。在Terminal-Bench~2.0和SWE-bench Verified基准上,HarnessBridge匹配甚至超越强专用调控器,同时显著降低token使用量和轨迹长度,并能从小规模生成器泛化至大型商业模型。