A browser-based control room for running LLM agent societies, letting you pause, question, steer, and replay simulated towns step by step.
google-research/harness2
A Python framework for recursive harness optimization that refines the prompts, tools and orchestration around a fixed LLM agent on unseen tasks.
- Stars
- 9,158
- Forks
- 802
- Open issues
- 72
- Last commit
- 6 days ago
What is it?
Harness² is a framework for improving the system around a language model that lets it act as an agent. That surrounding system, called a harness, includes prompts, tools, memory, skills and orchestration. The framework keeps model weights fixed and instead optimizes the harness, aiming at tasks the agent did not encounter during harness design.
It works at two levels. Task-level recursion refines the harness for the current task through a Propose–Probe–Compose step: it proposes edits, runs them on the same task, and composes a new harness from the behavioral differences between executions, without ground-truth feedback. Harnessing-level recursion maintains a persistent improvement harness that stores adopted harnesses and lessons supported by evidence to guide later refinement.
The project ships with support for OpenCode and Codex executors and for three benchmarks: JobBench, LAB and WorkBuddy-Bench. It offers parallel and sequential recursion modes, a local demo that needs no model credentials, and commands for setup, running, judging and reporting.
Key features
- 01Task-level recursion refines the harness via Propose–Probe–Compose without ground-truth feedback.
- 02Harnessing-level recursion keeps an improvement harness of adopted harnesses and lessons across tasks.
- 03Parallel and sequential recursion modes control how far and how deep refinement goes.
- 04Supports OpenCode and Codex executors.
- 05Includes JobBench, LAB and WorkBuddy-Bench benchmark integrations.
- 06Edits eight harness components: system prompt, guardrails, memory, tool guidance, subagents, skills, scripts and plugins.
Use cases
- Researchers reproducing harness optimization experiments on JobBench, LAB or WorkBuddy-Bench.
- Teams comparing agent harness designs for a fixed model across professional task benchmarks.
- Developers studying how prompts, tools and orchestration affect agent performance without retraining the model.
Quick start
- 1
Create a Python 3.12 virtual environment
uv venv --python 3.12 .venv - 2
Activate the virtual environment
source .venv/bin/activate - 3
Install the package in editable mode with render extras
uv pip install -e '.[render]' - 4
Run the local demo (no model credentials needed)
harness2-demo --output runs/demo --k 2
Things to know
- Model-backed benchmarks need Vertex AI setup, Google Cloud CLI authentication, and possibly Docker, Pandoc and Poppler.
- Model-backed runs incur API costs.
- Executor network access is unrestricted, so benchmark answers may need network restrictions configured beforehand.
Topics
FAQ
- What is harness2?
- A Python framework for recursive harness optimization that refines the prompts, tools and orchestration around a fixed LLM agent on unseen tasks. Harness² is a framework for improving the system around a language model that lets it act as an agent. That surrounding system, called a harness, includes prompts, tools, memory, skills and orchestration. The framework keeps model weights fixed and instead optimizes the harness, aiming at tasks the agent did not encounter during harness design.
- Is harness2 free to use? What license does it have?
- harness2 is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is harness2 still maintained?
- Actively maintained. The last commit to harness2 was on Oct 14, 2026.
- What can I use harness2 for?
- Researchers reproducing harness optimization experiments on JobBench, LAB or WorkBuddy-Bench. Teams comparing agent harness designs for a fixed model across professional task benchmarks. Developers studying how prompts, tools and orchestration affect agent performance without retraining the model.
- How do I install harness2?
- Create a Python 3.12 virtual environment: uv venv --python 3.12 .venv Activate the virtual environment: source .venv/bin/activate Install the package in editable mode with render extras: uv pip install -e '.[render]' Run the local demo (no model credentials needed): harness2-demo --output runs/demo --k 2
- Where can I get harness2?
- The source code and installation instructions are on GitHub: https://github.com/google-research/harness2
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Claude Code skill that digs into unfamiliar topics citation by citation until it reaches primary sources, then builds an annotated extract page.
A Python web scraping library that uses LLMs and graph-based pipelines to extract structured data from websites and local documents based on a text prompt.
A tool that removes image backgrounds, usable as a CLI, Python library, HTTP server, or Docker container.
Python infrastructure that turns enterprise data into a graph-based context layer with ontologies, reasoning, provenance and decision audit trails for AI systems.
Open-source music generation model that runs locally, creating full songs from text prompts with editing, cover, and LoRA training features.