NextMachinNEXTMACHIN
Architecture · Multi-agent systems

Five communication patterns between AI agents

A single agent has one context window. The moment you need more than that - more roles, more parallelism, more steps - agents have to talk. How they talk is the whole design.

Marek Maly
Marek Maly
AI Consultant, NextMachin
Oct 2025 · 11 min read

Every multi-agent system is really a decision about how context moves. An LLM only knows what is in its context window, so the topology you choose decides what each agent can see, what it can forget, and where the system breaks. Five patterns cover almost everything in production today - most real systems combine two or three.

The recurring trade-off: more agents = more parallelism and specialization, but more tokens, more latency, and more places for context to get lost in translation.

01Chain · Pipeline

Sequential

ABC

Agents are arranged in a line: each one does its step, then hands its output to the next. A research agent finds sources, a writer drafts from them, an editor polishes. Simple, predictable, and easy to debug - you can read the trace top to bottom.

Context

Context accumulates down the chain. Each agent typically receives only the previous agent’s output, not the full history - so early detail is lost unless you deliberately pass it along. Cheap on tokens, but a mistake early on propagates silently to the end.

Strengths
Predictable, easy to trace and debug
Low token cost - no redundant context
Clear ownership of each step
Weaknesses
No parallelism - slowest path end to end
Errors compound down the line
Early context is easily dropped
Best forLinear workflows with clear hand-offs (research → write → edit).
02Manager · Supervisor

Orchestrator–worker

OW1W2W3

A lead agent owns the goal. It breaks the task into subtasks, delegates each to a specialized worker, then synthesizes their results into one answer. The workers never talk to each other - all coordination flows through the orchestrator.

Context

The orchestrator holds the master context; workers get only the slice they need. This keeps each worker’s window small and focused, but the orchestrator can become a bottleneck - and whatever it fails to pass down, the workers simply can’t know.

Strengths
Specialized workers, clean separation of concerns
Central control point for guardrails & synthesis
Workers stay small and cheap
Weaknesses
Orchestrator is a single point of failure & bottleneck
Extra round-trips add latency
Quality hinges on good task decomposition
Best forComplex tasks that split into independent specialist subtasks.
03Fan-out · Fan-in

Parallel

InABC

The same input is sent to several agents at once - different models, different prompts, or different perspectives - and their outputs are merged by an aggregator. Think three reviewers grading a document simultaneously, then a judge reconciling them.

Context

Every branch starts from the same shared context, in parallel. Fast, and great for cross-checking, but nothing is shared between branches mid-flight - and the aggregator has to fit all results into one window, which can get expensive at the merge step.

Strengths
Fastest wall-clock time for independent work
Diversity reduces single-model bias / errors
Natural fit for voting & consensus
Weaknesses
Highest token cost - work is duplicated
Merge/aggregation step is hard to get right
No cross-talk between branches mid-task
Best forIndependent subtasks, or ensembling for accuracy and review.
04Tree · Teams of teams

Hierarchical

CEOM1M2wwww

Orchestration nested several levels deep: a top agent delegates to mid-level managers, who each run their own teams of workers. It mirrors a real org chart and lets you scale to large, multi-stage problems without any one agent holding everything.

Context

Context is scoped by level - each manager holds only its branch’s picture, summarized up and down the tree. This contains complexity beautifully, but every summary hop loses fidelity, so detail from a leaf rarely survives intact to the top.

Strengths
Scales to large, multi-stage problems
Context stays scoped per branch
Mirrors how human orgs divide work
Weaknesses
Most complex to build and observe
Information degrades through summary hops
High latency and token overhead
Best forLarge programs of work with natural sub-teams and stages.
05Mesh · Group chat · Blackboard

Network

shared memoryABCD

Agents communicate many-to-many - either broadcasting in a shared "group chat" or reading and writing to a common blackboard / shared memory. There is no fixed leader; agents pick up work, react to each other, and converge through discussion or a stopping rule.

Context

Context is shared and emergent - the blackboard is the common memory every agent can see. Maximally flexible, but the shared space grows fast, conversations can loop, and without firm termination rules the system can talk itself in circles and burn tokens.

Strengths
Most flexible - emergent collaboration
No single bottleneck or point of failure
Agents can react and self-organize
Weaknesses
Hard to control, debug, and terminate
Shared context bloats quickly
Risk of loops, drift, and runaway cost
Best forOpen-ended problems needing debate, negotiation, or brainstorming.

So which one?

Start with the simplest topology that fits the work, and only add agents when a single context window genuinely can't hold the job. A clean rule of thumb:

Clear linear steps with hand-offsSequential
One goal that splits into specialist subtasksOrchestrator–worker
Independent work, or you want a second opinionParallel
A large program with sub-teams and stagesHierarchical
Open-ended, needs debate or negotiationNetwork

And whatever the shape: budget context like money. Every hop between agents is a chance to summarize, compress, or lose the thread. The systems that hold up in production are the ones that decide, deliberately, what each agent is allowed to forget.

Written by
Marek Maly
Marek Maly
AI Consultant, NextMachin