Agentic AI Notebook
Phase 15

Group Chat (Legacy)

~2 min read

Concept & How It Works

  • Key points are in the visual diagram above.

Learn these elsewhere (not covered in depth here)

  • Microsoft Agent Framework
  • Multi-agent — Phase 18

Why Does It Exist?

Two-agent ping-pong is easy. A researcher, coder, and critic need a manager or they talk forever.

Real-World Analogy

A meeting with a facilitator and a talking stick. Without the stick, everyone talks over each other.
Loading diagram...

Visual Workflows

What is Group Chat (Legacy)?

Loading diagram...

Example

Scenario

Researcher → Coder → Critic, max_round=8, stop when Critic says APPROVE.

Solution

In Microsoft Agent Framework, apply Group Chat (Legacy) to this scenario: Researcher → Coder → Critic, max_round=8, stop when Critic says APPROVE. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.

Practice Task

Do this before moving to the next module — reading alone is not enough.

Open the Code Walkthrough below and run it locally. Change one parameter related to Group Chat (Legacy) (e.g. model, temperature, top_k, or tool name), observe the difference in output, and write 2–3 sentences explaining what changed.

Code Walkthrough

Highlighted lines show where Group Chat (Legacy) happens in the code.

Group Chat (Legacy)
1from autogen import AssistantAgent, GroupChat, GroupChatManager, UserProxyAgent  # import dependencies2
3researcher = AssistantAgent("researcher", llm_config=llm)4coder = AssistantAgent("coder", llm_config=llm)5user = UserProxyAgent("user", human_input_mode="NEVER")6chat = GroupChat(agents=[user, researcher, coder], max_round=8, speaker_selection_method="round_robin")  # key line for Group Chat (Legacy)7manager = GroupChatManager(groupchat=chat, llm_config=llm)  # key line for Group Chat (Legacy)8user.initiate_chat(manager, message="Write a pytest for fizzbuzz")  # key line for Group Chat (Legacy)

Commands to Remember

Commands to Remember

  • GroupChat + Manager
  • max_round is mandatory
  • Speaker selection is policy
  • TERMINATE on purpose

Common Mistakes

  • No max_round
  • Five agents with auto speak and no stop

Cheat Sheet

Quick recap — the most important points from this module.

Cheat Sheet

quick ref
  • Facilitator required
  • Cap rounds
  • Custom speaker fn
  • Human proxy for HITL