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.
Instalación lista para agent
Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.
npx -y tokrepo@latest install 129bde64-660b-48dc-a2e0-7eeaaedf48fe --target codexEjecutar después de confirmar el plan con dry-run.
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.
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.
How to use
- Install CrewAI:
pip install crewai - Define agents with roles, goals, and backstories
- Define tasks and assign them to agents, then kick off the crew
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()
| Concept | Purpose |
|---|---|
| Agent | Role-based AI worker with tools |
| Task | Specific assignment for an agent |
| Crew | Team of agents working together |
| Tool | External capability (search, code) |
Related on TokRepo
- Multi-agent frameworks — compare multi-agent orchestration frameworks on TokRepo
- CrewAI deep-dive — dedicated CrewAI page with examples
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.hierarchicalmode for manager-worker patterns where a supervisor delegates dynamically
Preguntas frecuentes
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.
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.
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.
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.
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.
Referencias (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
Relacionados en TokRepo
Fuente y agradecimientos
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.
Discusión
Activos relacionados
CrewAI — Multi-Agent Orchestration in Python
Python framework for orchestrating role-playing AI agents that collaborate on complex tasks. Define agents with roles, goals, and tools, then let them work together autonomously. 25,000+ stars.
CAMEL — Multi-Agent Framework at Scale
CAMEL is a multi-agent framework for studying scaling laws of AI agents. 16.6K+ GitHub stars. Up to 1M agents, RAG, memory systems, data generation. Apache 2.0.
DeepAgents — Multi-Step Agent Framework by LangChain
Agent harness built on LangGraph by the LangChain team. Features planning tools, filesystem backend, and sub-agent spawning for complex multi-step tasks like codebase refactoring. 16,500+ stars.
CrewAI Flows — Event-Driven Multi-Agent Orchestration
CrewAI Flows is the event-driven orchestration layer on top of Crews. Decorators @start, @listen, @router build a typed state machine for multi-agent.