google-research / harness2
git clone https://github.com/google-research/harness2.git
—
+729
stars, 24h · #26
+~7.3k
stars, 7 days · #16
+18k
stars, 30 days · #23
18k
★ total · +66% this week
1.8k
forks · 125 open issues
Star history (as recorded here)
LanguagePython
LicenseApache-2.0
Created2026-10-06 (16d ago)
Last push9d ago
Watchers59
OwnerOrganization
Links
README excerpt
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: [code] 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: [code] 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. [code] Sequential recursion runs the same commands with `--mode sequential`. `--k` is the task-level recursion budget; see Experiments. Judging and reporting must use the same benchmark, executor, subset, `--k`, `--mode`, and seed as the refinement run. Add `--dry-run` to `harness2` to preview task selection without model call