What is the fundamental architectural distinction between an agent and a harness in an LLM system?
- The agent is the user-facing interface that handles input and output formatting, while the harness manages the underlying GPU allocation and model weight loading for inference
- The agent handles the initial planning phase of a task, while the harness handles the execution phase by converting the agent's plan into concrete API calls and tool invocations, which is the standard recommendation for production harness deployments at scale
- The agent is the model plus its tools that decides what action to take, while the harness is the code that controls the loop, context assembly, recovery, evaluation, and persistence around those decisions
- The agent runs on the server side processing requests asynchronously, while the harness runs on the client side collecting user inputs and rendering model outputs synchronously
Why
The agent is the reasoning engine: the model combined with its tool definitions that decides what action to take given context. The harness is everything else: the loop control, context assembly, recovery logic, evaluation, state persistence, and observability that wraps the model call. The harness owns control flow unconditionally. When a model API call returns, the harness resumes control, even if the response is malformed, truncated, or empty. The model is a stateless function called within the harness structure. Research has shown that a well-designed harness around a weaker model consistently outperforms a stronger model without scaffolding. Anthropic demonstrated that Claude Haiku with a production harness scored 38% on their code-repair benchmark while Claude Sonnet without scaffolding scored only 24%. The harness does not handle GPU allocation or model loading, which are infrastructure concerns. It does not split into client and server components. It does not separate planning from execution; both happen within the harness's control. The highest-leverage code in any agent system is the harness, not the model.