Harness² ("Harness squared") is an open-source framework from Google Research for recursive agent harnessing—a method that improves how AI agents execute tasks by automatically evolving the software scaffolding around the model without retraining or modifying the underlying model weights.
Core Concept: Model vs. Harness
An AI agent consists of two parts: the foundation model itself and the harness (everything around the model that structures context, invokes tools, manages memory, and controls orchestration/execution loops). Because the same model can perform drastically differently depending on its surrounding harness, Harness² focuses on systematically optimizing the harness rather than fine-tuning weights.
What Harness² Edits
Instead of just stuffing instructions into a single system prompt, Harness² exposes eight editable harness components across context construction, tool interfaces, delegation, and execution loops:
- System prompt – Core persona and high-level procedure.
- Guardrails – Constraints, rules, and pre-delivery checks.
- Memory – State or information retained/retrieved across steps and tasks.
- Tool guidance – Instructions on when/how to call tools and what valid inputs look like.
- Subagents – Delegated worker roles/contexts.
- Skills – Reusable task-specific workflows or procedures.
- Scripts – Deterministic helper scripts that replace ad-hoc reasoning for repeatable operations.
- Plugins – Middleware operating inside the tool execution loop.
How It Works: Propose–Probe–Compose
Harness² refines harnesses using execution evidence through a three-stage Propose–Probe–Compose loop (which does not require ground-truth answer keys during refinement):
- Propose: An editor model analyzes execution behavior and proposes candidate modifications—typically targeting both general weaknesses (planning, tool use, memory/context) and domain-specific requirements.
- Probe: Candidate harnesses are executed and observed to capture behavioral differences and failure modes.
- Compose: Contrasts across runs are synthesized into an improved harness, and evidence-backed lessons are stored in a persistent library so future tasks can start cleanly and selectively draw proven components rather than accumulating task-specific bloat.
Recursion Modes & Benchmarks
- Recursion scaling: Supports parallel recursion (exploring multiple candidate harnesses and composing across them) and sequential recursion (iteratively refining over successive Propose–Probe–Compose steps), working with executors/substrates such as OpenCode and Codex.
- Benchmarks evaluated: Tested across professional and specialized task suites including JobBench (cross-occupation professional tasks), LAB (legal tasks), and WorkBuddy-Bench (office, web, and coding tasks).
Key Trade-offs
- Compute overhead: Running multiple candidate probes per task can require several full agent runs per refinement step, making it better suited to building reusable harnesses/skills than every live one-off query.
- Sandboxing & autonomy: Because harnesses can generate/modify scripts, tools, or workflows and interact with external environments, strict network and filesystem sandboxing is important during evaluation and deployment.
No comments:
Post a Comment