Reviewed by Jonathan West · Updated Oct 20, 2026

Harness2 Explained

License, setup steps, reported benchmark results, and risks of Google Research's open-source agent framework.

Reviewed by Jonathan West · Updated Oct 20, 2026

Harness2 is Google Research's open-source framework that rewrites an agent's harness (prompts, tools, memory, skills) while the model weights stay fixed. For each task it proposes edits, probes their effects on the same task, composes a refined harness, and stores lessons for the next task. In AI agent design, an agent equals the base language model plus its execution harness, which consists of system prompts, tools, memory, skills, and orchestration logic. Harness2 (also written as Harness squared) is unrelated to the continuous integration and continuous deployment (CI/CD) vendor Harness.io.

The framework connects two distinct levels of recursion: task-level adaptation and harnessing-level learning. The code is available on the Harness2 GitHub repository under an Apache 2.0 license. The project was discussed on Hacker News, Google News and the LocalLLaMA community in October 2026 under the headline "Google open sources Harness2, letting AI agents rewrite their own playbook".


What Harness2 Is and How Recursive Harnessing Works

Harness2 is a plug-and-play framework for recursive agent harnessing in an open world where agents encounter tasks that creators did not anticipate during system design. Instead of updating model weights, Harness2 refines the modular components surrounding the model. The architecture connects task-level recursion to harnessing-level recursion.

Task-level recursion refines the execution harness for the active task through a contrastive Propose-Probe-Compose cycle. The framework proposes candidate harness edits, probes their operational effects on the active task, and composes a refined harness based on behavioral contrasts between executions. This sequence operates without ground-truth feedback.

Harnessing-level recursion updates a persistent improvement harness across tasks. It records adopted harnesses and evidence-supported lessons into an improvement library containing harness files and an EXPERIENCE.md document. Each new task starts from the baseline harness designated as H0, pulling accumulated insights from the library to guide future refinement.

The framework supports two execution modes: parallel recursion and sequential recursion. Parallel recursion probes K general and K domain-specific candidate harnesses simultaneously, producing K compositions from shared behavioral evidence to explore diverse configurations. Sequential recursion carries the refined harness and accumulated evidence through K successive Propose-Probe-Compose steps to refine execution depth. Running the system with the argument --k 1 executes a single adaptation step.


Open-Source Release and License

Google Research published Harness2 under the permissive Apache 2.0 open-source software license. Anyone can inspect, clone, and modify the source code without paying licensing fees. However, the repository notes that Harness2 is not an officially supported Google product.

The project is documented in the 2026 research paper titled "Harness²: Recursive Agent Harnessing for an Open World", cataloged as arXiv:2610.14224. The paper authors include Ruiyao Xu from Northwestern University, alongside Yanfei Chen, Zhongying CuiZhu, Bhavana Dalvi Mishra, Yifei Ming, Han Yu, Rujun Han, Chen-Yu Lee, and Tomas Pfister from Google Cloud AI Research.

The project repository includes third-party code in dedicated directories. Code stored under the third_party/ directory, as well as benchmark evaluation datasets, retain their respective upstream software licenses. Google also specifies that the repository is not eligible for the Google Open Source Software Vulnerability Rewards Program.


The Eight Editable Harness Components

Harness2 manages eight distinct modular components that surround the core foundation model.

Skills and memory sit in the context group, so a Harness2 edit can change what the model reads before it acts, while scripts and tool guidance change how it calls tools.

ComponentRuntime Role
System PromptContext Construction
GuardrailsContext Construction
MemoryContext Construction
SkillsContext Construction
Tool GuidanceTool Interface
ScriptsTool Interface
SubagentsWork Delegation
PluginsMiddleware Control

Supported execution substrates include OpenCode, which serves as the default runtime, and Codex, which is enabled by passing the --substrate cx flag.


Reported Benchmark Results

Reported benchmark scores for Harness2 are vendor-reported figures published by Google Research. According to the project README, testing covered three professional evaluation suites: JobBench for professional workplace tasks, LAB for legal tasks, and WorkBuddy-Bench for office, web, and coding scenarios.

Across four model-harness configurations, Google Research reports that a single Harness2 step improves base performance for both GLM-5 and Gemini 3.5 Flash. The authors report performance gains of up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench, and an 11.8 percentage point increase in partial pass rates on the legal LAB benchmark. Google Research notes that expanding the task-level recursion budget yields further gains.

