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

An agent framework is a library you build an agent with, such as CrewAI or the OpenAI Agents SDK; an agent harness is the running system around the model in one agent: its prompts, tools, context handling, hooks, sandbox, and the loop that runs them. Every agent has a harness, and a framework is one optional way to build it. Addy Osmani's [write-up](https://www.oreilly.com/radar/agent-harness-engineering/) defines a harness as "every piece of code, configuration, and execution logic that isn't the model itself," so a framework running your agent is part of its harness too.

The best-known coding harnesses use no framework. A [source-code study of eleven coding harnesses](https://arxiv.org/abs/2609.00006), including Claude Code, Codex CLI, and Aider, found that "no agent runtime imports a general-purpose agentic framework." The [Claude Agent SDK](/answers/claude-agent-sdk-evals/whats-the-difference-between-the-claude-agent-sdk-and-langchain) blurs the line: it's a library that ships Claude Code's finished loop rather than building blocks. LangChain [uses harness for that kind of library](https://www.langchain.com/blog/agent-frameworks-runtimes-and-harnesses-oh-my), calling LangChain a framework, LangGraph a runtime, and Deep Agents, which adds default prompts, planning tools, and a filesystem, a harness.

So a framework upgrade is a harness change even when none of your own code moved, and it can shift results just as a prompt edit can.

---

Sources:
- Addy Osmani, "Agent Harness Engineering" (O'Reilly Radar, May 15, 2026): https://www.oreilly.com/radar/agent-harness-engineering/ (fetched 2026-10-03)
- Harness Engineering: Anatomy, Architecture, and Evolution of Coding Agents (arXiv:2609.00006): https://arxiv.org/abs/2609.00006 (fetched 2026-10-03)
- Harrison Chase, "Agent Frameworks, Runtimes, and Harnesses- oh my!" (LangChain, October 25, 2025): https://www.langchain.com/blog/agent-frameworks-runtimes-and-harnesses-oh-my (fetched 2026-10-03)

Source: https://tessary.ai/answers/agent-harness/whats-the-difference-between-an-agent-harness-and-an-agent-framework
More on Agent harness: https://tessary.ai/answers/agent-harness
From Tessary, agent reliability for AI agents in production: https://tessary.ai
