Group Chat
Also known as: multi-agent conversation, selector team, round-robin team
- Who decides
- A manager agent
- Shape
- Shared space
Intent
Put a few specialised agents in one message thread that every one of them reads, and let a selector outside the agents pick exactly one of them to speak after each message. The order of turns comes out of the conversation, and code stops the run when a stop condition fires.
Problem
You are building an assistant that answers sports-statistics questions. A user asks: “What was the percentage change in total rebounds, between 2007–08 and 2008–09, for the Miami Heat player who scored the most points in 2006–07?”
The answer needs planning, web searches and a calculation, so you write three agents: a planner, a searcher and an analyst. Then you wire them as a fixed chain: plan, search, compute, answer. It breaks as soon as the task needs back-and-forth:
- The chain cannot loop back. The first search finds the top scorer but not his rebounds. The analyst has nothing to compute, and no edge sends the work back to the searcher.
- The number of turns is unknown in advance. The searcher may need one turn or three. A fixed sequence has to guess, and it guesses wrong.
- Everyone needs what the others found. The analyst must use the exact figures the searcher posted. Wiring each pair of agents directly makes the links multiply with every agent added.
Solution
Keep the three agents, but replace the fixed wiring with one shared thread and one decision per turn: who speaks next. Every message is appended to the thread and delivered to every agent. A selector reads the thread and the agents’ short descriptions and returns one name. That agent reads the whole thread, replies, and its reply is broadcast in turn. Code checks the stop conditions after every reply.
On the rebounds question, a run looks like this:
- Seed. The user’s question becomes the first message of the thread, and every agent receives it.
- Select. A rule says the planner speaks first, so the selector picks it without a model call.
- Plan in the open. The planner posts two tasks: the searcher finds the stats, the analyst computes the percentage. Everyone sees them.
- Search, as often as needed. The selector picks the searcher, which runs its own ReAct loop inside its turn. It finds the top scorer but not his rebounds, so the selector picks it again. Its second message posts 214 and 398.
- Compute from the thread. The selector returns to the planner, which hands the next task to the analyst. The analyst reads 214 and 398 straight from the thread and posts +86.0%.
- Stop. The planner writes a short summary that ends with
TERMINATE. A termination check sees the keyword and ends the run, returning the transcript and the stop reason. A message cap would have stopped it anyway if the keyword never came.
Each agent decides only what it says, the selector decides who speaks, and code decides when to stop. The nearest pattern, Supervisor, also picks a worker on every turn, but each worker gets its own instruction and reports back to the hub alone; in a group chat every message reaches every agent.
Structure
Hover over a number, or tap it, to read what it is.
- Participants. Agents, each with a unique name, a short description the selector reads, a role prompt and possibly a few tools. Each replies only when selected.
- Shared thread. One ordered, append-only list of messages that every participant receives. It is the single record of the work.
- Selector. Picks exactly one next speaker after each message. It can be a fixed rotation, a rule, a graph of allowed transitions, a model reading roles and history, or a person.
- Termination. Code that checks each new reply and ends the run on a keyword, a message cap or a budget. If nothing fires, control goes back to the selector.
- Human (optional). A person who takes part as a regular member, approves before the run goes on, or acts as the selector.
- Result. The transcript plus the stop reason, or a shorter answer taken from it, such as the last message or a summary.
Use it when / Avoid it when
Use it when
- The roles are few and known, but their order is not. Who should speak next depends on what the last message said.
- Every role needs the others’ work. A coder, a critic and a tester each build on the exact output posted before them.
- The run has a clear test of being done. An approval, a passing check or a computed answer gives the selector and the stop condition something to look for.
- People need to read or join the work. One thread is easy to follow, and a person can take a turn like any agent.
Avoid it when
- The order of steps is always the same. Use a prompt chain, which needs no selector and costs fewer calls.
- The subtasks are independent. Use Parallelization: a group chat lets only one agent speak at a time.
- The task is long and open-ended, or needs many agents. Use Orchestrator–Workers, which plans, tracks progress and gives each worker a clean context.
- Latency is tight. Use a single ReAct agent with the tools: every turn here is serial, and a model selector adds a call to each one.
How it fails
- Loops and chatter
-
Agents thank each other or repeat one exchange until the cap ends the run; Cemri et al. found step repetition to be the most frequent failure in their study of failed multi-agent traces, at 15.7%.
Mitigation: return to the planner after every specialist, and cap messages and tokens.
- Wrong speaker
-
The selector names no agent, one that does not exist or the wrong expert, or one agent does all the talking.
Mitigation: narrow the candidates in code, for example with a graph of allowed transitions, and validate the name before the turn runs.
- Early or missing stop
-
The stop keyword is never written, is written before the work is done, or appears inside quoted text.
Mitigation: let exactly one agent stop the run, match on who wrote the keyword as well as the text, and keep a message cap.
- Injection spreading through the thread
-
A web-reading agent pastes a page that contains instructions, and every other agent then reads them as part of the conversation.
Mitigation: post a summary of untrusted content instead of the raw text, and require approval before any agent runs code.
Related patterns
- Supervisor: a central agent picks a worker each turn too, but the workers do not share a thread; each reports back to the hub alone.
- Swarm / Handoffs: no outside selector; the active agent hands control to a peer itself.
- Blackboard: agents coordinate through a shared workspace organised by content, instead of a time-ordered chat.
- Council / Debate: several agents answer the same question in fixed rounds, then vote or a chair decides; some sources call this a group chat too, but this site keeps them apart.
Try it
Describe the team: the task, each agent’s role and description, how the next speaker is chosen and what ends the run. The generator writes the prompts for a group chat with a selector.
Open the generator on this pattern
Further reading
- AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation (Wu et al., 2023): the original group-chat manager loop and its speaker-selection prompt.
- FSM GroupChat (AutoGen blog, 2024): constraining who may speak after whom with a graph of allowed transitions.
- Why Do Multi-Agent LLM Systems Fail? (Cemri et al., 2025): a taxonomy of 14 failure modes, useful for reading failed transcripts.