Module DD-12 — CrewAI: Role-Based Multi-Agent (Emergent Coordination)

CrewAI: Role-Based Multi-Agent (Emergent Coordination)

45,900+ stars. Most accessible multi-agent framework. Role-based sequential/concurrent crews. 1.8s avg latency. The emergent-coordination pole — paired with LangGraph (DD-10) as the declared-coordination pole, both load-bearing for Course 4 E09 (Multi-Agent Orchestration).

60
minutes
8
artifacts
3
sub-sections
CrewAI optimizes for accessibility — the fastest way to stand up a multi-agent crew with role-based task assignment, and the most legible mental model (describe the team) in the multi-agent category. The coordination graph emerges from task context references and the process type, not from explicit drawn edges. This is the emergent-coordination pole of the multi-agent axis; LangGraph (DD-10) is the declared-coordination pole. The contrast is load-bearing for Course 4 E09. CrewAI sacrifices production-readiness: no sandboxing, crew-scoped shared memory with no write isolation, limited state, and run logs below the structured-event floor.
Key Claims
Load-Bearing Claims

CrewAI and LangGraph (DD-10) define the multi-agent coordination axis: emergent vs declared. CrewAI is the emergent-coordination pole — define roles and tasks, the graph emerges from context refs and process type. LangGraph is the declared-coordination pole — draw nodes and edges, the graph is a first-class object. Every multi-agent framework sits between these two poles. This axis is the organizing principle of Course 4 E09.

Role is the system prompt — the most accessible multi-agent mental model in the roster. CrewAI does not give you a raw system-prompt string; it gives you a templated one whose fields are role, goal, backstory. Module 12 (Prompt Assembly) applied at agent granularity. 'Describe the team' beats 'draw the graph' for first-time builders. The cost: when the template is wrong, you fight the framework's opinion.

Sequential crews earn the 4/5 on Module 1.3 (Subagents) — a textbook multi-agent pattern. Tasks run in list order; each output chains forward as context for the next agent. A linear ReAct chain stretched across multiple roles. Composes well for research-then-write, draft-then-review, plan-then-execute. Concurrent/hierarchical mode adds a manager agent (one-level hierarchy, shallower than DD-06).

Crew-scoped shared memory creates a compounding-poisoning surface with no write isolation. All agents in a crew share one memory store — a compromised agent writes a poisoned entry every other agent reads. Module 4.3 write-gating unavailable by default. Same argument as Hermes (DD-08), except compounding is across agents within a run, not across sessions. Each task-output handoff is also an untrusted-content boundary (Module 2.4 Vector 1).

After This Module
01
State CrewAI's defining contribution — the role-based mental model — and why 'describe the team' is the most accessible multi-agent entry point.
02
Distinguish emergent coordination (CrewAI) from declared coordination (LangGraph, DD-10) and explain why this contrast defines the multi-agent coordination axis (Course 4 E09).
03
Describe the three primitives (Crew, Agent, Task), the two orchestration modes, and the role-to-prompt mapping (Module 12 at agent granularity).
04
Score CrewAI 33/60 and defend the shape: 4/5 on Module 1.3, low on production-readiness modules (sandbox 1/5, verification 1/5, security 1/5).
05
Articulate the security implications of crew-scoped shared memory (no per-agent write isolation) and the untrusted-content boundary at each task handoff.
Artifacts
01
Teaching Document
Teaching document — the role-based thesis, the three primitives, emergent-vs-declared coordination axis, two orchestration modes, role-to-prompt mapping (Module 12 at agent granularity), crew-scoped memory, the security surface, the 33/60 score, anti-patterns; with learning objectives, key terms, references
READ
02
Diagrams
6 Mermaid/n8n diagrams — the three primitives (sequential crew with shared memory), emergent vs declared coordination axis, two orchestration modes, role-to-prompt mapping, the security surface (handoff injection + memory poisoning), the n8n sequential crew workflow
READ
03
Slide Deck
10 slides — reveal.js, dark theme, design-system teal; covers the describe-the-team thesis, the three primitives, emergent vs declared coordination, two orchestration modes, the security surface, the score profile, anti-patterns, the lab
READ
04
Teaching Script
Verbatim teaching transcript with [SLIDE N] cues, ~2,000 words spoken across 10 slide cues
READ
05
Flashcards
22 flashcards (TSV) — mix of recall, application, and analysis; covers the three primitives, emergent vs declared coordination, the security surface, the role-to-prompt mapping, the score profile, the Course 4 E09 connection
TEST
06
Exam
15 questions, 20/40/40 Bloom distribution (3 recall / 6 application / 6 analysis), 70% pass; validated JSON with rationale per question; covers the three primitives, emergent vs declared coordination, handoff injection, crew-scoped memory poisoning, the orchestration-first score profile, the Course 4 E09 axis
TEST
07
Lab Spec
Simulate a CrewAI-style Role-Based Crew — runnable simulation (Python 3.10+, type hints, no GPU, no external deps): define agents with role/goal/backstory, run a sequential crew, observe the emergent dependency graph, demonstrate handoff injection and crew-scoped memory poisoning, verify the emergent-vs-declared axis (~45-60 min)
DO
08
Module Web Page
Single-file HTML hub
HERE