Multi-Agent AI Design: Subagents and How to Split Roles
・ Employee Store Operations

Summary
A multi-agent system splits work across several AI agents, with an orchestrator directing workers. Splitting lets each agent focus on what it does best, but it also changes costs and how failures happen. Based on official sources checked in October 2026, this article covers everything from deciding whether to split to how to build it.
The content of this article was checked against the official pages of Anthropic, OpenAI, n8n and Dify on October 2, 2026. Tool features may change with updates. Check the sources at the end for the latest details before you use them.
A multi-agent setup does not hand everything to one AI. It splits roles instead, such as one agent that researches, one that writes and one that checks. It resembles dividing work in a human team. However, more splitting does not always mean better results.
What a multi-agent system is
Anthropic describes a multi-agent system as multiple agents working together. Here, an agent is an AI model that works on its own in a loop while using tools.
Anthropic's research feature is built this way. A lead agent analyzes the question, sets a plan and launches worker subagents. The workers research different angles in parallel and return their results to the lead agent. The lead agent combines the results and adds more workers if something is missing.
Each worker has its own context window. It condenses the large amount of information it found into key points before returning it. Another benefit is that tools and instructions can be split by role.
When one agent is enough
In its article on how to build agents, Anthropic recommends starting with the simplest approach and adding complexity only when needed. It says that for many uses, a single call to an AI model plus retrieval or examples is enough.
Anthropic also lists cases where multi-agent systems are a poor fit: tasks where all agents must share the same context, and tasks with many dependencies between agents. For example, it notes that most coding tasks have fewer parts that can run in parallel than research does. Good fits are tasks with many parallel parts, tasks that involve more information than fits in one context window, and tasks that use many complex tools.
What shape does the task take?
The typical pattern: orchestrator and workers
Anthropic's article calls this the orchestrator-workers pattern. A central AI breaks down the task, delegates to worker AIs and combines the results. Its defining trait is that the subtasks are not set in advance. The orchestrator decides them based on the input.
Two ways to delegate
The OpenAI Agents SDK documentation splits delegation between agents into two types.
Agents as tools
- The orchestrator keeps the conversation
- Workers return only a defined piece of work
- The orchestrator gives the final answer
Handoffs
- A triage agent passes the conversation to a specialist
- The specialist answers the user directly
- Routing itself is part of the job
The same documentation says the two can be combined. It also compares letting the AI decide the flow with deciding it in code. Deciding in code makes speed, cost and performance more predictable. Examples include picking the next agent based on a classification result, feeding one agent's output into the next, and looping until an evaluator approves the result.
Subagents in Claude Code follow the same idea. The main conversation delegates tasks that match a subagent's description and receives only a summary. How to write the configuration is explained in Building an AI Employee with Claude Code.
Deciding roles and the data passed between agents
In Anthropic's research feature, the quality of the instructions the lead agent gave to workers had a large effect on results. At first, workers received only short instructions, so they misunderstood their tasks or repeated the same searches.
Anthropic recommends including the following four items in instructions to workers.
- Objective: what to find out
- Output format: in what form to return results
- Guidance on which tools and sources to use
- Task boundaries: what to do and what not to do
The instructions should also state how many workers to use, scaled to the size of the task. In Anthropic's example, a simple fact check took one agent about 3 to 10 tool calls. Comparison tasks used 2 to 4 workers, each making about 10 to 15 calls. Complex research gave more than 10 workers clearly divided roles. An early version made the mistake of launching 50 workers for a simple question.
Keep the data passed between agents light
Feeding all worker output into the lead agent's conversation can lose information or bloat its volume. Anthropic describes having workers write their outputs to external storage and return only lightweight references to the lead agent. It says this works well for outputs with a set structure, such as code, reports and tables.
Tool descriptions are also part of dividing roles. A tool with a vague description can send an agent down an entirely wrong path. Give each tool a single purpose and a clear description.
Building it in n8n and Dify
n8n
In n8n, the AI Agent node is the core of an agent. When you connect a chat model and one or more tools, the agent decides which tools to call. The AI Agent node requires at least one tool sub-node.
For multiple agents, use the AI Agent Tool node. It lets the central agent call other agents as tools. In each worker agent's Description, state concretely what it handles. The central agent reads this description to decide whether to delegate. You can also stack further workers under a worker. You can set the maximum number of iterations and a fallback model for when the main model is unavailable. How to build agents in n8n is covered in Building an AI Agent in n8n.
Dify
In a Dify Workflow, the Question Classifier node classifies the input and sends each class down a different branch. An AI model does the classification. Placing an Agent node in each branch lets you give each worker its own instructions and tools. The Agent node lets you set a maximum number of iterations to prevent endless loops.
The new Agent, in beta as of October 2026, can be used once built either as a standalone chat app or as one step inside a Workflow. The official documentation suggests using it inside a Workflow when you need steps in a fixed order or conditional branching, or when several specialist agents hand work off to each other.
Watch how costs and failures grow
According to Anthropic's article, its data showed agents using about 4 times as many tokens as chat, and multi-agent systems about 15 times as many. If chat is 1, an agent is 4 and a multi-agent system is 15. Anthropic says multi-agent systems should be used for tasks valuable enough to justify that cost.
- 1xChat
- 4xAgentAbout 4x
- 15xMulti-agentAbout 15x
Anthropic's own data, from its article
Failures happen differently too. Agents run for a long time and keep state across many tool calls, so small errors compound. Anthropic says it built a system that resumes from where an agent stopped when an error occurs, instead of starting over. Because the same instructions can produce different behavior each time, it uses tracing that records production behavior to find causes.
- Set a loop limit: the Agent nodes in n8n and Dify let you set a maximum number of iterations
- State the maximum number of workers in the instructions
- Log which agent called which tool
- Test operations that write to external systems in an isolated environment before connecting them
If you sell an agent, be ready to explain this cost growth to buyers. State on the sales page which AI model's API key it runs on and how many agents run per execution, so buyers can estimate usage fees.
Employee Store is a marketplace where companies adopt AI agents built by developers, through a one-time purchase or a monthly plan. Any format is accepted, including n8n and Dify workflows and agents you developed in-house. There is no listing fee and no upfront cost. The commission is 20% of the deal amount and applies only when a deal closes.
FAQ
- Does a multi-agent setup improve accuracy?
- It depends on the task. Anthropic says it helped for research with many parallel parts and a lot of information. It also says it is a poor fit for tasks that must share context or have many dependencies. First check whether one agent is enough.
- How many worker agents can I create?
- There is no fixed number. Decide based on the task. In Anthropic's example, a simple fact check used one agent, comparison tasks used 2 to 4, and complex research used more than 10 workers. The more agents, the more tokens are used.
- How do I connect multiple agents in n8n?
- With the AI Agent Tool node, the central AI Agent node can call other agents as tools. Describing each worker's task concretely in its Description makes it easier for the central agent to decide whom to delegate to.
Sources
- Anthropic, 'How we built our multi-agent research system'
- Anthropic, 'Building effective agents'
- OpenAI Agents SDK, 'Agent orchestration' (checked October 2, 2026)
- Claude Code Docs, 'Create custom subagents'
- n8n Docs, 'Integrate AI'
- n8n Docs, 'AI Agent node'
- n8n Docs, 'AI Agent Tool node'
- Dify Docs, 'Question Classifier'
- Dify Docs, 'Agent' (node)
- Dify Docs, 'Agent' (new Agent)
- Employee Store, 'Seller Guide' (Japanese)


