The harness is the layer most agent directories omit entirely, which is odd, because in practice it is the first thing you choose. The model thinks; the harness is what reads files, runs commands, calls tools, keeps the session, and decides when to stop and ask a human.
A framework is a library you write orchestration in — you own the loop, and the library gives you graph execution, checkpointing or type-safe outputs. A harness is a loop that already exists, which you configure and drive.
The practical test: if you are writing the while-loop that calls the model and dispatches tools, you are using a framework. If something else runs that loop and you supply tools, prompts and permissions, you are using a harness.
Choosing a harness settles more than it appears: how tools are declared, how sessions persist, what the approval model looks like, how context is compacted when it overflows, and how far the agent can go before a human intervenes. These are the properties you will care most about in production, and they are harder to change later than the model.
The category expanded sharply in 2026. Alongside the vendor coding agents, several harnesses now treat the loop itself as the product: one where prompts, skills, sub-agents and memory are state the agent can create and revise mid-run; one where every part including the agent loop is a swappable plugin; and several self-hosted gateways that put a single agent into Slack, Telegram and WhatsApp at once.
Two properties are worth weighing directly. Whether the harness is model-agnostic, since a harness tied to one vendor's models is a harness tied to that vendor's pricing. And whether it improves with use — some now write their own skills from experience and carry them into later sessions.
An agent harness is the runtime that executes the agent loop: it reads files, runs shell commands, calls tools, manages the session and handles approvals. The model supplies the reasoning; the harness connects it to the real world.
A framework is a library you use to build your own loop. A harness is a loop that already exists, which you configure. If you are writing the code that calls the model and dispatches tools, that is a framework; if something else runs that loop for you, that is a harness.
No, but it is usually the faster path. Writing your own loop with a model API and a tool dispatcher is entirely viable and gives you full control. A harness saves you the session management, context compaction and approval plumbing you would otherwise build yourself.
Every page here answers to Accept: text/markdown and returns the same content at roughly a tenth the tokens. No separate site, no toggle — same URL.
curl -s -H "Accept: text/markdown" https://newagent.build/guides/what-is-an-agent-harness