An agent harness is the software around an AI model that turns it into an agent: the loop that keeps it working, the tools it can use, the memory it keeps, and the rules that stop it doing damage. The model does the thinking; the harness lets it act. Claude Code, OpenAI's Codex and OpenClaw are all harnesses. A complete one has nine parts: an iteration loop, context management, tools and skills, subagents, built-in skills, session persistence, system prompt assembly, lifecycle hooks and permissions.
Most of my students start in the same place. They try an AI tool for real work, it's impressive in the demo, and then it breaks on the third step of an actual task. Their conclusion is usually "the model isn't good enough yet".
Most of the time, the model is fine. What's missing is everything around it.
What is an agent harness, in plain English?
Think of the model as an engine. On its own, an engine doesn't take you anywhere. You need a car around it: steering, brakes, a fuel gauge, a dashboard. The harness is the car.
A chatbot answers once and stops. An agent works in a loop: it decides what to do, uses a tool (search the web, open a file, send an email), looks at the result and decides the next step, until the job is done. Everything that makes that loop work reliably is the harness.
Agent = model + harness. Change the model and you change how smart it is. Change the harness and you change what it can actually get done.
This isn't theory. In one widely cited case, a LangChain coding agent moved from 30th to 5th place on the Terminal Bench 2.0 coding benchmark without changing the model at all. Only the harness changed.
Why is everyone talking about harnesses right now?
Because in the last month the biggest AI companies stopped selling just models and started selling the harness too:
- OpenAI (10 Sep 2026) launched the Agents API in public beta: the harness behind Codex, hosted and maintained by OpenAI. It handles long-running sessions, automatic context compaction, subagents and sandboxes, so developers don't have to build them.
- Yext (2 Oct) launched a "multiplayer agent harness" for marketing teams, where head office, local marketers, franchisees and agencies work with the same agents and the same brand memory.
- DeepSeek (3 Oct) released DeepSeek Harness v0.2, its open-source harness (MIT licence, 240,000+ GitHub stars), now with desktop apps for Mac and Windows, a plugin manager and scheduled automations.
- Cohere (5 Oct) launched North 2 with a redesigned orchestration harness, memory that carries across sessions, and per-agent guardrails and cost controls for enterprises.
The message from all four is the same: the model is becoming a component. The product is the harness.
The 9 parts of an agent harness
The clearest map I've seen comes from Aparna Dhinakaran at Arize AI, who broke a modern harness into nine parts. Here they are, with what each one means if you're using agents for work rather than building them.
- 01Iteration loop
- 02Context management
- 03Tools & skills
- 04Subagent management
- 05Built-in skills
- 06Session persistence
- 07System prompt assembly
- 08Lifecycle hooks
- 09Permissions & safety
Iteration loop
What it is: the cycle of think → act → check → repeat until the task is done.
Why it matters to you: it's the difference between "write me a report" (one answer) and "research these 20 competitors and write me a report" (an agent that keeps going).
Context management
What it is: deciding what the model sees, and summarising ("compacting") older history when the conversation gets long.
Why it matters to you: it's why long sessions get worse and more expensive. A good harness keeps the agent focused, and the bill down.
Tools & skills
What it is: the list of things the agent can do (search, read files, use your CRM) plus "skills": instruction files for how your team does specific jobs.
Why it matters to you: skills are where your know-how lives. Write the process once; the agent follows it every time.
Subagent management
What it is: the main agent hands pieces of work to helper agents, each with its own clean context and limited tools, then collects their results.
Why it matters to you: this is how you run a big job on a cheap model. The main agent plans; small models do the volume work (more on that in my Haiku vs Opus breakdown).
Built-in skills
What it is: the basics that ship ready to use: working with files, running commands, searching, testing.
Why it matters to you: you shouldn't have to teach an agent how to open a spreadsheet. A good harness does the basics out of the box.
Session persistence
What it is: saving progress as the agent works, so it can pick up where it left off after a crash or the next day.
Why it matters to you: without it, a three-hour job that fails at minute 170 starts from zero.
System prompt assembly
What it is: building the agent's standing instructions automatically from your project files, rules and current situation.
Why it matters to you: this is why a file like CLAUDE.md or a project brief works: write your context once and every session starts briefed.
Lifecycle hooks
What it is: custom checks that run automatically before or after the agent acts, like "before sending any email, check it's not going to a client".
Why it matters to you: hooks turn your business rules into hard rules, not polite requests the model might forget.
Permissions & safety
What it is: deciding what the agent may do on its own, what needs your approval, and what it can never do.
Why it matters to you: read-only, ask-first or full access. This is the setting that decides whether you can trust an agent with real accounts.
Harness vs framework: what's the difference?
A framework (LangChain, LangGraph, n8n) is a box of parts: a person designs the agent and wires the pieces together. A harness comes assembled and is built to handle a wide range of tasks out of the box. As Arize puts it bluntly: "LangChain is not a harness. LangGraph is not a harness."
| Framework | Harness | |
|---|---|---|
| Who designs the flow | You, step by step | The agent, inside the harness's rules |
| Best for | Fixed, repeatable processes | Open-ended work that changes each time |
| Examples | LangGraph, n8n, Make | Claude Code, Codex, OpenClaw, DeepSeek Harness |
| Main risk | Breaks when reality doesn't match the diagram | Does too much if permissions are loose |
In practice, the strongest setups use both. You design the process as a map of jobs and handoffs (what I teach as graph engineering), and a harness runs each job.
Is your agent setup ready for real work? 9-point check
Tick what your current setup has, whether that's Claude Code, ChatGPT agents, OpenClaw or something your team built.
Tick what applies to see where you stand.
The guardrail nobody sets: a budget cap
Agents that run for hours can also spend for hours. Simon Willison, one of the most-read independent voices on AI engineering, argued this month that autonomous agents need hard spending caps by default, not just warnings. I agree. Before you let any agent run unattended, set three limits:
- A money cap on the API account or the tool, at an amount you'd be fine losing.
- A permission level: start in read-only or ask-before-acting mode, and open up one tool at a time.
- A no-go list: things it never does alone, such as paying, deleting, or messaging clients.
How to start using a harness (without being a developer)
- Pick one harness. If you're on Claude, start with Claude Code or the agent features in the Claude app. If you want it self-hosted and on WhatsApp or Telegram, OpenClaw.
- Write your context file. One page: who you are, what the business does, your rules, your tone. That feeds part 07.
- Turn one repeated process into a skill. The weekly report, the proposal, the lead check. That's part 03.
- Connect one tool. Usually email or your files first.
- Set permissions and a budget before anything runs unattended (part 09).
Copy this prompt: audit your own agent setup
Paste this into Claude or ChatGPT and describe how you currently use AI agents. You'll get a gap list against the nine parts.
You are an AI agent architect. Audit my current AI agent setup against the 9 parts of an agent harness: 1. Iteration loop (keeps working until the task is done) 2. Context management (summarises long sessions, controls what the model sees) 3. Tools & skills (connected tools + written instructions for my processes) 4. Subagent management (splits work across helper agents / cheaper models) 5. Built-in skills (files, search, commands out of the box) 6. Session persistence (resumes after a crash or the next day) 7. System prompt assembly (starts every session with my business context) 8. Lifecycle hooks (automatic checks before/after actions) 9. Permissions & safety (what it can do alone vs with my approval, budget caps) For each part: rate it Missing / Partial / Solid based on my description, explain the risk in one line, and give one concrete fix I can do this week without writing code. Finish with: the 3 fixes that would make the biggest difference, in order. My current setup: [describe the tools you use, what you use them for, and what goes wrong]
Want a harness set up for your work, properly?
In Personal AI Setup we build yours together: context file, your first skills, the right connections and safe permissions, on your real tasks. Start with a 49€ diagnostic.
Book a 49€ diagnostic →FAQ
What is an agent harness?
An agent harness is the software around an AI model that turns it into an agent. It runs the work loop, manages context and memory, connects tools and skills, coordinates helper agents, saves progress, assembles instructions, runs automatic checks and enforces permissions.
Is Claude Code an agent harness?
Yes. Claude Code is Anthropic's agent harness: it wraps Claude models with a work loop, tools, skills, subagents, hooks, project instructions and permission modes. OpenAI's Codex, OpenClaw and DeepSeek Harness are other examples.
What is the difference between an agent harness and an agent framework?
A framework such as LangChain or LangGraph gives you parts to assemble an agent yourself. A harness comes assembled and is designed to handle a wide range of tasks out of the box, with the agent deciding the steps inside the harness's rules.
What is harness engineering?
Harness engineering is improving the environment around a model (tools, context, checks, permissions, verification) so the agent performs reliably. It follows prompt engineering and context engineering, and often improves results more than switching models.
Do I need to build my own harness?
Usually not. Most professionals and small businesses should use an existing harness such as Claude Code, Codex or OpenClaw and customise it with a context file, skills, connections and permissions.
Which agent harnesses launched recently?
OpenAI's Agents API (September 2026) offers the Codex harness as a managed service. Yext launched a multiplayer agent harness for marketing, DeepSeek released DeepSeek Harness v0.2, and Cohere launched North 2 with a redesigned harness, all in early October 2026.
The model is a commodity. Your setup isn't.
One-to-one coaching for professionals and business owners: we turn the AI you already pay for into an agent that knows your business and works safely on your real tasks.
Book a 49€ diagnostic → See Personal AI SetupSources: Arize AI: What is an agent harness? (Aparna Dhinakaran, the 9-part architecture and harness vs framework); OpenAI: Introducing the Agents API (10 Sep 2026); FF News: Yext launches a multiplayer agent harness (2 Oct 2026); MarkTechPost: DeepSeek Harness v0.2 (3 Oct 2026); Unite.AI: Cohere launches North 2 (5 Oct 2026); Faros: Harness engineering (Terminal Bench result, reported secondhand); DEV: The agent harness goes platform-native (budget-cap debate). Diagram redrawn from Arize's architecture. As of 9 October 2026.