CrewAI: Role-Based Crews and Flows CrewAI is the 2026 role-based multi-agent framework. Four primitives: Agent, Task, Crew, Process. Two top-level shapes: Crews (autonomous, role-based collaboration) and Flows (event-driven, deterministic). The docs are blunt: "for any production-ready application, start with a Flow."
Prerequisites: Phase 14 · 12 (Workflow Patterns), Phase 14 · 14 (Actor Model)
# Learning Objectives
Name CrewAI's four primitives (Agent, Task, Crew, Process) and what each owns.
Distinguish Sequential, Hierarchical, and the planned Consensus process; pick one per workload.
Distinguish Crews (autonomous role-based) from Flows (event-driven deterministic), and explain the docs' production recommendation.
Wire tools with the @tool decorator and BaseTool subclass; reason about structured outputs vs free text.
Name the four CrewAI memory types and when each pays off.
Implement a stdlib three-agent crew (researcher, writer, editor) that produces a brief.
Spot the three CrewAI failure modes: prompt-bloat, manager-LLM tax, brittle handoffs.
Full Access lessonKeep going. The rest of this lesson is one step away. Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.
The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.