UStackUStack
Harness² icon

Harness²

Harness² is an open-source framework for refining the prompts, tools, memory, and other components around fixed AI models. It helps researchers and developers run recursive harness-improvement workflows across JobBench, LAB, and WorkBuddy-Bench.

Harness²

Recursive agent harness refinement

Harness² is an Apache-2.0-licensed framework from the google-research repository for recursive agent harnessing in open-world tasks. It focuses on improving the system around a fixed model, including prompts, tools, memory, skills, orchestration, and other editable behavior rather than changing model weights.

Its task-level workflow uses Propose-Probe-Compose: it tests candidate harness edits on the current task and uses behavioral evidence from those executions to construct a refinement. A second, persistent level records adopted harnesses and evidence-supported lessons so later tasks can draw on prior refinement work.

Key capabilities

Editable agent harness components

The framework treats the surrounding agent system as editable components: system prompt, guardrails, memory, tool guidance, subagents, skills, scripts, and plugins. These components govern context construction, tools, delegation, and behavior in the tool loop.

Task-level Propose-Probe-Compose refinement

For a current task, Harness² proposes harness edits, probes their effects on that same task, and composes a refined harness from contrasts in execution behavior. The documented workflow does not require ground-truth feedback for this step.

Persistent harnessing-level learning

After a task, the system retains adopted harnesses and evidence-supported lessons in a persistent improvement harness intended to guide later refinements.

Parallel and sequential recursion modes

Parallel recursion explores multiple general and domain-specific candidates, while sequential recursion carries a refined harness and accumulated evidence through successive steps. The `--k` setting controls the task-level recursion budget.

Executor and benchmark support

The release supports OpenCode by default and can use Codex with `--substrate cx`. It includes workflows for JobBench, LAB, and WorkBuddy-Bench.

Run management and reporting

Command-line workflows cover setup, environment checks, refinement, judging, and reporting. Results retain task summaries, deliverables, adopted harnesses, reflection notes, and evaluation outputs.

Practical use cases

  • Evaluating agents on professional work tasks

    Run controlled refinement experiments against professional-work tasks in JobBench, using the benchmark setup, runner, judging, and report commands to compare configured harness behavior.

  • Testing legal-work agent workflows

    Use the LAB integration for legal-work benchmark tasks, where the documented setup includes the Pandoc and Poppler dependencies required by that benchmark.

  • Assessing office, web, and coding agents

    Run WorkBuddy-Bench subsets for office, web, or code tasks. The documented workflow requires Docker and carries the selected subset through commands after setup.

  • Comparing refinement strategies

    Explore candidate harness changes broadly with parallel recursion, or iteratively deepen a single refinement path with sequential recursion. This suits experiments where the choice between breadth and cumulative refinement matters.

  • Validating a local installation

    Start with the local demo to exercise both recursion modes using deterministic editors and real Python executions before configuring model-backed benchmark runs.

Pros and Cons

Pros

  • It exposes eight concrete harness components, allowing users to refine more than a single prompt.
  • It supports both parallel exploration and sequential refinement, with an explicit recursion-budget control.
  • It has documented command-line workflows for setup, checks, running, judging, reporting, and resuming results.
  • It supports three professional benchmarks spanning work domains: JobBench, LAB, and WorkBuddy-Bench.
  • A local deterministic demo uses real Python executions and does not require model credentials.

Cons

  • Benchmark runs are documented for Linux and Python 3.12, with additional dependencies that vary by benchmark; LAB requires Pandoc and Poppler, while WorkBuddy-Bench requires Docker.
  • Model-backed runs require model configuration and credentials, and the repository notes that they incur API costs.
  • Executor network access is unrestricted by default and Codex runs with its sandbox disabled; users are instructed to configure network restrictions before evaluation to avoid access to benchmark answers or grading criteria.

FAQ

What environment is required to run Harness²?

For benchmark runs, the project specifies Linux and Python 3.12. Its Python package also supports Python 3.13. The documented setup additionally calls for uv, Node.js 20 or later, and the Google Cloud CLI; some benchmarks add their own dependencies.

Which benchmarks does Harness² support?

The repository documents JobBench, LAB, and WorkBuddy-Bench. A benchmark is installed with `harness2-setup`, then checked with `harness2-check` before a refinement run.

How are benchmark runs evaluated and reported?

Use `harness2` to run refinement, followed by `harness2-judge` and `harness2-report` for evaluation and reporting. `--dry-run` previews task selection without model calls. Judging and reporting need the same benchmark, executor, task subset, recursion budget, mode, and seed as the refinement run.

Can a run be resumed?

Results are saved under `runs/`, organized by benchmark and, where applicable, subset. They include task summaries, deliverables, adopted harnesses, reflection notes, and evaluation results. Repeating the same command resumes a run; changing models or task selection calls for a new `HARNESS2_RUNS_DIR`.

Quick Facts

Category
Developer Tool
License
Apache License 2.0
Supported benchmarks
JobBench, LAB, and WorkBuddy-Bench
Primary environment
Linux; Python 3.12 for benchmark runs
Executors
OpenCode and optional Codex
Source
github.com/google-research/harness2

Альтернативы Harness²

CreateOS Sandbox icon

CreateOS Sandbox

CreateOS Sandbox is an isolated compute environment for running code and agent workloads inside Firecracker micro-VMs. It is designed for workflows that need machine-level isolation, private networking between sandboxes, and programmatic control through SDK, CLI, or MCP.

GitBot icon

GitBot

GitBot is a local browser-based workspace for creating reusable coding bots powered by Claude Code, Codex, or OpenCode. It helps developers run those agents across repository folders with persistent threads and configurable permissions.

AakarDev AI icon

AakarDev AI

AakarDev AI helps teams manage AI provider access, project-level setups, logs, and analytics from one dashboard. It supports BYOK workflows and lists providers including OpenAI, Google Gemini, Anthropic, Groq, Mistral AI, and Perplexity AI.

Trigger.dev chat agent icon

Trigger.dev chat agent

Trigger.dev chat agent is a durable AI chat backend for developers building stateful conversations that can survive refreshes, crashes, and long-running turns. It connects with the AI SDK `useChat` flow and runs on managed infrastructure with no timeout on a turn.

ByteAsk icon

ByteAsk

ByteAsk is a terminal-first AI coding agent for C and C++ that edits repositories and verifies changes with the real compiler, debugger, sanitizers, and tests before showing a diff. It offers a free tier plus paid plans, with editor connectors and zero-retention handling described in the source.

Epherem icon

Epherem

Epherem is a static security scanner for web apps built with AI coding tools such as Lovable, Bolt, v0, Replit, Cursor, and Claude Code. It checks source files and dependencies for common security mistakes, then provides categorized findings and suggested fixes without running the app.