The multi-agent framework for Python
CrewAI was created by João Moura and released in late 2023. It quickly became one of the most popular agent frameworks on GitHub, with tens of thousands of stars and an active community.
The core idea is simple: instead of a single LLM doing everything, you split work across specialized agents. A researcher agent gathers data. A writer agent produces content. An analyst agent reviews the output. Each agent has a focused role and the tools it needs to do its job.
CrewAI handles the orchestration — passing context between agents, managing tool calls, retrying on failures, and collecting the final output. You define what each agent does, and CrewAI figures out how they work together.
Core concepts
CrewAI is built around six main primitives. Understanding these is the key to building effective multi-agent systems.
Agents
Autonomous units with a role, goal, and backstory. Each agent specializes in a domain and can use tools to accomplish tasks.
Learn moreTasks
Specific assignments given to agents. Each task has a description, expected output, and an assigned agent responsible for completing it.
Crews
Teams of agents that work together. A crew defines which agents collaborate, what tasks they perform, and how they coordinate.
Tools
Functions that agents can call during execution. Search the web, query databases, read files, call APIs, or run any Python code.
Learn moreProcesses
The execution strategy for a crew. Sequential runs tasks in order. Hierarchical uses a manager agent to delegate dynamically.
Flows
Multi-crew pipelines that chain outputs. Build complex workflows where one crew's output feeds into the next, with branching and routing logic.
Learn moreGo deeper
Explore each concept in detail with dedicated guides.
CrewAI Agents
Configure agents with roles, goals, backstories, and LLMs.
CrewAI Tools
Build custom tools with @tool and BaseTool.
CrewAI Flows
Multi-step pipelines with state and routing.
CrewAI Memory
Memory types, knowledge sources, and configuration.
Deploy CrewAI
Step-by-step guide to production deployment.
How CrewAI works
A typical CrewAI project follows three steps: define your agents, define your tasks, and assemble them into a crew. Here's what that looks like in code.
1. Define agents
Each agent gets a role (what it does), a goal (what it's optimizing for), and a backstory (context that shapes its behavior). Optionally, you attach tools the agent can call.
2. Define tasks
Tasks describe the work. Each task has a description, an expected output format, and is assigned to a specific agent. Tasks can reference variables from the crew's input.
3. Assemble and run
Create a Crew with your agents and tasks, then call crew.kickoff(). CrewAI executes the tasks, passes context between agents, and returns the final result.
from crewai import Agent, Task, Crew
# Define agents with roles and goals
researcher = Agent(
role="Research Analyst",
goal="Find comprehensive information on a given topic",
backstory="You are an expert researcher who excels at finding and synthesizing information.",
tools=[search_tool, scrape_tool],
)
writer = Agent(
role="Content Writer",
goal="Write clear, engaging content based on research",
backstory="You are a skilled writer who turns complex topics into readable articles.",
)
# Define tasks
research_task = Task(
description="Research the latest developments in {topic}",
expected_output="A detailed summary with key findings and sources",
agent=researcher,
)
writing_task = Task(
description="Write a blog post based on the research findings",
expected_output="A well-structured blog post of 800-1000 words",
agent=writer,
)
# Create and run the crew
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, writing_task],
verbose=True,
)
result = crew.kickoff(inputs={"topic": "AI agents in 2025"})Common use cases
CrewAI is general-purpose, but these are the patterns teams reach for most often.
Research & Analysis
Agents search the web, gather data, cross-reference sources, and produce comprehensive research reports.
Content Creation
Writer, editor, and fact-checker agents collaborate to produce blog posts, marketing copy, and documentation.
Data Processing
Extract, transform, and analyze datasets. Agents handle ETL pipelines, generate charts, and surface insights.
Customer Support
Classify tickets, look up knowledge bases, draft responses, and escalate complex issues to specialists.
Code Review
Analyze pull requests, check for bugs and security issues, suggest improvements, and enforce coding standards.
Sales & Lead Gen
Research prospects, enrich contact data, score leads, and draft personalized outreach sequences.
How CrewAI compares to other frameworks
CrewAI is one of several frameworks for building multi-agent systems. The main alternatives are LangGraph (part of the LangChain ecosystem) and AutoGen (from Microsoft).
CrewAI is the most opinionated of the three. It gives you clear abstractions — agents, tasks, crews — that map naturally to how teams work. LangGraph is lower level and graph-based, giving you more control but requiring more setup. AutoGen focuses on conversational patterns between agents.
For most teams building production agent workflows, CrewAI's structure makes it faster to get started and easier to maintain. If you're already using CrewAI and want to compare hosting options, see our Crewship vs CrewAI AMP comparison.
FAQ
Common questions about CrewAI
Deploy CrewAI with Crewship
Built your crew? Crewship deploys it to production with a single command. Get a production API, real-time streaming, auto-scaling, and Slack integration out of the box.