ScriptsMar 28, 2026·1 min read

CrewAI — Multi-Agent Orchestration Framework

Build teams of autonomous AI agents that collaborate on complex tasks. Define roles, assign tasks, and let crews work together.

TL;DR
CrewAI orchestrates teams of role-based AI agents that collaborate on complex tasks.
§01

What it is

CrewAI is a Python framework for building teams of autonomous AI agents that collaborate on complex tasks. You define agents with specific roles (researcher, writer, reviewer), assign them tasks, and CrewAI orchestrates the execution order, inter-agent communication, and output aggregation. Each agent can use tools, delegate to other agents, and build on previous agents' work.

CrewAI targets AI application developers building multi-step workflows that benefit from role specialization. Instead of one monolithic prompt, you split work across agents that each focus on what they do best.

§02

Why it saves time or tokens

A single LLM call handling research, analysis, writing, and review produces bloated context and mediocre results. CrewAI splits this into focused agent calls, each with a narrow role and relevant context. The result is better output quality with smaller per-call token budgets. Agent delegation means the research agent gathers facts and passes only the relevant ones to the writer, reducing redundant processing.

§03

How to use

  1. Install CrewAI: pip install crewai
  2. Define agents with roles, goals, and backstories
  3. Define tasks and assign them to agents, then kick off the crew
§04

Example

from crewai import Agent, Task, Crew

researcher = Agent(
    role='Researcher',
    goal='Find accurate data on the topic',
    backstory='Expert at finding and verifying information'
)

writer = Agent(
    role='Writer',
    goal='Write a clear, engaging article',
    backstory='Skilled technical writer'
)

research_task = Task(
    description='Research the latest trends in AI agents',
    agent=researcher
)

write_task = Task(
    description='Write a 500-word article based on the research',
    agent=writer
)

crew = Crew(agents=[researcher, writer], tasks=[research_task, write_task])
result = crew.kickoff()
ConceptPurpose
AgentRole-based AI worker with tools
TaskSpecific assignment for an agent
CrewTeam of agents working together
ToolExternal capability (search, code)
§05

Related on TokRepo

§06

Common pitfalls

  • Defining too many agents increases latency and token cost; start with 2-3 agents and add more only when role separation improves output
  • Agent backstories that are too vague produce generic output; specific backstories with domain expertise produce better results
  • Sequential task execution is the default; use the Process.hierarchical mode for manager-worker patterns where a supervisor delegates dynamically

Frequently Asked Questions

How does CrewAI compare to LangGraph?+

CrewAI provides a higher-level abstraction focused on role-based agent teams. LangGraph provides a lower-level graph-based orchestration where you define nodes and edges manually. CrewAI is faster to prototype with, while LangGraph gives more control over execution flow, branching, and state management.

Can CrewAI agents use external tools?+

Yes. CrewAI agents can use tools like web search, file reading, API calls, and code execution. You define tools as Python functions or use built-in tool integrations. Each agent can have a different set of tools matching its role, so the researcher gets search tools and the coder gets execution tools.

Does CrewAI support different LLM providers?+

Yes. CrewAI supports OpenAI, Anthropic Claude, Google Gemini, local models via Ollama, and any provider accessible through LiteLLM. You can assign different models to different agents, using a capable model for complex reasoning and a cheaper model for simple tasks.

What is hierarchical mode in CrewAI?+

Hierarchical mode adds a manager agent that dynamically delegates tasks to worker agents based on their roles and capabilities. Instead of tasks running in a fixed sequence, the manager decides the execution order and can reassign work. This is useful for complex workflows where the optimal order depends on intermediate results.

Can CrewAI agents communicate with each other?+

Yes. Agents can delegate tasks to other agents and receive their output. The output of one task becomes available as context for subsequent tasks. In hierarchical mode, the manager facilitates communication. You can also configure explicit inter-agent dependencies in the task definition.

Citations (3)
  • CrewAI GitHub— CrewAI orchestrates teams of autonomous AI agents
  • CrewAI Docs— CrewAI supports role-based agent collaboration
  • Anthropic Research— Multi-agent systems improve task decomposition and output quality
🙏

Source & Thanks

Created by crewAIInc. Licensed under MIT. crewAI — ⭐ 47,400+ Docs: docs.crewai.com

Thanks to the CrewAI team for building the leading multi-agent orchestration framework.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.