TL;DR
This paper introduces Natural-Language Agent Harnesses (NLAHs) and an Intelligent Harness Runtime (IHR) that allow agent execution policies to be defined in editable natural language. This approach makes agent harnesses more inspectable, portable, and analyzable, while maintaining competitive task performance compared to traditional code-based harnesses.
What Problem Does This Paper Address?
Modern language-model agents are complex systems that rely on "harnesses" to manage their execution, including tool use, state management, error recovery, and validation. However, these harnesses are typically buried within tightly coupled controller code, making them difficult to understand, modify, compare, or debug. This opacity hinders the development and analysis of agent systems. The authors aim to externalize harness logic into a more accessible and scientific representation.
Methods
The core innovation is the separation of harness policy from execution mechanisms.
- Natural-Language Agent Harnesses (NLAHs): These are editable documents written in natural language that describe the harness policy for a given task. They define roles, stages, state rules, validation rules, recovery rules, and stopping conditions.
- Intelligent Harness Runtime (IHR): This is a shared runtime that interprets NLAHs and executes them by orchestrating agent calls, managing state, handling validation gates, and enforcing artifact contracts. IHR provides a consistent execution substrate, allowing NLAHs to be tested and analyzed.
The system is built on a base agent with terminal access, augmented by IHR's runtime policy and the NLAH. Deterministic code (scripts/adapters) is used for precise operations like testing and parsing.
Datasets
The paper evaluates NLAHs on three benchmark families:
- Coding: SWE-bench Verified (repository-grounded issue resolution).
- Terminal-use capability: Terminal-Bench 2.0 (long-horizon command-line tasks).
- Computer use: OSWorld (computer-use behavior in real desktop environments).
No new benchmarks were introduced; existing ones were used to evaluate the NLAH approach.
Key Insights and Ideas
- Separation of Concerns: Natural language is well-suited for defining harness policy (roles, contracts, evidence, strategy), while code is better for mechanisms (parsers, tool execution, sandboxing). This division makes harness design more manageable.
- Inspectability and Analyzability: By externalizing harness logic into NLAHs, researchers can more easily inspect, compare, and ablate different harness components, treating them as scientific objects.
- Module-Level Analysis: NLAHs enable the analysis of individual harness modules (e.g., file-backed state, verifier separation) to understand their specific impact on task performance and behavior.
- Flexibility vs. Rigidity: NLAHs offer more flexible routing and adaptation compared to rigid code harnesses, allowing agents to achieve similar outcomes through different concrete steps, as long as they meet the defined policy.
- Harness Engineering as a Science: The work lays the groundwork for a more systematic "science of harness representations," enabling retrieval, composition, and optimization of NLAH modules.
Key Results
- Competitive Task Performance: IHR-executed NLAHs achieved task outcomes comparable to native code harnesses and prompted NLAHs across coding, terminal-use, and computer-use benchmarks. For example, on Live-SWE, NLAH achieved 73.0% performance compared to 67.0% for code.
- Concise Harness Policies: NLAHs significantly reduce the static materials needed to represent harness logic. For Live-SWE, the policy was reduced from 60.1k tokens of code to a 2.9k-token NLAH.
- Preservation of Mechanisms: NLAHs, when executed by IHR, successfully materialized intended harness mechanisms like workflow structure, contract enforcement, tool use, and recovery.
- Module Impact: Ablation studies showed that specific NLAH modules, such as "file-backed state" and "self-evolution," provided significant performance gains, highlighting their importance. For instance, "file-backed state" improved performance by +2.6 on SWE and +13.9 on OSWorld.
- Cost Overhead: NLAHs incurred higher model call and token usage compared to code harnesses, attributed to the prototype runtime's general substrate and natural-language orchestration. However, this cost did not destroy task performance and is seen as an engineering target.
- Handoff Weakness: A notable weakness identified was lower orchestration reliability and information handoff recall compared to direct-context prompting, particularly in parent-child execution scenarios.
Limitations and Future Work
Limitations: * Natural-Language Imprecision: NLAHs can be underspecified or interpreted differently by models, necessitating code for exact mechanisms and run-time checks. * Interpretation Uncertainty: NLAHs may be interpreted differently across models. * Model Dependence: The effectiveness of NLAHs can be influenced by the underlying language model. * Cost and Safety Risks: While NLAHs offer benefits, production systems still need code for critical safety, permission, and parsing logic.
Future Work: * Harness Representation Science: Developing methods to retrieve, compose, mutate, and optimize NLAH modules. * Improving Runtime Efficiency: Reducing handoff loss, fixed context overhead, and redundant orchestration in the runtime. * Broader Impact: Exploring how portable harness logic and scripts can be used to spread robust workflows while mitigating risks of malicious use through provenance tracking, review, and sandboxing.
Summary updated