Definition
Multiple agents share a single message thread or topic. A rule, an LLM selector, or a human moderator decides who speaks next.
Category: Information flow
When to use
Brainstorming, architecture review, multi-perspective discussion, simulated product / design / engineering meetings.
When not to use
When you need a deterministic flow, low cost, strong audit trails, or strict permission boundaries.
How to implement
- Define participants, roles, speaker selection rules, and termination conditions.
- Use a moderator to pick the next speaker — round-robin, rule-based, or LLM selector.
- Keep only necessary information in the shared thread; trim off-topic messages.
- Periodically summarize the thread to keep tokens manageable.
Minimal pseudocode
TypeScript
while (!termination(thread)) {
const speaker = await moderator.selectSpeaker(thread, agents);
const msg = await speaker.reply(thread);
thread.append({ speaker: speaker.name, content: msg });
}
return summarizer.run(thread);
Recommended trace events
groupchat.speaker.selectedgroupchat.message.appendedgroupchat.terminatedgroupchat.summary.created
Common failure modes
- Conversation drifts.
- Token cost grows rapidly.
- Weak agents get carried along by louder ones.
- No concrete artifact produced.
Implementation checklist
- Input/output schemas defined.
- Each agent's permission boundary defined.
- Every agent call carries a run id / trace id.
- Failure, timeout, cancel, and retry strategies defined.
- Context passed is the minimum required, not the full history.
- High-risk actions are gated by approval or a verifier.