Skip to main content
Back

Ends Soon: Get 20% off all AlphaSignal Pro subscriptions. Subscribe here.

Google's Harness² Boosts AI Agent Performance 11.8 Points Without Touching the Model

Google Research open-sourced Harness², a framework that auto-tunes the prompts, tools, and memory around frozen models to boost agent performance on unseen tasks.

Pro

  • Google Research released Harness², a framework for recursive agent harnessing with frozen model weights.
  • Optimizes eight components: system prompt, guardrails, memory, tool guidance, subagents, skills, scripts, plugins.
  • Reports up to 11.8 point gains on LAB, 11.5 on WorkBuddy-Bench, 4.5 on JobBench.
  • Two recursion modes: parallel explores wider, sequential refines deeper via Propose–Probe–Compose steps.
  • Supports GLM-5, Gemini 3.5 Flash, OpenCode and Codex executors across three professional benchmarks.
  • Apache 2.0 licensed, Python 3.12, paper on arXiv, requires sandboxed network for honest evaluation.

Google Research has released Harness², an Apache 2.0 framework that automatically revises the prompts, tools, memory, and orchestration logic surrounding a language model. Model weights remain fixed while the framework executes candidate revisions, compares their behavior, and carries supported lessons into later tasks.

An execution harness is the software layer that turns a language model into an agent. It supplies instructions, tools, stored context, delegation rules, and control flow. Harness² turns the manual process of tuning that layer into a repeatable search procedure, trading additional inference and execution compute for automated optimization.

Nested loops turn edits into evidence

Harness² separates optimization into task-level and harnessing-level recursion. The task-level loop uses a contrastive process called Propose–Probe–Compose:

  1. Propose: Generate candidate edits to the execution harness for the current task.
  2. Probe: Run those variants on the same task and record how their behavior differs.
  3. Compose: Build a refined harness from the observed contrasts between executions.

The refinement step requires no task-specific labels, reward signals, or ground-truth answers. Harnessing-level recursion then updates a persistent improvement harness with adopted configurations and evidence-supported lessons, giving subsequent tasks a stronger starting point.

Diagram of the Harness² task-level and harnessing-level recursion loops
Harness² refines the current execution harness and stores lessons for later tasks.

Eight levers around the model

The framework exposes eight editable components that collectively shape context, tool use, delegation, and behavior inside the agent loop.

Component What it controls
System prompt Core instructions and task context
Guardrails Constraints on model and tool behavior
Memory Context retained or retrieved across execution
Tool guidance Instructions for selecting and using tools
Subagents Delegated roles and their instructions
Skills Reusable task procedures
Scripts Executable helper logic
Plugins Additional integrations and extensions

One step moves all three benchmarks

Google reports that a single Harness² step improved GLM-5 and Gemini 3.5 Flash over their base harnesses across three professional benchmarks and four model–harness configurations.

Benchmark Largest reported gain
WorkBuddy-Bench 11.5 points
JobBench 4.5 points
LAB partial pass rate 11.8 percentage points

The published values are the largest gains reported across the experiments, so they should not be treated as expected improvements for every task or configuration. They show that harness changes alone can alter benchmark performance while the underlying model remains unchanged.

Search width and depth are separate knobs

Parallel recursion widens the search by probing multiple candidate harnesses in one step. Sequential recursion deepens it by chaining multiple Propose–Probe–Compose steps, with each revision becoming the input to the next.

Diagram comparing parallel and sequential Harness² recursion
Parallel mode evaluates more candidates per step; sequential mode repeatedly refines one search path.

The --k option controls the recursion budget. The release includes both recursion modes, OpenCode and Codex executors, and adapters for JobBench, LAB, and WorkBuddy-Bench. Passing --substrate cx replaces the default OpenCode executor with Codex.

Run the demo without credentials

The local demo requires Linux, Python 3.12, and uv. It uses deterministic editors, performs real Python executions, and needs no model credentials.

uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e '.[render]'
harness2-demo --output runs/demo --k 2

Model-backed benchmark runs add several external dependencies:

Run type Requirements
All model-backed benchmarks Vertex AI, Node.js 20 or newer, and Google Cloud CLI
LAB Pandoc and Poppler
WorkBuddy-Bench Docker

A minimal LAB run can be set up, executed, and judged with three commands:

harness2-setup lab
harness2 --bench lab --k 1 --mode parallel \
  --only-domains antitrust-competition --max-tasks 1
harness2-judge --bench lab --k 1 --mode parallel

Model-backed runs incur API charges, and every additional probe adds execution cost. The documentation recommends beginning with a small task subset before increasing --k or expanding the benchmark scope.

When task mixes keep changing

Harness² targets agents that face tasks outside the conditions anticipated by their original prompts and tool configurations. Automated harness search may fit several development and research settings:

  • Legal, office, and coding workflows whose tasks vary across clients or projects
  • Agent systems that use fixed frontier models and lack a fine-tuning path
  • Research on prompts, tools, memory, and orchestration as optimization targets
  • Benchmark studies that need to separate harness quality from model quality

Containment and cost set the boundaries

Harness² is a research release with no official Google product support. The repository warns that executor network access is unrestricted and that Codex runs with its sandbox disabled. Public benchmark rubrics may also be reachable online, creating a risk of answer leakage and contaminated results.

Evaluation environments should isolate executors, restrict outbound network access, and block benchmark answers and grading criteria. Generated scripts and plugins should be reviewed as untrusted code before production use.

Each candidate probe consumes model calls and execution time, and the largest reported gains used higher --k budgets. Teams adopting the framework will need to measure whether benchmark or task improvements justify the added inference cost.

Implementation details, experiment settings, and complete results are available in the paper and on the project site.