# Object-Oriented Harness

> Source: <https://academy.dair.ai/papers/object-oriented-harness-evolving-agent-harnesses-through-object-oriented-design-2610.28380>
> Published: 2026-10-21 14:31:46+00:00

# Object-Oriented Harness: Evolving Agent Harnesses through Object-Oriented Design

Gaotang Li (UIUC) with Bhavana Dalvi Mishra, Yifei Ming, Yanfei Chen and colleagues at Google Cloud AI Research present OO-Harness, which evolves a class hierarchy of specialized agent harnesses instead of a single global harness and routes each task to one of them.

## Ask this paper

Inheritance. An evolution agent reads execution records and writes specialized harnesses as subclasses of the base or of an existing specialization, so shared behavior is reused and only the differing logic changes.

Routing. At test time a harness router uses routing lessons accumulated during training to select the subclass for each task.

Results. OO-Harness is best among the compared methods on three long-horizon benchmarks covering business workflows, workspace tasks and tool use, with up to 15 points absolute improvement over the base harness.

Ablations. Ablation studies measure the contribution of the class hierarchy, the router and the routing lessons separately.

## 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.
