Concept guide

AI Harness vs Agent Framework: What's the Difference (and Why Most People Pull the Wrong Lever)

By Bruno Americo · July 19, 2026

An agent framework is a library you build with. The harness is something else: every piece of code, configuration, and execution logic that isn't the model. They aren't synonyms, and conflating them makes you pull the wrong lever. LangChain sums up the relationship in a formula, Agent = Model + Harness. Choosing a framework isn't the same as engineering a harness.

The term everyone swaps

Four words travel together and blur into synonyms in conversation: model, wrapper, framework, and harness. They aren't the same thing. The model is the raw LLM, it predicts the next token and nothing more. A wrapper is thin glue, a script that formats the prompt and calls the API. A framework is the library you write the agent loop with. And the harness is the whole thing around the model: rules, tools, memory, gates, verification. When someone asks 'which framework should I use,' they're usually asking the wrong question. The decision that matters is which harness you're going to build.

The proof is in how the tools describe themselves

Look at how each tool names itself. LlamaIndex calls itself 'the framework for Context-Augmented LLM Applications'. CrewAI is an 'open-source framework for orchestrating autonomous AI agents'. AutoGen is 'a framework for building AI agents'. Framework is their category, and that's correct: it's a library for building. LangChain uses a different word for the result: it calls create_agent 'a minimal, highly configurable agent harness' and sums it all up as Agent = Model + Harness. Anthropic does the same: 'The Claude Agent SDK is a powerful, general-purpose agent harness' (November 2025). A framework is what you use; a harness is what you assemble.

Model, wrapper, framework, harness, agent

TermWhat it isExample
ModelThe raw LLM. Predicts the next token, no state, tools, or memory.gpt-5.2, Claude, Gemini
WrapperThin glue around an API call. Not engineering, just a shell.A script that only formats a prompt and calls the API
FrameworkThe library you write the agent loop with.LangChain, LlamaIndex, CrewAI, AutoGen
HarnessAll the code, configuration, and execution logic that isn't the model.Rules, tools, gates, memory, and verification around the model
AgentThe result: the model plus the harness running in a loop.Agent = Model + Harness (LangChain's formula)

The framework is the tool you build the harness with

None of this means frameworks are bad. A framework is the tool you build the harness with, and a good library saves you weeks. The mistake isn't using a framework. The mistake is thinking that picking one solves the problem. Nicolas Bustamante puts it well: 'The harness is no longer a wrapper around the model' (Model-Harness-Fit, May 2026). In other words, the harness stopped being thin glue and became real engineering. A framework gives you the parts. The harness is what you do with them, and it's where the agent passes or fails in production.

Where the difference becomes real work

In practice, the harness most people see first is the coding one: Claude Code, Cursor, agents that read a repository and run tests. That's where the difference gets concrete. You import the framework; you engineer the harness around it. We ship the coding layer ready with capivaOS, the open-source harness on top of Claude Code. If you're still sorting out which is which, start from the definition in What is an AI Harness.

Frequently asked questions

What's the difference between an AI harness and an agent framework?

A framework is a library for building the agent: you import it and write the loop with it (LangChain, LlamaIndex, CrewAI, and AutoGen all describe themselves as frameworks). A harness is the whole thing around the model: the code, configuration, and execution logic that isn't the model. You build the harness using the framework, you don't choose one instead of the other.

Is a harness the same as a wrapper?

No. A wrapper is thin glue: a script that formats the prompt and calls the API. A harness is engineering: rules, tools, memory, gates, and verification designed around the model. Nicolas Bustamante sums it up: 'The harness is no longer a wrapper around the model' (May 2026).

What does Agent = Model + Harness mean?

It's LangChain's formula (Vivek Trivedy, March 2026): the agent is the model plus the harness running around it. LangChain calls its own create_agent 'a minimal, highly configurable agent harness'. The formula is LangChain's; the discipline of designing the harness, called harness engineering, was named by Mitchell Hashimoto.

So are agent frameworks bad?

No. A framework is the tool you build the harness with, and a good library saves weeks of work. The point isn't to avoid frameworks, it's to stop treating the framework choice as if it solves the problem. The real work is engineering the harness.

What counts as part of the harness and not the model?

Everything that isn't the LLM: the system prompt and rules, tools and permissions, cross-session memory, quality gates, verification, and the loop's orchestration logic. Anthropic describes the Claude Agent SDK as 'a powerful, general-purpose agent harness' (November 2025), precisely because it includes that entire layer.

Should I ask 'which framework' or 'which harness'?

Start with the second question. A framework is a library decision, reversible and smaller. Which harness you build (which rules, tools, gates, and memory) is the decision that determines whether the agent works in production. Choosing a framework isn't engineering a harness.

You choose the framework. You engineer the harness, and it's the harness that decides whether the agent works.

capivaOS on GitHub →What is an AI Harness? →Strategic diagnosis →