The Anatomy of an Agent Harness
- article
- Saved
- Digested
Written by AI
- TLDR
- Vivek Trivedy of LangChain defines agent as model plus harness, then walks through core components: filesystems, bash execution, sandboxes, memory, and context-rot mitigation.
- Cliff notes
- Agent equals model plus harness: everything that is not the model itself, which is where most of the engineering actually lives.
- The component list is the useful part: filesystem and git for state, bash and sandboxes for execution, browsers and test runners for self-verification, compaction and skills for context.
- Sharpest claim: a harness today is mostly a delivery mechanism for good context engineering, and the same model scores very differently across harnesses on Terminal Bench.
- Ralph loops get a name: catch the model trying to exit and reinject the prompt in a fresh context window for long-horizon work.
- Read it?
- Parked. I already run this ladder: harness first, loop second, graph only when branching earns it.
- Why
- If you are building your first harness, this is the vocabulary sheet. For me it names things I already do, which is worth one read and no more.
- Filed note
- The decision ladder I use: harness, then loop, then graph. Only formalize a graph when branching or recovery actually earn it.
articleThe source
- Highlights
A harness is every piece of code, configuration, and execution logic that isn't the model itself. A raw model is not an agent. But it becomes one when a harness gives it things like state, tool execution, feedback loops, and enforceable constraints.
Core definition the piece works from
The model contains the intelligence and the harness is the system that makes that intelligence useful.
Compaction addresses what to do when the context window is close to filling up. Without compaction, what happens when a conversation exceeds the context window? One option is that the API errors, that's not good.
Explains why compaction exists
Opus 4.6 in Claude Code scores far below Opus 4.6 in other harnesses.
Cited as a harness-matters example
- Excerpt
Agent = Model + Harness. Harness engineering is how we build systems around models to turn them into work engines. The model contains the intelligence and the harness makes that intelligence useful.
From langchain.com