Concept animation

Hero diagram

Paper: 2603.25723 Authors: Linyue Pan, Lexiao Zou, Shuo Guo, Jingchen Ni, Hai-Tao Zheng Categories: cs.CL, cs.AI

The Gap

Agent systems are getting powerful, but their performance increasingly depends on “harness engineering” — the scaffolding that orchestrates tool calls, manages state, handles errors, and controls execution flow. The problem: this critical logic is scattered across controller code, runtime-specific conventions, and undocumented tribal knowledge. You can’t easily compare harnesses across systems, migrate them between runtimes, or study them as scientific objects. Each team reinvents the wheel in their own codebase.

Prior work focused on improving agent models or tool interfaces, but treated the harness as implementation detail. The gap: no portable, inspectable representation of harness logic that separates “what to do” from “how to execute it.”

Problem: Harness logic buried in code
    |
    v
Assumption: High-level control can be externalized
    |
    v
Method: Natural-language harnesses + shared runtime
    |
    v
Evidence: Controlled evals on coding/computer-use tasks
    |
    v
Conclusion: Text harnesses match code harnesses, enable transfer

The Increment

One sentence: Before this paper, agent harnesses were runtime-specific code artifacts; after, they can be portable natural-language documents executed by a shared runtime.

Core Mechanism

The system has two parts: Natural-Language Agent Harnesses (NLAHs) and Intelligent Harness Runtime (IHR). An NLAH is a text document describing control flow — when to call tools, how to handle errors, what to do with outputs. It reads like a recipe or protocol. The IHR is the execution engine that interprets these text instructions.

The IHR works through three components: explicit contracts (formal interfaces between harness and tools), durable artifacts (persistent state like files and logs), and lightweight adapters (thin translation layers for different tool APIs). When you feed an NLAH to the IHR, it parses the natural language, maps instructions to tool calls via contracts, maintains state in artifacts, and uses adapters to talk to actual tools.

NLAH (text document)
    |
    v
IHR Parser --> Instruction sequence
    |
    +---> Contract layer (tool interfaces)
    |
    +---> Artifact manager (state persistence)
    |
    +---> Adapter layer (tool-specific translation)
    |
    v
Tool execution --> Results --> Next instruction

Think of it like a restaurant kitchen. Traditional agent systems are like having each chef memorize their own version of every recipe, with instructions mixed into their muscle memory. This paper separates the recipe (NLAH) from the kitchen equipment (IHR). The recipe is written in plain language: “sauté onions until translucent, then add garlic.” The kitchen (IHR) has standardized equipment (contracts), prep stations that remember what’s been done (artifacts), and adapters so the same recipe works whether you have a gas or electric stove. A new chef can walk in, read the recipe, and the kitchen handles the execution details. You can compare recipes side-by-side, improve them, or port them to a different kitchen without rewriting everything.

Key Concepts

  • Harness: The control logic that orchestrates an agent’s behavior — not the model itself, but the scaffolding around it. It decides when to call which tools, how to chain operations, what to do when things fail, and when to stop. In traditional systems, this is hardcoded in Python or JavaScript. Here, it’s externalized as editable text. Think of it as the difference between a program’s source code and its compiled binary — the harness is the “source” of agent behavior, and making it readable/editable is the key move.

  • Contract: A formal interface specification between the harness and tools. Instead of the harness directly calling subprocess.run() or requests.post(), it invokes abstract operations like “execute_command” or “read_file” defined in contracts. The IHR maps these to actual implementations. This is what makes harnesses portable — the same harness text works across different tool backends as long as they satisfy the contract. It’s like USB-C: the device doesn’t care if it’s plugged into a laptop or a wall charger, as long as the contract (voltage, protocol) is met.

  • Durable Artifact: Persistent state that survives across agent steps. Traditional agents often lose context between tool calls or rely on fragile in-memory state. Durable artifacts are files, logs, or structured data that the harness explicitly manages. If the agent crashes and restarts, it can resume by reading artifacts. This makes agent behavior more inspectable (you can see what happened) and debuggable (you can replay from artifacts). It’s like version control for agent execution — every meaningful state change leaves a trace.

Framework Shift

Before (mainstream approach):        After (this paper):

Agent Model                          Agent Model
    |                                    |
    v                                    v
Controller Code                      NLAH (text document)
  [Python/JS]                          [natural language]
  - tool calls                           |
  - error handling                       v
  - state management                 IHR (shared runtime)
  - flow control                       [interpreter]
    |                                  - contracts
    v                                  - artifacts
Runtime-specific                       - adapters
tool bindings                            |
    |                                    v
    v                                Tool backends
Tools                                (any runtime)

From embedded control logic to externalized declarative harnesses, the core shift is making agent orchestration a first-class, portable artifact instead of implementation detail.

