Skip to main content

What is Group Chat?

Group Chat enables multiple agents to participate in a coordinated conversation. An orchestrator manages the conversation flow, deciding which agent speaks next based on:
  • Predefined workflows
  • LLM-based role selection
  • Round-robin scheduling
  • Custom orchestration logic

Basic Group Chat

Create a simple group chat with multiple agents:

Orchestration Strategies

AutoGen provides multiple orchestrators to control conversation flow:

RolePlayOrchestrator

Uses an admin agent and optional workflow to select speakers:
The admin agent:
  • Analyzes conversation history
  • Decides which agent should speak next
  • Considers the workflow if provided

WorkflowOrchestrator

Follows a predefined workflow without an admin:

RoundRobinOrchestrator

Agents speak in sequential order:

Custom Orchestrator

Implement IOrchestrator for custom logic:

Workflow-Based Conversations

Define explicit conversation flows using graphs:
1

Create agents

2

Define workflow

3

Create group chat

4

Run conversation

Dynamic Group Chat Example

Complete example with Semantic Kernel integration:

Initialize Messages

Provide context that persists across conversations:

Managing Conversation Flow

Termination

End conversations gracefully:

Max Rounds

Limit conversation length:

Manual Control

Step through conversation manually:

Advanced Patterns

Nested Group Chats

Create hierarchical agent structures:

Conditional Workflows

Branching logic based on message content:

Priority-Based Selection

Best Practices

  • Give each agent a clear, specific role
  • Avoid overlapping responsibilities
  • Use descriptive names (e.g., “coder”, “reviewer”, “tester”)
  • Document roles in system messages
  • Keep workflows simple and linear when possible
  • Use admin-based orchestration for complex logic
  • Provide clear workflow instructions in initial messages
  • Test workflows with different scenarios
  • Set reasonable maxRound limits
  • Use DefaultReplyAgent for simple responses
  • Cache responses when appropriate
  • Monitor token usage across all agents

Next Steps

Function Calling

Add tools to group chat agents

Code Execution

Execute code in group conversations

Agents

Learn more about agent types

Examples

See complete group chat examples