Skip to main content
William Boyden
Theme: Night, matching your device

in-progressAgent harness engineering

Agent harness engineering — improving agents without touching their weights

Google Research's harness2 refines an agent's prompts, tools, memory and skills task by task; my open-source Harness² Workbench runs it for teams and AI agents with roles, budgets, container isolation and an MCP server.

harness2 (Google Research)Harness² WorkbenchRustLeptos (WebAssembly)MCPOpenCodeCodexDocker or Podman

How it works

  1. harness2 treats the harness as the thing to optimise (system prompt, guardrails, memory, tool guidance, subagents, skills, scripts and plugins) and keeps the model's weights fixed.
  2. For each task it proposes edits, probes them by running the task again, and composes a refined harness from how the runs behaved differently; a slower loop carries the adopted harnesses and lessons forward to later tasks.
  3. The Workbench runs every harness2 step as a job with roles, a cost estimate, a spend guard, live logs and optional container isolation behind an egress allowlist.
  4. Every candidate harness, the diff to the adopted one, the rollouts and the improver's reasoning can be browsed, and two results compare task by task with a sign test.
  5. AI agents drive the same lifecycle through 42 MCP tools (plan, estimate, run, wait, analyse, export), each with the least-privilege token you give it, and the winning harness exports as an OpenCode or Codex project.

In depth

Why the harness, not the model

Most of what makes an agent good at a job lives outside the model: what the system prompt says, which tools it is told about and how, what it remembers between tasks, which skills and scripts it can call. harness2 makes that explicit as eight editable components and improves them per task, with the model fixed. The paper reports that a single step improves two models on three professional benchmarks, by up to 11.5 points on WorkBuddy-Bench and 11.8 percentage points on LAB's partial pass rate, without changing a single weight.

What the Workbench adds

Running that safely is its own engineering problem. A sweep starts executors that read files, call cloud models and run code, and the results it writes are model output that can contain instructions. The Workbench puts one server in front of all of it, enforces roles on every call from people and agents alike, reads job output as hostile input, and says plainly in its documentation which parts were verified against a real run and which were not.

Proof

Linked items are public repositories. The rest runs in my private lab, and I am happy to walk you through it.

Comparisons

harness2 at a terminal, and through the Workbench
Taskharness2 at a terminalThrough Harness² Workbench
Starting a runenvironment variables and a long commanda run wizard with a cost estimate, a budget and a dry-run preview
Watching ita scrolling terminallive logs, task progress, cancel, timeout and a spend guard
Reading resultsdirectories of JSON and Markdownscores, harness trees, diffs, rollouts, libraries and sign-test comparisons
Sharingone user's shelltokens and sessions with three roles, single sign-on, write-only secrets and an audit log
AI agentsa shell, with every permission it has42 MCP tools, each agent with its own token (viewer recommended)
Isolationthe executor runs as youoptional containers whose only way out is an egress allowlist

Limits

  • No model-backed sweep has been run through the Workbench yet. The only real harness2 workflow exercised end to end is its free offline demo; benchmark results are parsed against recorded harness2 output.
  • Host isolation is not a sandbox. A host-mode executor runs as the Workbench's own user and can read its data; container isolation is the answer, verified on rootless Docker only.
  • WorkBuddy-Bench is partial, because upstream supports it only on Vertex AI.
  • Single node and SQLite by design; the audit chain shows edits by anyone who cannot rewrite the data directory, but it is not tamper-proof.
  • The method is Google Research's. The Workbench is unofficial, not affiliated with Google, and pinned to one tested harness2 commit.