# Map of Content — The Anatomy of an Agent Harness

> Source: *“The Anatomy of an Agent Harness”* by [[entity-vivek-trivedy|Vivek Trivedy]], published on the [[entity-langchain|LangChain]] blog.
>
> One-line thesis: **Agent = Model + Harness.** Models provide intelligence; harnesses make that intelligence useful by providing state, execution, context management, and continuation.
>
> Start here → [[_AGENT_PRIMER]] for the full distilled briefing.

---

## 🎯 Core Framing

- [[claim-agent-equation]] — Agent = Model + Harness (the central decomposition)
- [[concept-agent-harness]] — What a harness actually contains
- [[framework-harness-derivation]] — Working backwards from desired behavior to harness feature
- [[quote-harness-definition]] — *“If you're not the model, you're the harness.”*
- [[quote-intelligence-vs-usefulness]] — *“The model contains the intelligence and the harness is the system that makes that intelligence useful.”*

## 🧱 Harness Primitives

### Durable State
- [[concept-filesystem-primitive]] — Filesystem as the foundational primitive
- [[action-implement-filesystem]] — Give the agent a workspace and fs-ops tools

### Execution
- [[concept-bash-general-tool]] — Bash + code execution as a universal tool
- [[action-provide-bash]] — Ship harnesses with bash to enable autonomous problem solving

### Long-Horizon Orchestration
- [[concept-ralph-loop]] — Force continuation across clean context windows
- [[action-use-ralph-loops]] — Intercept exit, reinject prompt, re-read state
- [[claim-long-horizon-compounds]] — Long-horizon work requires compounding primitives

## 🪟 Context Management — Battling Context Rot

- [[concept-context-rot]] — Performance degrades as context fills
- [[quote-context-engineering]] — Harnesses as context-delivery mechanisms
- [[concept-compaction]] — Summarize / offload when nearing the limit
- [[concept-tool-call-offloading]] — Keep head/tail tokens, write the rest to disk
  - [[action-tool-call-offloading]]
- [[concept-progressive-disclosure]] — Skills loaded just-in-time

## 🔁 Model–Harness Co-Evolution

- [[concept-harness-model-coevolution]] — The feedback loop between models and harnesses
- [[claim-harness-overfitting]] — Post-training causes tool-logic overfitting
- [[contrarian-harness-optimization]] — Native harnesses aren't always best ([[entity-opus-4-6]] on [[entity-terminal-bench-2-0]])
- [[contrarian-harness-longevity]] — Harness engineering will survive model advancements

## 👥 Entities

### People
- [[entity-vivek-trivedy]] — Author

### Organizations
- [[entity-langchain]] — Publisher

### Products / Models / Tools / Benchmarks
- [[entity-deepagents]] — LangChain's harness-building library
- [[entity-langsmith]] — LangChain's agent engineering platform
- [[entity-claude-code]] — Anthropic's coding agent
- [[entity-codex-5-3]] — Codex snapshot cited for tool-logic overfitting
- [[entity-opus-4-6]] — Fixed-model variable in the Terminal Bench example
- [[entity-terminal-bench-2-0]] — Coding-agent leaderboard
- [[entity-context7]] — MCP tool for up-to-date documentation

## 🧠 Prerequisites

- [[prereq-react-loop]] — Reasoning + Acting loop (foundation of all tool-using agents)
- [[prereq-mcp]] — Model Context Protocol (standard for tool/data integration)

## ❓ Open Questions

- [[question-orchestrating-hundreds]] — Coordinating hundreds of parallel agents
- [[question-self-analyzing-traces]] — Agents analyzing their own execution traces
- [[question-jit-tool-assembly]] — Just-in-time tool assembly

---

## 📁 Folder Structure

- `concepts/` — Definitions and named primitives (includes contrarian insights tagged `contrarian`).
- `claims/` — Stated assertions with confidence levels.
- `frameworks/` — The working-backwards methodology.
- `entities/` — People, organizations, products, tools, benchmarks.
- `quotes/` — Verbatim citations from the author.
- `action-items/` — Concrete recommendations.
- `prerequisites/` — Background knowledge the article assumes.
- `open-questions/` — Forward-looking research directions.

## 🗺️ Suggested Reading Order

1. [[_AGENT_PRIMER]] — Read first.
2. [[claim-agent-equation]] + [[concept-agent-harness]] — The framing.
3. [[framework-harness-derivation]] — The methodology.
4. The five pillars in order: [[concept-filesystem-primitive]] → [[concept-bash-general-tool]] → [[concept-context-rot]] (with its three mitigations) → [[concept-ralph-loop]] → [[concept-harness-model-coevolution]].
5. The contrarians: [[contrarian-harness-optimization]] and [[contrarian-harness-longevity]].
6. The open questions for forward-looking work.
