google-research /harness2
★ 23,339⑂ 2,338👁 102⑃ 150● 46▤ 0◈ 0
23,339
stars
+132
2,338
forks
102
watchers
150
prs
46
issues
0
releases
0
discussions
README
Recursive Agent Harnessing for an Open World
A harness is the system around a model that enables it to act as an agent:
prompts, tools, memory, skills, orchestration, and more. Harnessing is the
process of optimizing that system.
Harness² is a plug-and-play framework for recursive agent harnessing in an
open world, where agents encounter tasks unseen during harness design. It
connects two levels of recursion while keeping model weights fixed:
Task-level recursion refines the execution harness for the current task
through a contrastive Propose–Probe–Compose step: propose edits, probe
their effects on the same task, and compose a refined harness from behavioral
contrasts between executions, without ground-truth feedback.
Harnessing-level recursion updates a persistent improvement harness
with adopted harnesses and evidence-supported lessons from each task to guide
future refinement.
Across three professional benchmarks and four model–harness configurations, a
single Harness² step improves GLM-5 and Gemini 3.5 Flash over their base
harnesses, with gains of up to 11.5 points on WorkBuddy-Bench, 4.5 points on
JobBench, and 11.8 percentage points on LAB's partial pass rate. Increasing the
task-level recursion budget brings further gains.
The release supports parallel and sequential recursion, OpenCode and
Codex executors, and JobBench, LAB, and WorkBuddy-Bench.
Video overview
https://github.com/user-attachments/assets/76b10548-b14b-4c8f-9aa5-a93662df4d56
Contents
- Video overview
- Harness components
- Install
- Run a benchmark
- Experiments
- Web access
- Results and resume
- Citation
- Contributing
- License
- Disclaimer
Harness components
Harness² exposes eight editable components around the model: system prompt,
guardrails, memory, tool guidance, subagents, skills, scripts, and plugins.
They control context construction, the tool interface, delegation, and behavior
inside the tool loop.
Install
Use Linux, Python 3.12, and uv.
From the repository root:
bash
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e '.[render]'
harness2-demo --output runs/demo --k 2
The local demo runs both recursion modes with deterministic editors and real
Python executions. It requires no model credentials.
For model-backed benchmarks, install Node.js 20+, the Google Cloud CLI, and
the benchmark dependencies. LAB needs Pandoc and
Poppler; WorkBuddy-Bench needs Docker. Then configure your models:
bash
cp .env.example .env
Edit .env with your Vertex AI project and model IDs.
gcloud auth application-default login
See the setup guide for model settings, authentication
alternatives, and the Codex executor.
Run a benchmark
The following example installs LAB and runs one task, then evaluates and reports
its result. Model-backed runs incur API costs; start with a small task selection.
bash
harness2-setup lab
harness2-check --bench lab
harness2 --bench lab --k 1 Top issues
#64Add substrates for Pi and Claude code.9 comments · 2026-10-18#50harness2-report undercounts improver spend for tasks re-run after an interrupted invocation8 comments · 2026-10-18#4Proposal: `--max-usd` spend limit for `harness2` runs7 comments · 2026-10-16#94Can a deployer pin a harness component so it can't be removed?6 comments · 2026-10-20#153Same-named images in separate output directories overwrite each other in proposer context3 comments · 2026-10-28#96Proposal: a documented example of running a static check on an evolved harness3 comments · 2026-10-20#151k>=2 demo fails on Windows: pool/harnesses copies keep the base script, selection raises StopIteration (k=1 passes; same tree passes on Linux)2 comments · 2026-10-28#117Add a Hermes substrate2 comments · 2026-10-21
相关报道 (5)
note生成AI:活用方針68.9%の日本、Harness²は使えるか2026-10-23INSIDEGoogle 開源 Harness2!AI 代理不用重新訓練模型,也能自己改進工作流程2026-10-19新浪财经重磅!谷歌开源双层RSI框架Harness²,Gemini 3.5性能原地暴涨|Google|谷歌云|Agent|模型|工具_手机新浪网2026-10-2536氪谷歌开源Harness,支持 OpenCode 和 Codex:国内开发者接入Jev实测“真行”2026-10-19Pasquale Pillitteri谷歌发布 Harness2,能自我改进的 AI 智能体2026-10-18
News & coverage (8)
Hacker NewsHarness2 by Google Research – Recursive Agent Harnessing▲ 81 · 19 comments · 2026-10-19Hacker NewsHarness2▲ 5 · 2 comments · 2026-10-18Hacker NewsGoogle Harness2: Recursive Agent Harnessing for an Open World▲ 5 · 0 comments · 2026-10-18startupfortuneGoogle open sources Harness2, letting AI agents rewrite their own playbook2026-10-17KDnuggetsGoogle Open-Sources Harness²: Self-Improving AI Agents Without Retraining2026-10-22MemeburnGoogle Harness2: How a Cheaper AI Gained 11.5 Points in 20262026-10-2136氪Google Open-Sources Harness with OpenCode & Codex Support | Real-World Access Test Proves Jev Delivers Exceptional Performance for Domestic Developers2026-10-19Pasquale PillitteriGoogle releases Harness2, AI agents that improve themselves2026-10-18