Google Harness2, written Harness² or Harness Squared, is a free, open-source research framework from Google Research that improves an AI agent by rewriting the setup around the model instead of retraining the model.
The code is on GitHub at google-research/harness2 under the Apache-2.0 licence, so it costs nothing to download.
It works in three moves: an agent tries a task, Harness² proposes edits to the agent's setup and tests them on that same task, and then it combines the edits that worked into a better setup.
It also keeps the lessons from each task in a separate "improvement harness", so it gets better at improving agents over time.
The model weights never change, which is why the team calls the whole idea recursive agent harnessing.
This page is the operator walkthrough, so you'll get the exact install commands from the README, a free local demo that needs no API keys, and your first real benchmark run.
If you want my team to look at how AI agents and AI search can bring your business more leads, book a free one-to-one GEO, AEO AI audit with my team.
Google Harness2 At A Glance
Here are the facts I checked on the official repo, the paper and the project page before writing this.
| Fact | What the official sources say |
|---|---|
| Name | The project is called Harness², and the paper is "Harness^2: Recursive Agent Harnessing for an Open World". |
| Who made it | The authors are from Google Cloud AI Research and Northwestern University, and the repo sits under google-research on GitHub. |
| Cost | The code is free and open source under the Apache-2.0 licence. |
| Version | The pyproject file lists version 0.1.0. |
| Popularity | The repo was created on 6 October 2026 and had over 16,000 stars and 1,500+ forks by 21 October, and it is still climbing. |
| What it edits | It edits eight parts of the harness: system prompt, guardrails, memory, tool guidance, subagents, skills, scripts and plugins. |
| Executors | It runs on OpenCode by default, and Codex is available as an option. |
| Best reported gains | A single step gave up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench and 11.8 percentage points on LAB's partial pass rate. |
| Status | The README says it is not an officially supported Google product. |
🔥 Want my exact Google Harness2 Setup setup, step by step? Inside the AI Profit Boardroom you get step-by-step video trainings, my installable Agent OS and four coaching calls a week with 3,400+ members building real automations. → Join the AI Profit Boardroom
What Google Harness2 Actually Does
The README defines a harness as the system around a model that lets it act as an agent, which covers prompts, tools, memory, skills and orchestration.
Harnessing is the process of optimising that system.
I explain it in my video with a kitchen.
The model is the chef, and the harness is the kitchen, with the recipes on the wall, the rules, the memory, the tools, the skills and the helpers.
A great chef in a messy kitchen still serves bad food.
Most people try to fix a bad agent by buying a better chef, which means switching to a bigger model.
Harness² cleans up the kitchen instead.
It does that on two levels, and you need to understand both before you run it.
- Task-level recursion improves the harness for the task in front of it through a step called Propose, Probe, Compose.
- Harnessing-level recursion saves the adopted harnesses and the lessons from each task into a persistent improvement harness that guides future tasks.
The README pipeline goes like this.
- An agent executor runs the task with the starting harness.
- A harness editor proposes two kinds of edits, which are general "invariant" edits and domain-specific edits.
- Candidate probes run those edited harnesses on the same task.
- A harness composer combines what worked into the final harness.
- An experience reflector looks back at the whole step and updates the improvement harness for the next task.
The clever part is that it doesn't need an answer key.
New real-world tasks don't come with a marking scheme, so Harness² compares how the different versions behaved on the same task and learns from the contrast.
I compared it to the gym in my video, because you can test two routes to the gym and see which one gets you there faster without anyone handing you the right answer.
The README says the improvement harness keeps "evidence-supported lessons", which means it only carries forward what the runs actually showed.
Before You Start: What You Need
This is a technical tool, and I'd rather you know that before you spend an afternoon on it.
| Requirement | What the README asks for |
|---|---|
| Operating system | You need Linux, and the package is marked for POSIX systems. |
| Python | You need Python 3.12, and the pyproject accepts 3.12 or 3.13. |
| Package tool | You need uv to create the environment and install the package. |
| Model-backed runs | You need Node.js 20+, the Google Cloud CLI and the benchmark dependencies. |
| LAB benchmark | LAB needs Pandoc and Poppler. |
| WorkBuddy-Bench | WorkBuddy-Bench needs Docker. |
| Models | You put your Vertex AI project and model IDs in a .env file. |
If you're on a Mac or Windows laptop, the simplest route is a Linux machine or a Linux server.
Step 1: Clone The Repo And Install Harness²
The README's commands assume you're in the repository root, so clone the repo first.
git clone https://github.com/google-research/harness2.git
cd harness2
Then run the README's install commands exactly as written.
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e '.[render]'
harness2-demo --output runs/demo --k 2
The first line creates a Python 3.12 environment, the second switches it on, and the third installs Harness² with its render extras.
The last line runs the local demo.
Step 2: Run The Free Local Demo First
The demo is the step I'd never skip.
The README says it runs both recursion modes with deterministic editors and real Python executions, and it needs no model credentials.
That means you can see the whole Propose, Probe, Compose loop working without spending a penny on API calls.
Look inside runs/demo afterwards so you know what a finished run looks like before you pay for a real one.
🔥 Want the agent setup I actually run every day? Inside the AI Profit Boardroom, I've got the installable Agent OS plus step-by-step tutorials on skills, memory and agent instructions, which are the same harness parts Harness² edits. You'll be learning alongside 3,400+ members with four coaching calls every week. → Get access here
Step 3: Connect Your Models With Google Cloud
Real benchmark runs need real models, and the README routes them through Vertex AI.
These are the README's exact configuration commands.
cp .env.example .env
# Edit .env with your Vertex AI project and model IDs.
gcloud auth application-default login
The README points to its setup guide for model settings, other ways to authenticate and the Codex executor.
Install Node.js 20+ and the Google Cloud CLI before this step, or the login command won't be there.
Step 4: Pick A Benchmark And Install It
Harness² ships with three professional benchmarks, and you choose one per command.
| Benchmark | Type of tasks | Install command |
|---|---|---|
| JobBench | It covers professional work. | harness2-setup jb |
| LAB | It covers legal work. | harness2-setup lab |
| WorkBuddy-Bench | It covers office, web and code tasks. | harness2-setup wb |
WorkBuddy also takes --subset office, --subset web or --subset code on every command after setup.
If you want help working out where AI agents fit your business and your search traffic, grab a free strategy session with my team and we'll look at your site, your competitors and the keywords you're closest to winning.
Step 5: Run One Task, Then Judge And Report It
The README's example installs LAB, runs one task, then evaluates and reports the result.
harness2-setup lab
harness2-check --bench lab
harness2 --bench lab --k 1 --mode parallel \
--only-domains antitrust-competition --max-tasks 1
harness2-judge --bench lab --k 1 --mode parallel
harness2-report --bench lab --k 1 --mode parallel
The README warns that model-backed runs incur API costs, so start with a small task selection like this one.
Add --dry-run to the harness2 command if you want to preview which tasks it would pick without making any model calls.
Judging and reporting must use the same benchmark, executor, subset, --k, --mode and seed as the refinement run, or your numbers won't line up.
Results land under runs/, with task summaries, deliverables, adopted harnesses, reflection notes and evaluation results.
If a run stops, repeat the same command to resume it.
Use a new HARNESS2_RUNS_DIR when you change models or task selection, so old and new results don't mix.
🚀 Ready to put Google Harness2 Setup to work in your business? Inside the AI Profit Boardroom you get step-by-step video trainings, my installable Agent OS and four coaching calls a week with 3,400+ members building real automations. → Join the AI Profit Boardroom
Parallel vs Sequential: Choosing Your Recursion Mode
The --k flag is the task-level recursion budget, and the mode decides how that budget gets spent.
| Option | What it does |
|---|---|
--k 1 |
It runs one Propose, Probe, Compose step. |
--k K --mode parallel |
It probes K general and K domain-specific candidates, then produces K compositions. |
--k K --mode sequential |
It refines the harness through K successive steps. |
--substrate cx |
It uses Codex instead of the default OpenCode executor. |
The README sums it up as parallel exploring wider and sequential refining deeper.
In my video I used a budget of 3 as the example, where parallel tries three different ideas side by side and sequential improves one idea three times in a row.
A bigger budget costs more, because every probe is a full run of the task.
The project page shows why people pay for it, because Gemini 3.5 Flash on OpenCode went from 72.4 to 77.5 on WorkBuddy with one step, and to 80.8 with parallel recursion at k = 5.
The Eight Parts Of The Harness It Edits
The README says Harness² exposes eight editable components around the model.
| Component | Its runtime role |
|---|---|
| System prompt | It builds the context the agent starts from. |
| Guardrails | It builds context by setting the rules the agent must follow. |
| Memory | It builds context from what the agent should remember. |
| Skills | It builds context from reusable how-to instructions. |
| Tool guidance | It shapes the tool interface by explaining how to use each tool. |
| Scripts | It shapes the tool interface with ready-made code the agent can call. |
| Subagents | It orchestrates delegated work. |
| Plugins | It controls middleware inside the tool loop. |
This is the bit I'd want every operator to take away, even if you never install it.
Most of these parts are plain English, and you can improve your own agent's instructions, rules, memory and skills today.
In my own Agent OS, Claude, Hermes, OpenClaw and OpenCode share one memory in Obsidian, and when something breaks, the fix is usually in the setup rather than the model.
It's often a skill file with a bad rule, a missing memory note or vague instructions.
If you want to tighten those parts by hand first, my guides to the best Hermes Agent skills and the best Hermes Agent memory setup are the place to start.
Caveats Every Google Harness2 Operator Should Know
It costs more to run, because each probe is a full run of the task, and the README itself warns that model-backed runs incur API costs.
It is a research project, and version 0.1.0 is an early release.
It needs Linux, Python, Node and the Google Cloud CLI, so it is not a no-code tool.
The README says executor network access is unrestricted and that Codex runs with its sandbox disabled.
Public benchmark rubrics can be found online, so the README tells you to configure network restrictions before evaluation to stop the agent reaching answers and grading criteria.
The README also says it is not an officially supported Google product and is not eligible for Google's open-source vulnerability rewards programme.
I didn't run Harness² myself in my video, so everything here about results comes from the paper, the README and the project page.
An engineer called Ash Pachar, who used to work at Lightning AI, made a point that I paraphrased in my video, which is that a person usually designs a harness once and then leaves it alone.
Harness² is a serious attempt to stop that, because the harness keeps improving after the first design.
If you would rather have my team map out how your business can win in Google and AI search, book a free SEO strategy session and we will build the plan with you.
🔥 Want to fix your agent's harness without writing code? The AI Profit Boardroom has the Agent OS, the skills and memory training, and four weekly coaching calls where you can show me your setup and get a straight answer. → Join the AI Profit Boardroom
Who Should Install Google Harness2 Right Now
Researchers and engineers who benchmark agents should install it today, because it is built for exactly that job.
Teams already running OpenCode or Codex agents can learn a lot from the demo and from one small paid run.
Business owners who don't code should take the lesson rather than the install, which is that the setup around the model matters as much as the model.
If you want a free, local agent harness you can actually use day to day, my StarNet AI agent walkthrough is a better first step.
Related Reading
- My best Hermes Agent skills guide shows you which skills are worth adding to your agent.
- My best Hermes Agent memory guide explains how to give your agent a memory that sticks.
- My StarNet AI agent walkthrough covers a free local agent harness you can run today.
Also On Our Network
- 🌐 Seven ways a business can use the Harness² lessons
- 🌐 Every Harness² feature reviewed and scored
- 🌐 The Harness² quick start for your Agent OS
- 🌐 How GLM and Gemini Flash models score next to the Harness² results
FAQ: Google Harness2 Setup
What is Google Harness2?
Google Harness2, written Harness² or Harness Squared, is a free, open-source research framework from Google Research.
It improves an AI agent by editing the harness around the model, such as its system prompt, memory and skills, while the model weights stay fixed.
Is Harness² free?
Yes, the code is free and open source under the Apache-2.0 licence.
The local demo needs no model credentials, but model-backed runs call paid models, and the README warns that they incur API costs.
How do I install Harness²?
The README says to use Linux, Python 3.12 and uv.
From the repository root you create the environment with uv, install the package with its render extras and run harness2-demo to try the free local demo.
Is Harness² an official Google product?
No, the README says it is not an officially supported Google product.
It is a research release, version 0.1.0 in its pyproject file, published alongside the arXiv paper 2610.14224.
Is Harness² just Hermes Agent redone?
No, because Hermes Agent is an everyday agent with skills and memory that you edit yourself.
Harness² is a research framework that automates edits to the harness of OpenCode or Codex executors and tests them on benchmarks.
If you'd like my team to look at how AI agents and content can win your business Google and AI search traffic, book your free SEO strategy session here.
📺 Video notes + links to the tools 👉
🎥 Learn how I make these videos 👉
🆓 Get a FREE AI Course + Community + 1,000 AI Agents 👉
About Julian
I'm Julian Goldie, an SEO entrepreneur, author and founder of the AI Profit Boardroom, which has 3,400+ members.
I help business owners scale with AI agents, automation and SEO.
- I've built a 7-figure SEO and link-building agency, Goldie Agency, with 70+ people in Bangkok.
- I've grown a YouTube channel to 400,000+ subscribers.
- I wrote the book "Link Building Mastery", which covers nine link building strategies.
- I run GoldieBench, where I score AI models on real one-shot builds.
→ Get my best AI training inside the AI Profit Boardroom
Clone the repo, run the free demo, then try one small paid task, and you'll understand exactly what Google Harness2 does to an agent.