On the official Harness2 project page, evaluations of Gemini 3.5 Flash on OpenCode across WorkBuddy-Bench subsets show improvements when scaling from Base to Meta-Harness to Harness2 at k=5. On the WB-Code subset, scaling the recursion parameter from k=1 to k=5 adds 4.3 points.

Benchmark SubsetBase ScoreMeta-Harness ScoreHarness2 (k=5) Score
WorkBuddy-Bench Code73.475.580.8
WorkBuddy-Bench Web69.975.178.3
WorkBuddy-Bench Office74.078.683.4

Cost and Setup Requirements

The Harness2 source code is free to download under the Apache 2.0 license, but running evaluations introduces infrastructure expenses. Google Research does not provide a hosted product, and there is no published price. Users must pay for their own model inference fees, application programming interface (API) usage, and cloud infrastructure.

Local setup requires a Linux environment running Python 3.12 and the uv package manager. To install the framework, create a virtual environment with uv venv --python 3.12 .venv, and run uv pip install -e '.[render]'. Developers can test the framework locally without model credentials by executing harness2-demo --output runs/demo --k 2. This demonstration runs both parallel and sequential recursion modes using deterministic editors and local Python executions.

Full model-backed benchmark runs introduce heavier dependencies. You must install Node.js 20 or higher, the Google Cloud command-line interface (CLI), and configure credentials using gcloud auth application-default login. You must configure a Vertex AI project and specify model identifiers inside a local .env configuration file. Specific benchmarks require extra tooling: the LAB benchmark requires Pandoc and Poppler, while WorkBuddy-Bench requires Docker.

The repository authors warn that model-backed runs incur API costs and recommend starting testing with a small task selection. The framework stores output data inside the runs/ directory, including task summaries, generated deliverables, adopted harnesses, reflection notes, and evaluation metrics. If an evaluation is interrupted, repeating the same execution command resumes the run.


What a Business Can Do with It Today

Harness2 is a research codebase rather than an enterprise software product. Treat it as a reference for designing agent evaluation loops, built around its Propose-Probe-Compose cycle. It is not a drop-in component.

Start with the local demo, which needs Linux, Python 3.12 and uv but no model credentials. Move to a small task selection on one benchmark only after that, because model-backed runs incur API costs.

Teams that need a supported product should wait or choose one, since Google states Harness2 is not an officially supported Google product.


Risks and Limits

By default, the framework executes with unrestricted network access for its execution substrates. Codex runs with its sandbox disabled.

Public benchmark rubrics may be accessible online, so an agent with open network access could find them. The project README instructs operators to configure appropriate network restrictions before running benchmark evaluations.

The repository states that Harness2 is not an officially supported Google product. All published performance benchmarks are vendor-reported figures from the project authors.

Frequently Asked Questions

  • Harness2 is an open-source research framework created by Google Research for recursive agent harnessing. It allows language model agents to propose, probe, and compose refinements to their surrounding prompts, tools, skills, and memory without altering underlying model weights.
  • The Harness2 codebase is free and licensed under Apache 2.0. However, running model-backed evaluations requires users to pay their own model API usage and cloud compute costs on platforms such as Vertex AI.
  • Harness2 was developed by Ruiyao Xu from Northwestern University in collaboration with Yanfei Chen, Zhongying CuiZhu, Bhavana Dalvi Mishra, Yifei Ming, Han Yu, Rujun Han, Chen-Yu Lee, and Tomas Pfister from Google Cloud AI Research.
  • No. Harness2 leaves foundation model weights fixed. Its reported gains come from edits to the prompts, tools, memory and other harness components.
  • In artificial intelligence agent architecture, an agent equals the foundation model plus its harness. The harness is the surrounding operational software that enables the model to act, consisting of prompts, tools, memory, skills, orchestration, and more.
  • Yes. The framework includes a local demonstration command, harness2-demo, which runs both parallel and sequential recursion modes using deterministic editors and local Python executions on Linux without model credentials.

Thinking About Self-Improving Agents for Your Team?

Book a free AI workflow audit with Layer3Labs to map where self-improving agents could fit in your workflows.

Book a Consultation