Vivek Trivedy of LangChain proposes a structured definition of the agent harness: Agent = Model + Harness. The harness encompasses all the code, configuration, and execution logic that is not the model itself, including system prompts, tools and MCP, embedded infrastructure, orchestration logic, and deterministic hooks.
The article derives each harness component from the desired behaviors that models cannot natively provide. The filesystem is identified as the most fundamental primitive: it offers a workspace, incremental storage, and a collaboration surface between agents and humans. Bash and code execution provide a general-purpose tool that lets the model design its own tools on the fly. Sandboxes offer safe, scalable execution environments with default tools pre-installed.
For memory, the filesystem serves as the central primitive via standard files like AGENTS.md, loaded into context at startup and updated between sessions. Web search and MCP tools (such as Context7) provide access to knowledge beyond the training cutoff.
The article identifies context rot as a major challenge: performance degrades as the context window fills up. Solutions include compaction (intelligent summarization of context), offloading large tool results to the filesystem, and Skills as a progressive disclosure mechanism.
For long-running execution, the previous primitives compose together. The Ralph Loop is a pattern that intercepts the model's attempt to exit and re-injects the prompt into a clean context, forcing the work to continue. Planning and self-verification (tests + a correction loop) keep the agent on the right trajectory.
The article explores model-harness co-evolution: agent products like Claude Code and Codex are post-trained together with their harness, creating a coupling (changing a tool's logic can degrade performance). However, the best harness for a given task is not necessarily the one used for training — LangChain went from Top 30 to Top 5 on Terminal Bench 2.0 by changing only the harness.
In conclusion, even though some harness functions will be absorbed by models, harness engineering will remain relevant because it builds systems around the model's intelligence. LangChain is developing deepagents and exploring massive agent orchestration, self-analysis of traces, and dynamic just-in-time context assembly.