M11-B — AutoGen Introduction

How to read this note

AutoGen is another multi-agent framework (from Microsoft research). If CrewAI feels like assigning job tickets, AutoGen often feels like agents talking in a group chat until the job is done.


💬 Core idea — agents in conversation

User: "Build a study plan for Module 7 exam"

Planner Agent:  "First list all RAG topics from syllabus"
Tutor Agent:    "Here are 6 topics with difficulty order"
Critic Agent:   "Add more time for vector databases — students struggle"
Planner Agent:  "Updated 7-day plan attached"

Agents message each other. The conversation is the workflow.


🆚 CrewAI vs AutoGen (simple table)

CrewAI AutoGen
Style Task list + roles Chat between agents
Best for Clear pipelines Brainstorming, coding help
Process Sequential / hierarchical tasks Group chat rounds
Learning curve Medium Medium–high
Feel Project manager office WhatsApp group of experts

Both use LLM APIs in the backend. Both can use tools.

You do not need to master both — brochure says "CrewAI / AutoGen basics" — pick one for your capstone.


⚙️ AutoGen backend (what runs)

┌─────────────────────────────────────┐
│         Group Chat Manager          │
│  (decides who speaks next)          │
└───────────┬─────────────────────────┘
            │
     ┌──────┼──────┐
     ▼      ▼      ▼
  Agent A  Agent B  User proxy (you)
     │      │      │
     └──────┴──────┘
            │
     Shared chat history = memory
            │
            ▼
     LLM API calls each turn

Each "message" in the group → one LLM call with full chat history + that agent's system prompt.

Stop when:


🧩 Key AutoGen pieces

Piece Job
AssistantAgent AI worker (researcher, coder, writer)
UserProxyAgent Represents you — can run code on your machine
GroupChat Shared room for agents
GroupChatManager Picks next speaker

UserProxyAgent — special power

Can execute Python code the assistant writes (if you allow it).

Coder Agent: "Here's Python to plot your WhatsApp stats"
User Proxy:  runs code locally → shows chart

Powerful for data projects. Dangerous if unrestricted — only enable in trusted exercises.


🎯 When to choose AutoGen

Choose AutoGen when… Choose CrewAI when…
Agents need to debate or refine Steps are fixed order
Coding + execution loop Marketing / research pipelines
Exploratory work Repeatable business process

📋 Same project in both frameworks (concept)

Goal: Weekly quiz from class notes

CrewAI version:

Task 1: Extract topics → Task 2: Write 10 MCQs → Task 3: Verify answers

AutoGen version:

Tutor + Fact-checker chat until both agree quiz is accurate

Same outcome. Different conversation shape.


⚠️ Safety reminders


✅ Module 11 summary

Brochure Agent Frameworks (Intro):

Tool You learned
CrewAI Agents + Tasks + Crew + sequential backend loop
AutoGen Group chat agents + manager + optional code run

Next phase (Module 12–13): connect agents to n8n, websites, and deployment.


Previous: M11-A — CrewAI How It Works
Automation: N8N install · Open claw
Capstone: See Homepage — choose Student / Professional / Entrepreneur track