Expert Assessment

Problem choice: Real gap. As agent systems scale, harness engineering is becoming a bottleneck — teams waste time reimplementing the same patterns, and there’s no systematic way to study what makes a good harness. This sits at the intersection of software engineering and AI systems, which is timely given the proliferation of agent frameworks.

Method maturity: Clever insight with pragmatic execution. The natural-language representation is not just a gimmick — it genuinely enables portability and inspection. The contract/artifact/adapter architecture is sound software engineering. However, the paper doesn’t deeply explore the limits of natural language for expressing complex control flow (what about loops, conditionals, parallelism?). The IHR’s parsing and execution logic likely has edge cases not discussed.

Experimental integrity: Baselines are fair — they compare code harnesses vs text harnesses on the same tasks. The controlled ablations (removing contracts, artifacts, adapters) are well-designed. Numbers look reasonable, though the paper would benefit from more failure case analysis. One concern: the migration experiments (code → text) don’t show whether the text harnesses are actually more maintainable long-term, just that they work initially.

Writing quality: The abstract and intro are strong, but the method section gets dense with architectural details. The paper would benefit from more concrete examples of NLAH syntax early on — readers need to see what these text harnesses actually look like before diving into the runtime. The related work section is thorough but could be tighter.

Verdict: weak accept — Solid contribution to an emerging problem, with a practical solution that enables new research directions. The idea of externalizing harness logic is valuable, and the execution is competent. Not groundbreaking, but a useful step forward that others will build on.

Takeaways

Separation of concerns pays off: If you’re building agent systems, consider separating orchestration logic from execution. Even if you don’t use natural language, having a declarative layer (config files, DSLs) makes systems easier to debug and evolve.

Contracts enable portability: Define explicit interfaces between your agent’s control logic and tools. This lets you swap tool implementations without rewriting the agent. Useful for testing (mock tools) and deployment (different backends for dev vs prod).

Durable artifacts for debuggability: Instead of relying on logs or print statements, have your agent write structured state to files at key points. When things break, you can inspect exactly what the agent was thinking. This is especially valuable for long-running agents where in-memory state is fragile.

Natural language as executable spec: For domains where non-programmers need to understand or modify agent behavior (e.g., compliance, domain experts), text-based harnesses lower the barrier. The trick is keeping the language constrained enough to be unambiguous while readable enough to be useful.

论文: 2603.25723 作者: Linyue Pan, Lexiao Zou, Shuo Guo, Jingchen Ni, Hai-Tao Zheng 分类: cs.CL, cs.AI

缺口

智能体系统越来越强大,但性能越来越依赖”线束工程”——编排工具调用、管理状态、处理错误、控制执行流程的脚手架。

问题在于:这些关键逻辑散落在控制器代码、运行时特定的约定、以及未成文的部落知识中。

你无法轻易地跨系统比较线束,无法在不同运行时之间迁移它们,也无法把它们当作科学对象来研究。

每个团队都在自己的代码库里重新发明轮子。

此前的工作聚焦于改进智能体模型或工具接口,但把线束当作实现细节。

缺口在于:没有可移植、可检视的线束逻辑表示,能把”做什么”和”怎么执行”分离开。

问题:线束逻辑深埋在代码中
    |
    v
假设:高层控制可以外化
    |
    v
方法:自然语言线束 + 共享运行时
    |
    v
证据:编程/计算机使用任务的受控评估
    |
    v
结论:文本线束匹配代码线束,支持迁移

增量

一句话: 这篇论文之前,智能体线束是运行时特定的代码制品;之后,它们可以是由共享运行时执行的可移植自然语言文档。

核心机制

系统分两部分:自然语言智能体线束(NLAH)和智能线束运行时(IHR)。

NLAH 是描述控制流的文本文档——何时调用工具、如何处理错误、如何处理输出。

读起来像食谱或协议。

IHR 是解释这些文本指令的执行引擎。

IHR 通过三个组件工作:显式契约(线束与工具之间的正式接口)、持久制品(文件和日志等持久状态)、轻量适配器(不同工具 API 的薄翻译层)。

当你把 NLAH 喂给 IHR 时,它解析自然语言,通过契约将指令映射到工具调用,在制品中维护状态,并使用适配器与实际工具对话。

NLAH(文本文档)
    |
    v
IHR 解析器 --> 指令序列
    |
    +---> 契约层(工具接口)
    |
    +---> 制品管理器(状态持久化)
    |
    +---> 适配器层(工具特定翻译)
    |
    v
工具执行 --> 结果 --> 下一条指令

把它想象成餐厅厨房。

传统智能体系统就像让每个厨师记住自己版本的每道菜谱,指令混在肌肉记忆里。

本文把菜谱(NLAH)和厨房设备(IHR)分开。

