What are the three distinct layers of agent code?
Does separating agent code into model capabilities, system harness, and agent-created artifacts help explain why agentic systems fail and where to intervene for improvement?
Talking about "agent code" as one thing obscures three distinct elements that the code-as-harness survey separates. First, model-internal capabilities: the reasoning, perception, planning, simulation, and evaluation abilities baked into the model's weights. Second, system-provided harness infrastructure: the predefined tools, APIs, sandboxes, memory systems, validators, permission boundaries, telemetry, and workflows that connect model outputs to external actions and feedback — this is the main focus of harness engineering. Third, agent-initiated code artifacts: the interactive code objects an agent itself creates, executes, observes, revises, persists, and shares within the execution loop. These three are coupled but governed by different design levers.
The decomposition is useful because each element fails and improves differently. You strengthen model-internal capability by training; you strengthen the harness by engineering infrastructure; you strengthen agent-initiated artifacts by shaping how the agent generates and reuses its own code. Confusing them leads to misattributed failures — blaming the model for what is really a harness gap, or vice versa. The counterpoint is that the boundaries blur in practice: a skill the agent writes once may be promoted into harness infrastructure, and harness validators shape what the model learns to emit. But as an analytical frame it clarifies where to intervene. This matters because it gives harness engineering a vocabulary for separating the controllable layers of an agentic system.
Inquiring lines that read this note 10
This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.
Can harness architecture and protocols provide agent reliability without model scaling?- How does the agentic layer amplify individual agent failure modes?
- How do agentic systems recover when specialized models operate outside their scope?
- Which eleven failure modes emerge from agentic layers in realistic deployment?
Related concepts in this collection 3
This note in its neighbourhood — explore the map, then jump to a related concept in the list below.
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
-
Where does agent reliability actually come from?
Exploring whether LLM agent performance depends on larger models or on thoughtful system design choices like memory, skills, and protocols that shift cognitive work outside the model.
both isolate the harness as a layer distinct from the model and a primary source of capability
-
Does a single benchmark score actually predict agent readiness?
Single-axis benchmarks rank models by one capability—like task success—but ignore privacy, duration, operating mode, and ecosystem fit. Can one number really capture what matters for deployment?
parallels the move to decompose agent ability into separable components rather than one scalar
-
What happens to code that agents create and then share?
Agent-authored code artifacts that persist across tasks and multiple agents remain poorly understood. The open questions cluster around what should be retained versus discarded, and how shared state stays consistent when multiple agents collaborate.
extends: same survey; this decomposition names the three elements and that companion note singles out the third (agent-initiated artifacts) as the least-studied frontier
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- Code as Agent Harness
- Agents of Chaos
- RRSI: Regularized Recursive Self-Improvement of Agent Harnesses
- Why Do Multi-agent LLM Systems Fail?
- An Empirical Study of Harness Design for Coding Agents
- HarnessDev: Can LLMs Create and Evolve Their Own Agent Harness?
- Harness Handbook: Making Evolving Agent Harnesses Readable,Navigable, and Editable
- Small Language Models are the Future of Agentic AI
Original note title
agent code splits into model-internal capability system-provided harness and agent-initiated artifacts