AutoGen (Microsoft) popularized multi-agent systems as conversable agents that message each other—assistant, user proxy, critics—to solve tasks. Alongside CrewAI, it prepares you for Volume 15 multi-agent design, while differing from LangGraph’s explicit graph style.
Learning Objectives
By the end of this lesson, students should be able to:
- Explain AutoGen’s conversable-agent / multi-agent chat model.
- Sketch assistant + user-proxy collaboration with code execution patterns.
- Compare AutoGen, CrewAI, and LangGraph orchestration styles.
- Identify when conversation-based agents help or thrash.
- Apply termination conditions and human-in-the-loop hooks.
- Relate AutoGen patterns to Volume 15 agent loops and tools.
AutoGen is an open-source framework for building multi-agent LLM applications where agents communicate via messages. Agents can be LLM-backed, tool-enabled, or human proxies, coordinating through chat patterns to complete tasks.
Three Multi-Agent Styles
| Framework | Metaphor | Control emphasis |
|---|---|---|
| AutoGen | Conversations / chats | Message protocols, speakers |
| CrewAI | Roles on a crew | Tasks + process |
| LangGraph | State machine / graph | Nodes, edges, checkpoints |
Assistant + User Proxy Sketch
When Conversation Helps
Strong fits
- Code iterate/fix loops
- Debate / critique pairs
- Human proxy approvals
Weak fits
- Strict latency SLAs
- Simple one-shot RAG
- Highly regulated scripts
Safeguards
- Max turns
- Clear termination
- Sandbox code exec
Strengths
- Natural multi-agent chat UX
- Human proxy patterns
- Code-oriented workflows
- Influential agent ecosystem
Tradeoffs
- Chats can wander
- Version/API evolution
- Harder formal guarantees
- Cost of long dialogues
“Agents chatting will converge eventually.” Without max turns, termination messages, and success checks, they can loop politely forever—burning budget. Always define stop conditions.
Knowledge Check
- Short Answer: What interaction style is AutoGen known for? Answer: Multi-agent conversations / messaging.
- True/False: A user proxy can represent a human or automated executor. Answer: True.
- Multiple Choice: LangGraph emphasizes: (a) only BM25, (b) explicit state graphs, (c) CSS grids. Answer: (b).
- Short Answer: Name one safeguard for chat agents. Answer: Max turns, termination conditions, sandboxed tools (any).
- True/False: AutoGen is ideal as the only layer for a tiny FAQ RAG. Answer: False—overkill for simple RAG.
- Multiple Choice: CrewAI’s primary metaphor is: (a) roles/crew, (b) SQL joins, (c) convolution. Answer: (a).
- Short Answer: Why sandbox code execution? Answer: Agents may run unsafe or incorrect code.
- Short Answer: How does this lecture bridge to Vol 15? Answer: Multi-agent chat/tool loops preview agent systems.
- Multiple Choice: Missing termination often causes: (a) free inference, (b) endless costly chats, (c) perfect answers. Answer: (b).
- True/False: Critique-style agent pairs are a common AutoGen pattern. Answer: True.
Key Takeaways
- AutoGen orchestrates agents through conversational message passing.
- User proxies enable HITL and tool/code execution patterns.
- Choose chat vs crew vs graph based on control and task shape.
- Always bound turns and validate success.
- Next: PydanticAI for typed, schema-first agents.
Discussion: Map the same “write + review code” task onto AutoGen chat, CrewAI roles, and LangGraph nodes.
Safety lab: Require students to add an explicit max-turn termination before any demo.
Recap: AutoGen multi-agent chats are powerful but must be bounded. Continue with PydanticAI.