GitHub - google-research/harness2
Service

GitHub - google-research/harness2

google-research
2026.10.17
·GitHub·by igor
#Agent#AI Framework#Harnessing#Open World#Recursion

Key Points

  • 1Harness² is a plug-and-play framework for recursive agent harnessing that optimizes agent systems in open-world environments without requiring model weight updates.
  • 2The system utilizes task-level recursion through a Propose–Probe–Compose workflow to refine execution harnesses and employs harnessing-level recursion to accumulate evidence-based improvements across tasks.
  • 3Experimental results demonstrate that Harness² significantly boosts performance across professional benchmarks like JobBench and WorkBuddy-Bench by iteratively enhancing harness components such as prompts, tools, and guardrails.

Harness²: Recursive Agent Harnessing for an Open World

Harness² is a framework designed for the recursive optimization of agentic systems in open-world environments. Recognizing that agents often encounter tasks unseen during their initial design, the framework treats the "harness"—the orchestration layer surrounding a fixed model—as a dynamic, improvable entity. It utilizes two distinct but interconnected levels of recursion to refine performance without requiring modifications to the underlying model weights.

Core Methodology: Recursive Agent Harnessing

The framework operates on two hierarchical levels of recursion to improve agent efficacy:

#### 1. Task-Level Recursion: Propose–Probe–Compose
For a specific task, the framework employs a contrastive methodology to refine the execution harness. This process consists of three technical stages:

  • Propose: The agent generates candidate modifications to the eight editable harness components: system prompts, guardrails, memory, tool guidance, subagents, skills, scripts, and plugins.
  • Probe: These candidate harnesses are executed on the task in a simulated environment to collect behavioral evidence, allowing the system to observe how variations in the harness influence outcomes.
  • Compose: The system analyzes the differences between execution outcomes (behavioral contrasts) to synthesize a refined, high-performing harness. This is achieved without ground-truth feedback, relying instead on the relative success of various configurations.

#### 2. Harnessing-Level Recursion
This level governs the persistence and evolution of the agent’s intelligence over time. After completing a task, the framework integrates the adopted harness and evidence-based lessons into a persistent improvement harness. This accumulated knowledge informs the refinement process for subsequent, unseen tasks, creating a virtuous cycle of capability growth.

Operational Modes

Harness² offers two distinct strategies to manage the task-level recursion budget (KK):
  • Parallel Recursion: The framework explores KK candidate harnesses simultaneously. It probes both general and domain-specific candidates, composing the final result from the aggregated evidence of these parallel executions. This emphasizes breadth in the search space.
  • Sequential Recursion: The framework iteratively refines the harness over KK successive steps. Each step builds upon the previous, refining the configuration through deep, incremental improvements.

Benchmarking and Performance

The framework supports professional evaluation benchmarks, including JobBench (professional work), LAB (legal work), and WorkBuddy-Bench (office/code/web automation). Experimental results demonstrate significant performance improvements for models such as GLM-5 and Gemini 3.5 Flash. Specifically, the framework achieved gains of up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench, and an 11.8 percentage point increase in the partial pass rate for LAB.

Technical Implementation

Harness² is designed as a plug-and-play architecture that supports:
  • Tooling: Integration with OpenCode and Codex executors.
  • Environment: Support for Linux, Python 3.12, and Docker for sandbox execution.
  • Modular Control: By exposing eight distinct components, the framework allows for granular control over context construction, tool interface, and subagent delegation, ensuring that the agent's behavior is optimized within the tool loop through systemic adjustments rather than model-level retraining.