Object-Oriented Harness: Evolving Agent Harnesses through Object-Oriented Design
Organizations: University of Illinois Urbana-Champaign · Google Cloud AI Research
Abstract
Agent harnesses are executable code that specifies the prompts, tools, and control flow around a language model. A single global harness can struggle with heterogeneous tasks that require different execution strategies. In this work, we introduce Object-Oriented Harness (OO-Harness), a harness optimization framework that evolves a hierarchy of executable harness classes using object-oriented design. During training, an evolution agent uses execution records to create a family of specialized harnesses, each implemented as a subclass of the base or an existing specialized harness via inheritance. At test time, a harness router uses routing lessons accumulated during training to select a specific harness for each task. Across three long-horizon benchmarks spanning business workflows, workspace tasks, and tool use, OO-Harness achieves the best performance among the compared methods, with an absolute improvement of up to 15% over the base. Extensive ablation studies examine the contributions of its core components.
Figures & tables
| AutomationBench | Workspace-Bench | Toolathlon-GYM | |||||||
| Method | Mean | PASS | Steps | Mean | PASS | Steps | Mean | PASS | Steps |
| base | |||||||||
| Test-time scaling | |||||||||
| Parallel ( ) ‡ | |||||||||
| Parallel ( ) ‡ | |||||||||
| Sequential ( ) ‡ | |||||||||
| OO-Harness routing evidence | |||
|---|---|---|---|
| Benchmark / metric | Base | Task only | Task + trajectory |
| Automation / Mean | |||
| Workspace / Mean | |||
| Toolathlon / PASS | |||
| Original Base performance | |||
|---|---|---|---|
| Routing destination | Tasks | Mean reward | Strict PASS |
| Reuse Base | 134 | 77.15 | 36.57 |
| Specialized harness | 166 | 44.40 | 14.25 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Base execution | Routing lesson | Router choice |
|---|---|---|
| A lead-scoring execution makes no writes. HubSpot and Intercom return 401 errors indicating no connected account; a Lead lookup returns 404. The final response is empty. | Repeated connection errors and failed resource lookups suggest that information about connected services and available resources may help. | Resource-manifest harness. |
| Another execution completes three writes, has no errors, and finishes cleanly. | Successful writes and a clean finish support keeping the Base result. | Reuse Base. |
Agent Harness Optimization
Agent harness optimization improves the prompts, tools, memory, workflows, and control code that shape how AI agents act.
See all 183 papers