Subjects › AGI Agents (6-week course)

W4 · AutoGen & CrewAI in practice

What the frameworks package, sequential vs hierarchical crews, guardrails, and counting the cost.

The idea

AutoGen AgentChat packages group chat (round-robin or selector) with termination conditions; the course notes it is now in maintenance mode, with Microsoft Agent Framework as the successor. CrewAI packages roles, tasks and processes: sequential runs tasks in order, passing earlier outputs as context; hierarchical adds a manager that delegates — at the cost of extra LLM calls. Flows wrap deterministic Python steps around a crew when you need control and reproducibility (BriefFlow). Exercise 4.5's guardrail is a deterministic Python check on a task's output: it returns (True, output) to accept or (False, feedback) to make the agent retry. Compare systems on accuracy and cost, never accuracy alone. In your repo: Week04_MultiAgent_AutoGen_CrewAI/autogen_team/, crewai_crew/ (pipelines.py, guardrails.py, integration.md); Exercise 4.5.

Lesson

No lesson built yet. The worked solutions below are the material it would be assembled from.

Questions (5)

Question Type Difficulty Drift Accuracy
You want your AutoGen team to speak in a fixed, predictable order — planner, then researcher, then executor — … mcq Easy -1.20 — — (0)
On the milestone's 5 tasks, System A (a single ReAct agent) gets 4 correct using 3 LLM calls per task. System … numeric Moderate -0.30 — — (0)
Exercise 4.5 adds numbers_are_sourced, a deterministic guardrail on a CrewAI task's output. Why implement a ch… mcq Moderate 0.30 — — (0)
The crew in pipelines.py has three tasks: research, analysis and brief. Use this simplified cost model (an ass… numeric Hard 1.00 — — (0)
BriefFlow in pipelines.py runs kb_search as a plain Python step first, then hands the facts to a sequential cr… short Very hard 1.50 — — (0)