Code as Agent Harness

📄 arXiv: 2605.18747v1 📥 PDF

作者: Xuying Ning, Katherine Tieu, Dongqi Fu, Tianxin Wei, Zihao Li, Yuanchen Bei, Jiaru Zou, Mengting Ai, Zhining Liu, Ting-Wei Li, Lingjie Chen, Yanjun Zhao, Ke Yang, Bingxuan Li, Cheng Qian, Gaotang Li, Xiao Lin, Zhichen Zeng, Ruizhong Qiu, Sirui Chen, Yifan Sun, Xiyuan Yang, Ruida Wang, Rui Pan, Chenyuan Yang, Dylan Zhang, Liri Fang, Zikun Cui, Yang Cao, Pan Chen, Dorothy Sun, Ren Chen, Mahesh Srinivasan, Nipun Mathur, Yinglong Xia, Hong Li, Hong Yan, Pan Lu, Lingming Zhang, Tong Zhang, Hanghang Tong, Jingrui He

分类: cs.CL, cs.AI

发布日期: 2026-05-18

备注: GitHub: https://github.com/YennNing/Awesome-Code-as-Agent-Harness-Papers


💡 一句话要点

提出“代码即Agent Harness”统一视角,研究代码在智能体系统中的核心作用。

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 智能体系统 代码生成 代码理解 Agent Harness 自动化 多智能体系统

📋 核心要点

  1. 现有智能体系统在推理、行动和环境建模方面面临挑战,代码在其中扮演的角色需要重新审视。
  2. 论文提出“代码即Agent Harness”的统一视角,将代码视为智能体基础设施的核心,连接推理、行动和环境。
  3. 该研究总结了代码在智能体系统中的应用,并概述了Harness工程的开放挑战,为未来研究提供路线图。

📝 摘要(中文)

近期的大型语言模型(LLMs)在理解和生成代码方面表现出强大的能力,从竞技编程到仓库级别的软件工程。在新兴的智能体系统中,代码不再仅仅是目标输出,它越来越多地作为智能体推理、行动、环境建模和基于执行的验证的操作基础。我们通过智能体Harness的视角来构建这种转变,并引入“代码即Agent Harness”:一个统一的视角,将代码作为智能体基础设施的基础。为了系统地研究这个视角,我们将调查围绕三个相互连接的层组织。首先,我们研究Harness接口,其中代码将智能体连接到推理、行动和环境建模。其次,我们检查Harness机制:用于长时程执行的规划、记忆和工具使用,以及使Harness可靠和自适应的反馈驱动的控制和优化。第三,我们讨论将Harness从单智能体系统扩展到多智能体设置,其中共享的代码工件支持多智能体协调、审查和验证。在这些层面上,我们总结了代码作为智能体Harness的代表性方法和实际应用,涵盖编码助手、GUI/OS自动化、具身智能体、科学发现、个性化和推荐、DevOps以及企业工作流程。我们进一步概述了Harness工程的开放挑战,包括超越最终任务成功的评估、不完整反馈下的验证、无回归的Harness改进、多个智能体之间一致的共享状态、安全关键行动的人工监督以及多模态环境的扩展。通过将代码作为智能体AI的Harness中心,本调查提供了一个通向可执行、可验证和有状态的AI智能体系统的统一路线图。

🔬 方法详解

问题定义:现有智能体系统在推理、行动和环境建模方面面临挑战。代码在智能体系统中的作用日益重要,但缺乏一个统一的视角来理解和利用代码在其中的潜力。现有的方法通常将代码视为最终输出,而忽略了其作为智能体基础设施的潜力。

核心思路:论文的核心思路是将代码视为智能体系统的“Harness”,即一个连接智能体各个组件(推理、行动、环境建模)的基础设施。通过将代码置于中心地位,可以更好地理解和利用代码在智能体系统中的作用,从而构建更强大、更可靠的智能体。

技术框架:该研究围绕三个相互连接的层组织:Harness接口、Harness机制和多智能体Harness。Harness接口关注代码如何连接智能体的推理、行动和环境建模。Harness机制研究用于长时程执行的规划、记忆和工具使用,以及反馈驱动的控制和优化。多智能体Harness探讨如何利用共享的代码工件支持多智能体协调、审查和验证。

关键创新:最重要的技术创新点在于提出了“代码即Agent Harness”的统一视角。与现有方法不同,该视角将代码视为智能体基础设施的核心,而不是仅仅将其视为最终输出。这种视角转变有助于更好地理解和利用代码在智能体系统中的作用。

关键设计:论文没有提出具体的算法或模型,而是一个概念框架。关键设计在于将智能体系统分解为三个层次,并分析代码在每个层次中的作用。此外,论文还强调了Harness工程的开放挑战,例如超越最终任务成功的评估、不完整反馈下的验证等。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

该论文是一篇综述性文章,没有具体的实验结果。其亮点在于提出了“代码即Agent Harness”的统一视角,并系统地总结了代码在智能体系统中的应用。此外,论文还概述了Harness工程的开放挑战,为未来的研究方向提供了指导。

🎯 应用场景

该研究的潜在应用领域包括编码助手、GUI/OS自动化、具身智能体、科学发现、个性化和推荐、DevOps以及企业工作流程。通过将代码作为智能体Harness,可以构建更智能、更高效的自动化系统,提高生产力并解决复杂问题。未来,该研究有望推动智能体技术在各个领域的广泛应用。

📄 摘要(原文)

Recent large language models (LLMs) have demonstrated strong capabilities in understanding and generating code, from competitive programming to repository-level software engineering. In emerging agentic systems, code is no longer only a target output. It increasingly serves as an operational substrate for agent reasoning, acting, environment modeling, and execution-based verification. We frame this shift through the lens of agent harnesses and introduce code as agent harness: a unified view that centers code as the basis for agent infrastructure. To systematically study this perspective, we organize the survey around three connected layers. First, we study the harness interface, where code connects agents to reasoning, action, and environment modeling. Second, we examine harness mechanisms: planning, memory, and tool use for long-horizon execution, together with feedback-driven control and optimization that make harness reliable and adaptive. Third, we discuss scaling the harness from single-agent systems to multi-agent settings, where shared code artifacts support multi-agent coordination, review, and verification. Across these layers, we summarize representative methods and practical applications of code as agent harness, spanning coding assistants, GUI/OS automation, embodied agents, scientific discovery, personalization and recommendation, DevOps, and enterprise workflows. We further outline open challenges for harness engineering, including evaluation beyond final task success, verification under incomplete feedback, regression-free harness improvement, consistent shared state across multiple agents, human oversight for safety-critical actions, and extensions to multimodal environments. By centering code as the harness of agentic AI, this survey provides a unified roadmap toward executable, verifiable, and stateful AI agent systems.