Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

seo-engine: refresh what-is-a-multi-agent-harness

chaitanyagiri4a31db6ccc05
diff --git a/blog/src/posts/what-is-a-multi-agent-harness.md b/blog/src/posts/what-is-a-multi-agent-harness.md
index 451f7656..ababd6ec 100644
--- a/blog/src/posts/what-is-a-multi-agent-harness.md
+++ b/blog/src/posts/what-is-a-multi-agent-harness.md
@@ -1,94 +1,115 @@
---
-title: "What Is a Multi-Agent Harness? A Plain English Guide"
-description: "A multi-agent harness runs several AI coding agents as one team, with roles, messages, shared memory and an orchestrator. What it is, how it differs from a framework, subagents or agent teams, and when you need one."
+title: "What Is an AI Agent Harness? Single vs Multi-Agent, Explained"
+description: "An agent harness is the code around an AI model that runs its tool loop, memory and permissions. Single vs multi-agent harnesses, compared and dated."
date: 2026-05-22
-updated: 2026-09-10
+updated: 2026-09-29
category: concepts
categoryLabel: Concepts
type: Non-technical
-primaryKeyword: "claude code multi-agent"
-secondaryKeywords: ["multi-agent harness", "what is an agent harness", "multi-agent ai framework", "ai agent harness", "claude code agent teams vs harness"]
+primaryKeyword: "agent harness"
+secondaryKeywords: ["ai agent harness", "harness agent", "what is an agent harness", "multi-agent harness", "agent harness vs framework", "is claude code an agent harness"]
tags: ["Concepts", "Multi-Agent", "Claude Code"]
author:
name: Chaitanya Giri
initials: CG
faq:
+ - q: "What is an agent harness in simple terms?"
+ a: "It is everything around the model that lets it act: the loop that calls the model, runs the tools it asks for and feeds the results back, plus memory, permissions and a workspace. The usual shorthand is agent = model + harness."
+ - q: "Is Claude Code an agent harness?"
+ a: "Yes, a single agent one. Anthropic describes the Claude Agent SDK as the agent harness that powers Claude Code, with the same tools, agent loop and context management. It runs one agent, which can spawn subagents and, as an experimental feature, a team of other Claude Code sessions."
+ - q: "What is the difference between an agent harness and an agent framework?"
+ a: "A framework is a library you write an agent with. A harness is the runtime that actually drives the model and its tools. The line blurs in practice: Microsoft ships a Harness inside Agent Framework, and LangChain's Deep Agents is a library that calls itself an agent harness."
- q: "What is a multi-agent harness?"
- a: "Software that runs several AI agents at the same time and makes them work as one team. Each agent gets a role, agents pass messages to each other, they share long term memory, and a coordinator hands out the work."
- - q: "How is a harness different from a framework like LangGraph or CrewAI?"
- a: "A framework is a library you write a new agent application with. A harness wraps agents you already run, like Claude Code or Codex in a terminal, and adds the coordination around them. You do not rebuild anything."
- - q: "Is Claude Code's agent teams feature a multi-agent harness?"
- a: "It covers part of the idea inside Claude Code. Agent teams are experimental and off by default. A lead session spawns teammates that share a task list and message each other, and a team belongs to that one session. A harness keeps agents working across sessions, remembers between them, and can mix CLIs from different vendors."
- - q: "Do I need a multi-agent harness to use Claude Code?"
- a: "No. One session is plenty for most tasks. A harness starts paying for itself when you run three or more agents at once and keeping them coordinated costs you more time than the work does."
- - q: "Is Munder Difflin a multi-agent harness?"
- a: "Yes. It is a free, open source harness that runs twelve terminal coding CLIs, including Claude Code, Codex, Gemini CLI and Copilot, on your own machine, with your clone Michael coordinating them."
+ a: "Software that runs several single agent harnesses at once and makes them work as a team. It adds roles, messages between agents, a shared plan and memory, an orchestrator that hands out work, and guardrails across the whole group."
+ - q: "Is Harness Agents the same thing as an agent harness?"
+ a: "No. Harness Agents is a product from Harness, the CI/CD company, described on its own docs as AI agents that run inside your pipelines. An agent harness is the general term for the software that runs any AI agent."
---
-<div class="callout tldr"><span class="ic">TL;DR</span><p>A <strong>multi-agent harness</strong> runs
-several AI coding agents at once and makes them behave like a team: each has a role, they message each
-other, they share memory, and a coordinator routes the work. It is the layer that turns five terminal
-windows into one office.</p></div>
+An agent harness is the software around an AI model that turns it into an agent: it calls the model, runs the tools the model asks for, feeds the results back, and keeps track of memory, permissions and the workspace. The model thinks. The harness does everything else.
-If you have ever run two AI coding agents at the same time, you already know the problem. They edit the
-same file, neither knows what the other did, and you become the message bus, copying context from one
-window to the next. A **multi-agent harness** is the software that takes that job off your hands.
+The term has two meanings in the wild. Anthropic, LangChain and Microsoft use it for the loop around one model, so Claude Code is a harness. Others, us included, also use it for the layer that runs several of those agents as one team: a **multi-agent harness**. This page covers both, then what the multi agent version adds.
-## What is a multi-agent harness?
+If you searched "harness agent" looking for Harness, the CI/CD company, its [Harness Agents](https://developer.harness.io/harness-ai/3.0/use-harness-ai/ai-agents/harness-agents) are, in its own words, "autonomous AI agents that run inside your pipelines". Same word, different office.
-It is software that runs several AI agents at the same time and coordinates them. That coordination comes
-down to four things: roles, messaging, shared memory and routing. Everything else is detail about how a
-particular harness does those four things.
+You can build a multi agent setup by hand with git worktrees and a few terminals, or use [Munder Difflin](https://harnessmd.com/download), free and open source, which is the multi-agent harness this blog is written by. The [install guide](/blog/how-to-install-and-use-munder-difflin/) gets you from download to a first agent.
-The easiest picture is an office. The agents are the staff. The harness is the building: desks, mailboxes,
-a filing cabinet everyone can read, and a manager who decides who does what.
+## What does an agent harness actually do?
-{% img "note-1" %}
+It runs the loop the model cannot run by itself. A language model only produces text, so something has to notice a tool call in that text, execute it, and hand back the result. LangChain's [anatomy of an agent harness](https://www.langchain.com/blog/the-anatomy-of-an-agent-harness) (10 Mar 2026) puts it bluntly: a harness is "every piece of code, configuration, and execution logic that isn't the model itself." In practice that covers:
+
+- **Tool dispatch.** Reading files, running commands, calling MCP servers, searching the web.
+- **Context and memory.** Keeping the conversation, compacting it when it gets long, and loading project instructions such as `CLAUDE.md`.
+- **Permissions.** Deciding which tools run on their own and which need your approval.
+- **A workspace.** A directory, a sandbox or a container the agent is allowed to touch.
+- **Hooks and logs.** Code that runs at set points in the loop, so you can see and steer what happened.
+
+Microsoft's [Agent Framework docs](https://learn.microsoft.com/en-us/agent-framework/concepts/harness) (updated Sep 2026) give the same shape in one line: "the runtime scaffolding that turns a language model into an agent that can perform work."
-## What does a harness add on top of a single agent?
+## Is Claude Code an agent harness?
-Five things a lone agent does not have. A single coding agent is a loop: read the context, act, check the
-result, repeat. A harness wraps many of those loops and adds:
+Yes, in the single agent sense. When Anthropic renamed the Claude Code SDK to the Claude Agent SDK on 29 Sep 2025, it called it "the agent harness that powers Claude Code". The [Agent SDK overview](https://code.claude.com/docs/en/agent-sdk/overview) says it gives you "the same tools, agent loop, and context management that power Claude Code", in Python and TypeScript. Claude Code is that harness with a terminal on top.
+
+## Is an agent harness the same as an agent framework?
+
+No, though the line is blurry. A framework is a library you write an agent with; a harness is the runtime that drives it. The blur is real: Microsoft ships a Harness inside Agent Framework, and LangChain's [Deep Agents](https://github.com/langchain-ai/deepagents) is a library that calls itself "the batteries-included agent harness". A useful test: are you writing the agent, or running one that already exists? Our [CrewAI and AutoGen comparison](/blog/crewai-autogen-vs-a-local-agent-harness/) covers that choice in more detail.
+
+## What is a multi-agent harness?
+
+A multi-agent harness runs several single agent harnesses at the same time and makes them behave like one team. Anthropic's own write-up on [harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) (26 Nov 2025) already splits the work between "an initializer agent" and "a coding agent", which is the smallest team there is. A multi-agent harness generalises that. On top of each agent's own loop it adds:
- **Roles.** A researcher, a builder and a reviewer, instead of five generalists stepping on each other.
-- **Messaging.** Agents hand findings to each other directly, not through you.
-- **Shared memory.** What one agent learned on Monday is still there for another agent on Thursday.
-- **Orchestration.** One coordinator turns your request into tasks and assigns them. In Munder Difflin that
- coordinator is Michael, a clone of you that you talk to in plain language.
-- **Visibility.** A way to see what the whole team is doing without tailing five terminals.
+- **Messaging.** Agents hand findings to each other directly, not through you copying text between windows.
+- **A shared plan and lasting memory.** A board everyone reads, and notes that survive a restart.
+- **An orchestrator.** One coordinator turns your request into tasks and assigns them.
+- **Isolation.** Each worker gets its own working copy, so two agents do not edit the same file.
+- **Guardrails for the group.** A loop or a runaway token bill is caught across the floor, not per window.
+- **Mixed vendors.** Because it sits outside any one CLI, it can put Claude Code next to Codex or Gemini CLI.
+
+{% img "note-1" %}
-## What is the difference between a harness, a framework, subagents and agent teams?
+## What does a multi-agent harness look like in code?
-What you bring, and how long the team lasts. These four get mixed up constantly, so here they are side by side.
+Mostly files and a router. We read the Munder Difflin source at tag v0.5.3 on 29 Sep 2026, and the coordination layer lives in `src/main/hive.ts`. Every agent gets a folder with an identity, a memory file, an inbox, an outbox and a read cursor. A router in the main process moves each outbox message into the recipient's inbox, and that process is the only one that commits to the hive's git repo, so agents never race on git. The shared plan is `board.md`, and only the orchestrator (Michael, your clone) writes to it.
-### Framework
+This page was refreshed by a Munder Difflin worker. Running this inside its own hive folder on 29 Sep 2026 (the grep hides unrelated files) printed:
-A library such as LangGraph, CrewAI or AutoGen that you **build an agent application with**. You write the
-graph, the tools and the prompts. Powerful, and a build from scratch.
+```
+$ ls -1p | grep -E '^(identity\.md|memory\.md|cursor\.json|inbox/|outbox/)$'
+cursor.json
+identity.md
+inbox/
+memory.md
+outbox/
+```
-### Subagents
+Three other details from the same tag:
-One agent **spawning short lived helpers** inside its own run. Great for fanning out a search or a review.
-The helpers report back to their parent and are gone when the job ends.
+- When an agent tries to finish with unread mail, `drainForStop` in `src/main/hive.ts` blocks it with a message that starts "You have N new hive message(s) in your inbox. Address them before finishing".
+- `src/main/breaker.ts` watches cost, token velocity, repeated identical tool calls and file progress, and escalates one level per beat: steer, then constrain, then stop. `hardStop` is off by default, so without it the ladder never kills an agent.
+- `src/shared/agentProvider.ts` lists twelve CLIs plus a custom slot: Claude Code, Codex, Gemini CLI, Antigravity, Grok, Kimi Code, Qwen, OpenCode, Crush, Pi, Copilot and Cursor. Each runs in its own terminal through `node-pty` (`src/main/pty.ts`), signed in the way that CLI already is.
-### Agent teams inside Claude Code
+Questions that need a human land on the ASK ME board rather than in a scrollback. What it does not do: it is a desktop app, not a library, so it will not help you ship an agent inside your own product.
-Claude Code's own [agent teams](https://code.claude.com/docs/en/agent-teams) sit in between, and they are
-still experimental and off by default. A lead session spawns teammates that share a task list and message
-each other directly. A team belongs to a single session, and every teammate is a Claude Code instance.
+## Which agent harnesses can you use today?
-### Harness
+Here is how the main options line up, checked on 29 Sep 2026. Munder Difflin rows come from the v0.5.3 source; the rest from each vendor's own docs.
-Software that **wraps the agents you already run** and keeps them working together over time. You keep
-using Claude Code, Codex or Gemini CLI. The harness adds messaging, memory that survives a restart, an
-orchestrator, and a view of the floor. Because it sits outside any single CLI, it can put agents from
-different vendors on the same team.
+| Harness | Kind | What runs | Multi agent support | Source |
+|---|---|---|---|---|
+| Claude Code | Single agent harness, terminal CLI | Claude models | Subagents; agent teams are experimental and off by default | [Anthropic docs](https://code.claude.com/docs/en/agent-teams) |
+| Munder Difflin | Multi-agent harness, desktop app, MIT | Twelve coding CLIs, each in its own terminal | Orchestrator, mailboxes, shared board, per agent memory, circuit breaker | v0.5.3 source, paths above |
+| Claude Agent SDK | Single agent harness as a library, Python and TypeScript | Claude Code's loop in your own process | Subagents; no teammates in SDK sessions | [Anthropic docs](https://code.claude.com/docs/en/agent-sdk/overview) |
+| Claude Code agent teams | Team inside one Claude Code session | Claude Code instances only | Lead plus teammates, shared task list, mailbox; one team per session, no nested teams | [Anthropic docs](https://code.claude.com/docs/en/agent-teams) |
+| Microsoft Agent Framework Harness | Harness as a library, .NET and Python | Your chosen chat client | Optional background agents, experimental in Python | [Microsoft Learn](https://learn.microsoft.com/en-us/agent-framework/concepts/harness) |
+| LangChain Deep Agents | Harness as a library, Python and JS, MIT | Many model providers | A `task` tool that spawns short lived subagents | [GitHub](https://github.com/langchain-ai/deepagents) |
{% img "note-2" %}
-## When do you actually need one?
+**Pick Claude Code** if one agent in one terminal does the job. **Pick Munder Difflin** if you run several CLIs at once, want them to message each other and remember across sessions, and would rather watch a floor than tail five terminals. **Pick agent teams** if every worker is Claude Code and the team only needs to last one session. **Pick the Agent SDK, Microsoft Agent Framework or Deep Agents** if you are building an agent into your own application.
+
+## Do you need a multi-agent harness?
-When coordinating your agents costs more time than the agents save you. The usual signs:
+Only when coordinating your agents costs more time than they save you. The usual signs:
- you run **three or more** sessions and lose track of which one is doing what,
- you keep **explaining the same context** because every session starts from zero,
@@ -97,27 +118,13 @@ When coordinating your agents costs more time than the agents save you. The usua
If none of that sounds familiar, one session is fine, and you can stop reading here with a clear conscience.
-## What does a harness look like in practice?
-
-Here is how [Munder Difflin](https://munderdiffl.in/) does it. Every agent is a real terminal CLI running
-on your machine, and twelve are supported: Claude Code, Codex, Gemini CLI, Antigravity, Grok, Kimi Code,
-Qwen, OpenCode, Crush, Pi, Copilot and Cursor. Each agent gets a desk on a 2D office floor, a mailbox and
-long term memory. Michael, your clone, takes your request, breaks it into tasks, hires workers and routes
-messages between them. When something needs a human decision, it lands on the ASK ME board instead of
-vanishing into a scrollback.
-
-The floor is a simulation and uses no tokens. The real work happens in the terminals underneath, on the
-subscriptions you already pay for and within their normal usage limits.
-
## Where to go next
-- [How to manage multiple Claude Code sessions](/blog/manage-multiple-claude-code-sessions/) without losing
- track of them.
-- [How to give Claude Code long term memory](/blog/give-claude-code-long-term-memory/) so the team stops
- forgetting.
+- [Claude Code subagents vs a multi-agent harness](/blog/claude-code-subagents-vs-multi-agent-harness/), for where subagents stop.
+- [What is harness engineering?](/blog/what-is-harness-engineering/), for the discipline behind building one.
+- [How to manage multiple Claude Code sessions](/blog/manage-multiple-claude-code-sessions/) without losing track of them.
- [The best tools to run multiple Claude Code agents](/blog/best-claude-code-multi-agent-tools/), compared.
---
-Munder Difflin is free and open source under the MIT license. [Download it](https://munderdiffl.in/) for
-macOS, Windows or Linux and watch a coordinated team work an office floor.
+Munder Difflin is free and open source under the MIT license. [Download it](https://harnessmd.com/download) for macOS, Windows or Linux.