The Anatomy of an Agent Harness

Akshay ยท tweet ยท 2026-07-08 Reader ๐Ÿ–ฅ๏ธ

Agent HarnessAgent MemoryAgent Tool ManagementAgentic LoopContext EngineeringContext Rot & Context LimitsEvalsFeedback LoopsGuardrailsMulti-Agent Orchestration
An agent harness is not monolithic prompt-glue but a decomposable system of roughly twelve components (orchestration loop, tools, memory, context management, prompt construction, output parsing, state, error handling, guardrails, verification, subagents) plus seven design-decision axes, and naming the parts is what lets you reason about, debug, and โ€” because the parts are treated as separable and independently improvable โ€” evolve agent behavior; yet as delivered the list reads as a convergent practitioner checklist organized by mechanism and vendor vocabulary rather than an orthogonal, coupling-minimizing decomposition with defined interfaces.

practical ยท expository โ€” Expository/taxonomic: it defines a term (the harness), enumerates ~12 components and 7 design-decision axes, traces one execution cycle, and surveys five frameworks. It largely ASSERTS a synthesized consensus rather than argues; the two genuine mini-arguments (separate permission from reasoning; name the parts so you can debug/evolve them) are light. Prescriptive intent throughout ('the next time your agent fails, look at the harness'), so practical.

Structure

PartRole
The problem and the namingOpens with the failure everyone hits (demo works, production 'wheels come off': the model forgets, tools fail silently, context fills with garbage) and reframes it: 'The problem isn't your model. It's everything around your model.' Grounds it in LangChain's TerminalBench jump (same weights, only infrastructure changed) and gives the thing a name: the agent harness. 'If you're not the model, you're the harness.'
What the harness is โ€” the conceptual modelDefines the harness as the complete non-model software (orchestration, tools, memory, context, state, error handling, guardrails); distinguishes 'agent' (emergent behavior) from 'harness' (machinery); gives Millidge's von Neumann analogy (LLM=CPU, context=RAM, DB=disk, tools=drivers, harness=OS) and the three concentric levels: prompt โŠ‚ context โŠ‚ harness engineering.
The 12 components (11 enumerated)The taxonomy proper: orchestration loop, tools, memory, context management, prompt construction, output parsing, state management, error handling, guardrails/safety, verification loops, subagent orchestration โ€” each defined with vendor examples.
The loop in motionTraces one cycle across the components in seven steps (prompt assembly -> inference -> output classification -> tool execution -> result packaging -> context update -> loop), names layered termination conditions, and adds the two-phase 'Ralph Loop' for tasks spanning multiple context windows.
How real frameworks implement itMaps the pattern onto Anthropic (query()/'dumb loop'), OpenAI (Runner, Codex three-layer), LangGraph (explicit state graph), CrewAI (role-based), AutoGen (conversation-driven, five orchestration patterns).
The scaffolding metaphor and co-evolutionScaffolding is temporary infrastructure removed when the building is done; as models improve, harness complexity should DECREASE (Manus rebuilt 5x removing complexity); models are post-trained with specific harnesses (tight coupling); the 'future-proofing test': performance should scale with stronger models WITHOUT added complexity.
Seven decisions that define every harnessA second framework โ€” single- vs multi-agent, ReAct vs plan-and-execute, context-window strategy, verification-loop design, permission/safety architecture, tool-scoping, harness thickness โ€” each a spectrum with a relayed empirical datum.
The harness is the productConcludes: identical models + different harnesses = wildly different performance (TerminalBench 20+ ranks); the harness is where the hard engineering lives and is not a commodity; the field trends toward thinner harnesses but the harness never disappears.

Key terms

Propositions

Arguments

Permission enforcement should be architecturally separated from model reasoning โ€” the tool system, not the model, decides what is allowed. strength: high
Explicit premises:
Implicit premises:
Inferences:
Decompose the harness into named components (and decision axes) because naming the parts is what lets you reason about, debug, and improve agent behavior.
Explicit premises:
Implicit premises:
Inferences:

Narratives

Questions addressed

Gaps

Closes gaps elsewhere

Related documents