Most "AI agent" demos are one model in a loop. CrewAI takes a different view: give several agents a role, a goal and a task each, and let them work as a small team. Here is when that helps, when it doesn't, and a working crew you can run today.
CrewAI is an open-source Python framework under the MIT licence, with about 61,100 stars on GitHub when I checked (GitHub, 2026). It installs from PyPI like any other package (PyPI, 2026).
1. What a crew is
In CrewAI's words, crews are teams of autonomous agents that collaborate to solve specific tasks (CrewAI, 2026). Each agent has a role, a goal and a backstory, and each task names the agent that owns it and the output you expect.
| Process | How it works | Use it when |
|---|---|---|
| Sequential | Tasks run in order; each sees the last one's output | The steps are known: research, then write, then review |
| Hierarchical | A manager agent delegates and checks the work | The order depends on what is found. Needs an extra manager model |
| Flow | Event-driven steps with saved state; a crew can be one step | Anything going to production |
2. A two-agent demo
Install with uv tool install crewai (Python 3.10 to 3.13). This crew,
adapted from the project's README, has an analyst and a researcher working in order:
from crewai import Crew, Agent, Task, Process
analyst = Agent(role="Senior Market Analyst",
goal="Conduct deep market analysis with expert insight",
backstory="You're a veteran analyst known for identifying subtle market patterns")
researcher = Agent(role="Data Researcher",
goal="Gather and validate supporting market data",
backstory="You excel at finding and correlating multiple data sources")
analysis = Task(description="Analyze {sector} sector data for the past {timeframe}",
expected_output="Detailed market analysis with confidence score", agent=analyst)
research = Task(description="Find supporting data to validate the analysis",
expected_output="Corroborating evidence and potential contradictions", agent=researcher)
crew = Crew(agents=[analyst, researcher], tasks=[analysis, research],
process=Process.sequential, verbose=True)
print(crew.kickoff(inputs={"sector": "tech", "timeframe": "1W"}))
Set your model provider's key before running. Our CrewAI recipe covers configuration in more depth.
3. Where it fits, and where it doesn't
Good fits are research reports, content pipelines and proposal drafts: work a human team would split by role. A poor fit is anything a function can do. CrewAI's own docs say to start production apps with a Flow and use a crew inside a step only when that step needs autonomy (CrewAI, 2026). My rule: if you can draw the steps on a whiteboard, write them as code.
Should you build this as a crew?
Score each 0 (no), 1 (partly) or 2 (yes):
- Roles: the work splits naturally into distinct jobs.
- Judgement: some steps need reasoning, not just rules.
- Output: every task has a clear expected output.
- Budget: you have measured the cost of several model calls per run.
- Review: a person checks the final result before it is used.
| Score | Next move |
|---|---|
| 8–10 | Build a sequential crew inside a Flow. |
| 5–7 | Prototype it, but compare against a single prompt. |
| 0–4 | Write a plain workflow instead. |
Your next step
Pick one report your team writes every week. Write its steps as two or three CrewAI tasks, run the crew on last week's inputs, and compare the draft with what your team actually sent. For ready-made agent definitions, see our free subagent templates.
Sources
- CrewAI (2026). Introduction and Crews. Read 20 November 2026.
- GitHub (2026). crewAIInc/crewAI repository. Stars read 20 November 2026.
- PyPI (2026). crewai. Read 20 November 2026.