Group-Chat Manager
also known as Speaker Selector, Conversation Chair, Team Manager Agent
Place a dedicated manager between the participants of a multi-agent group chat that decides which participant speaks next on each turn.
This pattern helps complete certain larger patterns —
- specialisesSupervisor★★— Place a coordinating agent above a set of specialised agents and route work to them.
Context
A team is running three or more specialist agents — a planner, a coder, a reviewer, a tester — that all share one conversation transcript and need to take turns sensibly. Only one agent should speak per turn, the transcript needs to stay coherent, and the conversation has to end when the work is done rather than running forever.
Problem
If every agent decides for itself whether to speak, the result is either chatter (each agent emits a turn on every step) or paralysis (no agent picks itself and the conversation stalls). Wiring up per-pair hand-offs — agent A always passes to B, B to C — works for two or three agents but does not generalise as the cast grows, and gives no central place to decide when the conversation is finished. The team needs a single component that allocates turns, watches for termination, and leaves an audit trail.
Forces
- Turn allocation must be explicit when more than two agents share a thread.
- A round-robin chair is simple but blind to relevance; an LLM-based chair is relevance-aware but adds a model call per turn.
- Termination must be evaluated centrally so the chat ends predictably.
- Allowing any agent to hand off to any other (swarm-style) is flexible but harder to audit.
Example
A coding team agent has a planner, a coder, a reviewer, and a tester sharing one transcript. A round-robin manager is too rigid — the tester should not speak before the coder has produced code. The team swaps the manager for an LLM-driven selector that reads the transcript and picks the most relevant speaker, falling back to round-robin if the selector is uncertain. Termination triggers when the reviewer emits an `APPROVED` token or after twenty turns. The same skeleton later supports a swarm variant where the current speaker emits a `transfer_to(...)` token at the end of its turn.
Diagram
Solution
Therefore:
Define a Manager that owns the shared conversation transcript and a `select_next(transcript, participants) -> participant` function. On each turn the manager appends the new message to the transcript, calls `select_next`, and invokes the chosen participant. Implementations vary in how `select_next` is computed (see Variants). The manager also enforces termination — a turn cap, a content predicate, or an explicit `STOP` signal from a participant.
What this pattern forbids. Participants may not speak unless the manager selects them; no agent is allowed to emit a turn out of band.
The smaller patterns that complete this one —
- usesHandoff★— Transfer the active conversation from one agent to another, carrying context across the switch.
And the patterns that stand alongside it, or against it —
- complementsConversational Multi-Agent★— Have agents converse turn by turn until a completion criterion fires; agent roles drive the conversation forward.
- complementsSwarm·— Run many peer agents that interact directly without a central supervisor, achieving emergent coordination.
- complementsRole Assignment★★— Assign each agent a named role (researcher, writer, critic, planner) with a role-specific prompt, tool palette, and acceptance criteria.
Neighbourhood
Click any neighbour to follow the language. Scroll to zoom, drag to pan.