Model + Harness = Agent: How the LLM and the Harness Layer Work Together

    This article breaks down the widely cited agent development formula Model + Harness = Agent, explaining why a large language model alone cannot become a production agent. It covers the four gaps the harness must close (context, action, planning, and evaluation), the layered capability stack of a mature harness, the "everything is a plugin" architecture, a practical path from formula to shipped product, and the key takeaways for developers building agent products.

    Model + Harness = Agent: How the LLM and the Harness Layer Work Together

    1. Where the Formula Comes From and What It Means

    As agent technology moves toward engineering maturity, the industry has converged on a highly condensed development formula: Model + Harness = Agent. The formula answers a question that has long puzzled developers: why can’t a large language model simply become a productized agent? The answer is that the model provides only the “brain.” To put that brain into a real workflow, you need a full surrounding system that connects the environment, the tools, and the feedback loop. That system is the harness.

    Breaking the formula into its three parts:

    • Model: The foundation of the agent, responsible for understanding input, reasoning, and generating output. The model sets the upper bound of the agent’s capability, but on its own it is a stateless, passive, function-like service. It does not perceive the environment proactively, and it cannot operate external systems directly.
    • Harness: All the engineering work other than the model itself. It is the critical middle layer between the model and the real workflow, covering context management, tool invocation, task planning, file reading and writing, code modification, terminal execution, feedback collection, and evaluation loops.
    • Agent: The complete agent product formed by combining the model and the harness, able to enter and handle an actual workflow.

    Understanding the formula means understanding the nature of agent products: model capability is a necessary condition, but not a sufficient one. No matter how capable the model is, without careful context scheduling, reliable tool execution, and a complete feedback mechanism, it still cannot finish multi-step real-world tasks.

    2. Why a Model Cannot Be an Agent on Its Own

    From an engineering perspective, several gaps separate the model from the real workflow, and the harness exists to close them one by one.

    2.1 The Context Gap

    A model’s context window is limited, while real tasks often involve large numbers of files, long conversation histories, and multiple rounds of tool results. The harness has to own context management: deciding what information enters the context, how to compress history, how to retrieve critical fragments, and how to maintain state consistency across a long task. This is exactly why “context engineering” has become a distinct technical discipline in recent years. Prompt orchestration, memory persistence, and multi-turn state pruning strategies all directly determine how an agent performs on long tasks.

    2.2 The Action Gap

    The model’s output is only text. Turning text into “action” requires a tool invocation infrastructure: defining tool schemas, parsing the model’s invocation intent, executing the actual file operations or terminal commands, and writing the execution results back in a form the model can understand. A failure at any of these steps will interrupt the task or produce dangerous operations.

    2.3 The Planning Gap

    Complex tasks must be decomposed into subtasks, tracked with a to-do list, and re-planned dynamically during execution. The model can produce a plan within a single inference pass, but maintaining plan state across multiple turns, tracking progress, and rolling back from failures are harness responsibilities.

    2.4 The Evaluation Gap

    Agent output quality is hard to assess through a single question-and-answer exchange. The harness needs to build a feedback collection and evaluation loop: recording the execution trace of each task, comparing it against expected results, gathering user feedback, and forming a quantifiable evaluation system that continuously drives iteration of both the model and the framework.

    3. The Capability Layers of a Harness

    A mature harness can usually be divided into the following layers:

    1. ┌────────────────────────────────────┐
    2. │ Interaction: chat UI, IDE, API │
    3. ├────────────────────────────────────┤
    4. │ Orchestration: planning, scheduling,│
    5. │ subtask decomposition │
    6. ├────────────────────────────────────┤
    7. │ Context: memory, history compression│
    8. ├────────────────────────────────────┤
    9. │ Tools: file I/O, code edits, shell │
    10. ├────────────────────────────────────┤
    11. │ Governance: permissions, sandbox, │
    12. │ audit logs │
    13. ├────────────────────────────────────┤
    14. │ Evaluation: traces, feedback loop │
    15. └────────────────────────────────────┘

    The governance layer deserves particular emphasis. Once an agent can modify files and execute commands, security boundary design becomes critical: which operations require human confirmation, how to isolate work in a sandbox, and how to restrict destructive commands. All of this must be implemented at the harness layer rather than relying on the model to “behave itself.”

    4. The “Everything Is a Plugin” Architecture

    One widely accepted principle in harness design is “everything is a plugin”: the framework itself keeps a minimal kernel, and all capabilities (tools, context strategies, evaluators, even the interaction layer) are attached as plugins.

    This plugin-based open architecture brings three clear advantages:

    1. Extensibility: New tools, data sources, and workflows can be attached through standardized interfaces without modifying the framework kernel. Developers can build custom plugins for their own business scenarios.
    2. Replaceability: Models can be upgraded, context strategies can be switched per scenario, and tool implementations can be replaced or optimized, while the overall architecture stays stable.
    3. Ecosystem effects: An open plugin specification lets the community and third parties contribute capabilities, creating a flywheel. This is also why mainstream agent frameworks generally follow a plugin-based, open-source path.

    A sketch of a plugin interface abstraction:

    1. class Tool(Protocol):
    2. name: str
    3. description: str
    4. schema: dict # Parameter definition for the model to understand
    5. def execute(self, params: dict) -> ToolResult:
    6. """Execute the tool and return a structured result for the harness to write back into the context"""
    7. ...

    The framework kernel is only responsible for discovering plugins, injecting plugin descriptions into the model context, dispatching execution, and collecting results. All actual capability lives in the plugins.

    5. From Formula to Product: A Practical Path

    Looking at industry practice, turning this formula into an agent product usually follows a clear path:

    1. Build a dedicated team: Agent products need people who understand both model characteristics and software engineering. Many teams create a dedicated product manager role responsible for translating model capability into product form and clarifying the division of labor: the model is the foundation, the framework is the key.
    2. Focus on a vertical scenario: Coding agents are often the first to ship, because programming tasks have clear verification standards (does it compile, do the tests pass). The feedback loop is naturally clean, which makes them a good place to refine the harness’s planning and tool execution capabilities.
    3. Validate with a small gray release: Start with internal testing for a selected group of seed users, collect high-density feedback, then expand the scope gradually.
    4. Release in step with model versions: The harness and new model versions often evolve together, because changes on the model side (context length, tool calling format, multimodal capability) directly affect framework-layer design.
    5. Build an ecosystem through open source: Open a developer preview under a permissive license to attract external contributors to the plugin ecosystem, while the evaluation loop continuously collects real-world scenario data.

    Organizationally, merging the framework team with the frontend, mobile, and platform teams into a single product department helps avoid the split where “the model team builds the model and the product team builds a shell,” keeping model iteration and product evolution in sync.

    6. What This Means for Developers

    “Model + Harness = Agent” is not just a formula but an engineering methodology:

    • Don’t overestimate the model, and don’t underestimate the engineering. Most of an agent product’s differentiating competitiveness comes from the design quality of the harness layer, not from model capability alone.
    • Treat context as a first-class citizen. The quality of your context management strategy usually matters more than the wording of your prompts.
    • Get security and evaluation in early. Permission control, sandbox isolation, and evaluation loops should be part of architecture design, not patches added afterward.
    • Embrace plugins. Keeping the kernel small and capabilities pluggable is what preserves architectural flexibility in the face of fast-moving model technology.

    As model capability keeps improving, the boundary between harness and model may be redrawn, and some framework capabilities will be absorbed into native model features. What is certain is that the “harness” layer connecting the model to the real world will remain a central battleground in agent engineering for a long time. For developers, understanding and mastering harness design is a required course for building high-quality agent products.