Harness²: Boost AI agent skills without touching model weights
Google Research just open-sourced Harness², a framework that recursively tunes eight agent harness components—such as prompts, tools, and subagents—without altering model weights. In benchmark tests, a single step improved models like Gemini 3.5 Flash and GLM-5 by up to 11.5 points.
Harness² is a plug-and-play framework from Google Research that lets AI agents self-improve in the wild without touching a single model weight. It focuses on the outer layer surrounding the core model, automatically refining how agents plan, use tools, and retain context.
In agent engineering, the harness is everything built around the foundation model: system prompts, memory, tool documentation, delegation rules, and scripts. When an agent fails a complex job, the fault often lies in this outer orchestration rather than the raw model intelligence.
What it does
Harness² exposes eight editable components around the model: system prompts, guardrails, memory, tool guidance, subagents, skills, scripts, and plugins. Together, they govern context creation, tool execution, and delegation loops.
To optimize these pieces, the framework relies on a two-level recursion system. The first is task-level recursion. Using a contrastive Propose-Probe-Compose cycle, the system proposes edits, tests them on the current task, and synthesizes an improved harness based on behavioral contrasts, all without requiring ground-truth answers. You can run it in parallel to explore wider options, or sequentially to refine deeper.
The second is harnessing-level recursion. After a task wraps up, successful harness setups and lessons backed by evidence are stored permanently, guiding future runs when the agent encounters completely unseen assignments.
The benchmark gains are noticeable. Across JobBench, the legal-focused LAB, and WorkBuddy-Bench, a single Harness² step boosted base setups for models like GLM-5 and Gemini 3.5 Flash. Scores jumped up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench, and 11.8 percentage points on LAB partial pass rates. Allocating more recursive steps brought even higher scores.
How to run it
The codebase is open-sourced under the Apache 2.0 license on GitHub. It runs on Linux with Python 3.12 and the uv package manager.
You can test the recursion engine locally without burning API credits. The repository includes a deterministic demo that executes real Python code without external model credentials.
Running evaluations on live frontier models requires Node.js 20+, Google Cloud CLI, and benchmark dependencies like Docker for WorkBuddy-Bench or Poppler and Pandoc for LAB. It supports both OpenCode and Codex execution environments. Keep in mind that network access is unrestricted by default and the Codex runner disables sandboxing, so you should restrict network access before running public benchmarks to prevent data leakage.
Why it matters
We think Harness² tackles a massive real-world headache for agent builders. Fine-tuning model weights is expensive, slow, and risks breaking general reasoning. In contrast, most agent failures in production come down to vague tool documentation, clunky prompts, or bad task delegation.
Automating the tedious trial-and-error of harness engineering saves weeks of manual prompt hacking. If you are building multi-step autonomous workflows, Harness² offers a practical blueprint for turning fixed-weight frontier models into self-correcting agents at a fraction of the cost.
Sources (1)
- github.com(opens in a new tab)Originalgithub.com