菜谱用白话写:“炒洋葱至半透明,然后加蒜”。

厨房(IHR)有标准化设备(契约)、记住已完成工作的备菜台(制品)、以及适配器,让同一菜谱在燃气灶或电磁炉上都能用。

新厨师走进来,读菜谱,厨房处理执行细节。

你可以并排比较菜谱、改进它们、或把它们移植到不同厨房,而不用重写一切。

关键概念

  • 线束(Harness): 编排智能体行为的控制逻辑——不是模型本身,而是围绕它的脚手架。

它决定何时调用哪些工具、如何链接操作、失败时做什么、何时停止。

在传统系统中,这是用 Python 或 JavaScript 硬编码的。

这里,它被外化为可编辑的文本。

想想程序源代码和编译后二进制文件的区别——线束是智能体行为的”源代码”,让它可读/可编辑是关键动作。

  • 契约(Contract): 线束与工具之间的正式接口规范。

线束不直接调用 subprocess.run()requests.post(),而是调用契约中定义的抽象操作,如”execute_command”或”read_file”。

IHR 将这些映射到实际实现。

这让线束可移植——只要工具后端满足契约,同一线束文本就能跨不同后端工作。

就像 USB-C:设备不在乎插的是笔记本还是墙充,只要契约(电压、协议)满足即可。

  • 持久制品(Durable Artifact): 跨智能体步骤存活的持久状态。

传统智能体常在工具调用之间丢失上下文,或依赖脆弱的内存状态。

持久制品是线束显式管理的文件、日志或结构化数据。

如果智能体崩溃重启,它可以通过读取制品恢复。

这让智能体行为更可检视(你能看到发生了什么)、更可调试(你能从制品重放)。

就像智能体执行的版本控制——每个有意义的状态变化都留下痕迹。

框架转变

之前(主流方法):                之后(本文方法):

智能体模型                        智能体模型
    |                                |
    v                                v
控制器代码                        NLAH(文本文档)
  [Python/JS]                      [自然语言]
  - 工具调用                          |
  - 错误处理                          v
  - 状态管理                      IHR(共享运行时)
  - 流程控制                        [解释器]
    |                              - 契约
    v                              - 制品
运行时特定的                        - 适配器
工具绑定                              |
    |                                v
    v                            工具后端
工具                              (任意运行时)

从嵌入式控制逻辑到外化的声明式线束,核心转变是让智能体编排成为一等公民、可移植的制品,而非实现细节。

专家评审

选题眼光: 真实缺口。

随着智能体系统规模扩大,线束工程正成为瓶颈——团队浪费时间重新实现相同模式,且没有系统化方法研究什么是好线束。

这处于软件工程和 AI 系统的交叉点,考虑到智能体框架的激增,时机恰当。

方法成熟度: 巧妙洞察加务实执行。

自然语言表示不只是噱头——它真正实现了可移植性和可检视性。

契约/制品/适配器架构是扎实的软件工程。

但论文没有深入探索自然语言表达复杂控制流的极限(循环、条件、并行怎么办?)。

IHR 的解析和执行逻辑可能有未讨论的边界情况。

实验诚意: 基线公平——在相同任务上比较代码线束和文本线束。

受控消融(移除契约、制品、适配器)设计良好。

数字看起来合理,但论文会受益于更多失败案例分析。

一个担忧:迁移实验(代码→文本)没有显示文本线束长期是否真的更易维护,只是显示它们最初能工作。

写作功力: 摘要和引言很强,但方法部分在架构细节上变得密集。

论文会受益于更早展示 NLAH 语法的具体例子——读者需要在深入运行时之前看到这些文本线束实际长什么样。

相关工作部分很全面但可以更紧凑。

判决: 弱接收——对新兴问题的扎实贡献,实用解决方案开启新研究方向。

外化线束逻辑的想法有价值,执行称职。

不是突破性的,但是有用的前进步伐,其他人会在此基础上构建。

要点总结

关注点分离有回报: 如果你在构建智能体系统,考虑分离编排逻辑和执行。

即使不用自然语言,有声明式层(配置文件、DSL)也让系统更易调试和演化。

契约实现可移植性: 在智能体控制逻辑和工具之间定义显式接口。

这让你无需重写智能体就能交换工具实现。

对测试(模拟工具)和部署(开发和生产的不同后端)有用。

持久制品提升可调试性: 不依赖日志或打印语句,让智能体在关键点将结构化状态写入文件。

出问题时,你能准确检视智能体在想什么。

这对长时间运行的智能体特别有价值,因为内存状态很脆弱。

自然语言作为可执行规范: 对于非程序员需要理解或修改智能体行为的领域(如合规、领域专家),基于文本的线束降低门槛。

诀窍是让语言足够受约束以保持无歧义,同时足够可读以保持有用。