AI Stack Library · Start here
Agent vs harness: the difference, and why the harness is the part a business should choose with care
An agent is the job an AI model does when it plans its own steps and calls tools; the harness is the software around the model that runs that job, handing it tools, loading its memory and rules, asking for permission and keeping the log.
| If you want to | Start with |
|---|---|
| Try an agent on your own work this week | A harness that runs on your computer, such as Claude Code, Codex CLI or Goose |
| Build an agent into your own product | An agent SDK, such as the Claude Agent SDK or the OpenAI Agents SDK, so you get the loop and the tools without writing them |
| Have someone else run the agent for you | A hosted harness, such as Anthropic's Managed Agents, which runs the agent loop in a sandbox for you |
The model, the harness and the agent
Think of a delivery van. The model is the engine: it reads, writes and decides the next step. The harness is the van around it: the steering, the brakes, the doors that lock, and the logbook in the glovebox. The agent is the delivery itself, from the depot to the customer's door.
Anthropic's engineering team uses the word the same way: the harness is the framework that lets a model use tools to gather context, plan and act, and that manages its context as the job runs.
Why the harness matters more to a business than the model
Your rules, your approvals and your logs live in the harness. Swap the model and the harness keeps all three. Swap the harness and you rebuild them.
So choose the harness first and the model second. The model you use this year will probably not be the one you use next year. The place where your business rules are enforced should stay put.
Five things to check before you pick a harness
- Permissions: can you require a person's approval before it sends, spends or deletes?
- Hooks: can you run your own check before a tool call goes through?
- Rules and memory: does it read a rules file such as AGENTS.md at the start of every session?
- Logs: can you see every command it ran and every file it changed?
- Models: can you change the model without changing the harness?
Questions
Should a business build its own harness?
Start with an existing one and build only the part it lacks, such as a check for the one action your business can never get wrong.
Is the agent SDK a harness?
It is the harness as a library. The Claude Agent SDK, for example, gives your own code the same tools, agent loop and context management that run Claude Code.
Sources
- Anthropic: Effective harnesses for long-running agents, checked 2026-10-20
- Claude Agent SDK overview, checked 2026-10-20
- Anthropic: Building effective agents, checked 2026-10-20
- OpenAI Agents SDK, checked 2026-10-20
- Goose, checked 2026-10-20