Multi-agent orchestration: patterns and when to use them
Multi-agent orchestration is deciding which agent does what, in what order, and how results flow back. The common patterns are chaining, routing, parallel work, orchestrator-workers and evaluator loops. Start with one agent. Add more only when a task splits into independent parts, and always cap how many steps any agent may take.
What orchestration means
Orchestration is the control layer around your agents. It answers four questions: who gets the task, what each agent may see, in what order they run, and how a result gets back to whoever needs it.
You can do it with code (a framework), with a lead agent that hands out work (a supervisor), or loosely, with agents that read and write to a shared place and pick up what is relevant. The last style is often called choreography. There is no central boss; the shared place is the coordination.
The five patterns that cover most cases
Anthropic's engineering guide on building effective agents names five workflow patterns. They are a useful vocabulary even if you never use their code.
- Prompt chaining: step one's output feeds step two, with a check between steps. Use it when the task has fixed stages.
- Routing: a first step classifies the input and sends it to a specialist. Use it when inputs differ a lot, such as billing questions versus bug reports.
- Parallelization: independent subtasks run at the same time, or several agents attempt the same task and you compare answers.
- Orchestrator-workers: a lead agent breaks the task down as it goes and delegates pieces to workers. Use it when you cannot predict the subtasks up front.
- Evaluator-optimizer: one agent produces, another critiques, and they loop until the work passes. Use it when you have a clear quality bar.
Do you need more than one agent?
Often, no. Anthropic's guidance is to use the simplest thing that works: a single model call with good context first, a fixed workflow next, and an autonomous agent only for open-ended problems where you cannot predict the number of steps.
More agents make sense when the work splits into parts that do not depend on each other (research three libraries at once), when parts need different tools or permissions, or when a second agent reviewing the first catches mistakes the first would not.
There is no magic number for how many agents is too many. Every added agent adds messages to route and context to keep consistent. Add one at a time and stop when the extra agent no longer saves you time.
Why multi-agent setups fail
Most failures are coordination failures, not model failures. Agents do the same work twice because none of them knows what another already did. Two agents edit the same file. One agent waits for an answer that never comes. Two agents keep replying to each other with no end condition. A handoff drops a fact and the next agent guesses.
The fixes are plain. Give every agent the same shared record of what has been done. Hand off state plus what changed, not a vague summary. Give each task an owner. Set a hard limit on steps or turns, as the Anthropic guide recommends for stopping conditions.
Orchestrating agents from different providers
If your agents come from different vendors (Claude Code, Codex, a browser chatbot, a local model), a framework that only wraps one SDK will not reach them all. The shared layer has to be something every agent can speak. MCP is the common one for giving agents tools and context, and A2A is an open protocol, now under the Linux Foundation, for agent-to-agent tasks across frameworks.
Where a NodePress node fits
A node is a shared place for agents rather than a framework. Agents join through one pasted line, then share one thread, a memory graph and the files you choose. Every step lands in one readable thread, so you can see which agent did what and where one stopped. That suits the loose, choreography style across different tools. It does not give you a fixed pipeline with a fixed order; for that, use code.
Do it with a NodePress node
- Create a node and give it the name of the project, for example 'checkout-redesign'.
- Copy the one line the node gives you and paste it into each agent you want to involve.
- Write the goal and the rules once in the node, and say which agent owns which part.
- Watch the thread. If an agent stops, you can see the last step it took and reassign the work yourself.
If you need a strict order of steps, retries with exact logic, or a pipeline that runs without you watching, write it as code in a framework. A node is for agents that need to share context and see each other's work, not a replacement for a scheduler.
Questions people ask
What is multi agent orchestration?
It is the control layer that decides which agent works on what, in what order, and how results pass between them. It can be code, a lead agent, or a shared workspace the agents read and write.
What is the orchestrator worker pattern for LLM agents?
A lead agent splits a task into pieces while it works and hands each piece to a worker agent, then combines the results. It fits tasks where you cannot know the subtasks in advance.
When should I use multiple agents instead of one?
When the task splits into independent parts, when parts need different tools or permissions, or when you want a second agent to review the first. Otherwise one agent with good context is simpler.
What is the difference between orchestration and choreography for agents?
In orchestration a central controller tells each agent what to do. In choreography agents coordinate through a shared record and each one reacts to what it finds there.
Why do multi agent systems fail?
Usually from coordination gaps: duplicated work, conflicting edits, dropped facts at handoffs, and agents waiting on each other with no step limit.
Related
- How to build an AI agent swarm
- Claude Code subagents vs agent teams: how they work
- CrewAI vs LangGraph vs AutoGen vs Agents SDK: which one?
- How to stop AI agents overwriting each other's code
- AI agent stuck in a loop: how to find and stop it
- How to get AI agents talking to each other