A Compositional Theory of Agent Harnesses

An agent built around a large language model includes a coordination layer that, for example, stores interaction history, selects prompts, and invokes tools. We call this layer the harness. Existing formal accounts of agents describe reasoning, policy, uncertainty, coordination, and harness architecture. We develop a compositional theory of harnesses using category theory. We begin with the category Poly of polynomial functors, modeling the interfaces of harness components as objects and interactions between components as morphisms. To capture component coordination and architectural structure, we then introduce the category Harn, in which harnesses are composable morphisms between polynomial interfaces. There, harnesses compose sequentially, in parallel, and hierarchically, so complex harnesses can be built from simple ones. We instantiate the theory through a sequence of examples, such as a chatbot, an agent calling a finite family of tools, and a coding agent using Bash. Using the resulting calculus, we extend the coding agent with agent skills and build an autoresearch harness with a strict-improvement policy, for which we prove that the recorded best score never regresses, independently of the model's decisions. This preprint has been submitted to Artificial Intelligence (Elsevier). It has not been peer reviewed.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-13
DOI
https://doi.org/10.5281/zenodo.24202616
Primary Topic
Multi-Agent Systems and Negotiation
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

A Compositional Theory of Agent Harnesses

Ilias Bilionis, Maurice Reimer
1 links
Zenodo (CERN European Organization for Nuclear Research)
Multi-Agent Systems and Negotiation
preprint

A Compositional Theory of Agent Harnesses

Ilias Bilionis, Maurice Reimer
preprint en

Abstract

An agent built around a large language model includes a coordination layer that, for example, stores interaction history, selects prompts, and invokes tools. We call this layer the harness. Existing formal accounts of agents describe reasoning, policy, uncertainty, coordination, and harness architecture. We develop a compositional theory of harnesses using category theory. We begin with the category Poly of polynomial functors, modeling the interfaces of harness components as objects and interactions between components as morphisms. To capture component coordination and architectural structure, we then introduce the category Harn, in which harnesses are composable morphisms between polynomial interfaces. There, harnesses compose sequentially, in parallel, and hierarchically, so complex harnesses can be built from simple ones. We instantiate the theory through a sequence of examples, such as a chatbot, an agent calling a finite family of tools, and a coding agent using Bash. Using the resulting calculus, we extend the coding agent with agent skills and build an autoresearch harness with a strict-improvement policy, for which we prove that the recorded best score never regresses, independently of the model's decisions. This preprint has been submitted to Artificial Intelligence (Elsevier). It has not been peer reviewed.

Zenodo (CERN European Organization for Nuclear Research)
Purdue University West Lafayette (US)
Multi-Agent Systems and Negotiation
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon