Google Cloud AI Research has open-sourced Harness², a recursive agent framework designed to optimize the scaffolding surrounding frozen large language models. Rather than relying on model weight fine-tuning or requiring ground-truth labels, Harness² enables runtime self-improvement by iteratively adjusting prompts, tools, and execution strategies directly on unseen open-world tasks.
The 8 Editable Harness Components
Harness² conceptualizes an agent’s harness as everything outside the underlying model. It formalizes and manages this architecture through eight distinct file-mounted components: system prompts, guardrails, memory, tool guidance, subagents, skills, scripts, and plugins (middleware). By modularizing context preparation, tool interaction, and task delegation into these components, the framework can surgically revise execution logic without manual intervention.
Dual-Level Recursive Mechanism
The system refines agents using two interconnected recursive layers:
- Task-Level Recursion: Operates through a Propose, Probe, Compose cycle. An editor LLM drafts two candidate harnesses—an invariant candidate addressing universal failure modes (like reasoning or planning) and a domain candidate targeting task-specific knowledge. Both are executed on the task, and a composer retains only the modifications validated by superior behavioral trajectories.
- Harnessing-Level Recursion: Post-task reflection where successful patterns and lessons learned are compiled into a shared experience library (
EXPERIENCE.md), informing proposals for future tasks while keeping base configurations intact.
Key Findings and Benchmark Performance
Evaluated on professional benchmarks including WorkBuddy-Bench, JobBench, and Harvey’s Legal Agent Benchmark (LAB), Harness² demonstrated immediate gains across different base models (Gemini 3.5 Flash and GLM-5) using execution substrates like OpenCode and Codex:
- A single refinement step (k=1) boosted performance across all setups, with GLM-5 gaining up to +11.5 points on WorkBuddy-Bench (64.2 to 75.7).
- Weaker executor models realized the largest margins of improvement, occasionally outperforming larger baseline configurations.
- Agents frequently streamlined their execution paths, requiring fewer interactive steps per completed task.
Conclusions and Practical Trade-offs
Harness² proves that structured, test-time optimization of agent harnesses can rival or exceed the performance gains achieved by switching to larger foundational models. However, adoption introduces operational trade-offs, including increased inference token costs due to exploratory runs per task and the prerequisite of robust, isolated sandboxes to safely run proposed code modifications.
Mentoring question
When designing agent architectures, how would you evaluate the cost-to-performance trade-off between paying for test-time compute (iterative harness refinement) versus fine-tuning or upgrading to a larger base model?