CrewAI

crewAIInc/crewAI β€” an open-source Python framework for multi-agent orchestration. You define agents with roles, goals, and tools, then compose them two ways: Crews (role-based agents collaborating autonomously) and Flows (event-driven workflows with precise, deterministic control, single LLM calls, and native Crew support). Deliberately standalone β€” a lightweight core, not a LangChain wrapper β€” which is its main pitch versus heavier frameworks.

In the LLM App Engineering Stack this is the agent-orchestration lane: when a task needs several specialised agents (researcher β†’ writer β†’ reviewer) rather than one big prompt. Pairs naturally with Instructor for typed tool outputs and Langfuse for tracing (CrewAI is a first-class Langfuse integration).

Description

Download or use

uv pip install crewai
uv pip install 'crewai[tools]'   # + built-in tool library
from crewai import Agent, Task, Crew
 
researcher = Agent(role="Researcher", goal="Find facts", backstory="…")
task = Task(description="Research X", agent=researcher, expected_output="notes")
crew = Crew(agents=[researcher], tasks=[task])
print(crew.kickoff())

πŸ—’οΈ Description

🧩 Crews vs Flows

PrimitiveOptimises forUse when
CrewsAutonomy + collaborative intelligenceOpen-ended tasks where agents divide the work themselves
FlowsPrecise, event-driven controlProduction automations needing deterministic branching + auditability

🧩 Why it exists

  • Purpose-built for agent orchestration β€” clean primitives (Agent / Task / Crew / Flow) instead of general-purpose graph plumbing.
  • Production-leaning β€” event-driven Flows, a tools ecosystem, and a commercial β€œAMP” control plane for teams that want hosted deployment/monitoring.
  • Big community footprint (100k+ developers certified through its courses).

✍️ Reasoning for

  • Role decomposition β€” for Agentic Systems where distinct personas beat a monolithic prompt, Crews express that directly.
  • Control when it matters β€” Flows give the deterministic, event-driven backbone that pure-autonomous frameworks lack, which is what makes agent workflows shippable rather than demo-ware.
  • Standalone core keeps the dependency surface (and the LangChain lock-in) small.

Weak points: multi-agent adds cost + latency + non-determinism β€” only worth it when a single-agent loop genuinely can’t do the job; the AMP suite is commercial; role-based autonomy can wander without tight expected_output schemas.

Alternatives considered

  • LangGraph β€” graph-based, lower-level control; more flexible, more plumbing.
  • AutoGen (Microsoft) β€” conversation-centric multi-agent; research-heavy lineage.
  • OpenAI Swarm / Agents SDK β€” minimal handoff-based orchestration, tied to OpenAI’s stack.
  • Single agent + tools β€” the honest default; reach for CrewAI only when the task is genuinely multi-role.

πŸ”— Resources


Template: tool