Registry / llm-agents / crewai

crewai

JSON →
library1.15.17pypypi✓ verified 27d ago

Python framework for orchestrating role-playing, autonomous AI agents. Agents collaborate via sequential or hierarchical processes to complete complex tasks. Built from scratch — independent of LangChain. Two core primitives: Crews (autonomous multi-agent collaboration) and Flows (event-driven, precise orchestration).

pip install crewai
INSTALL
IMPORT
SIG · CREWAI
C
crewai
llm-agentspythonv1.15.17
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.15.17 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
15/18 runs
py 3.11
✕ build_error
16/18 runs
py 3.12
✕ build_error
16/18 runs
py 3.13
✕ build_error
16/18 runs
py 3.9
4/18 runs
4/18 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Agent, Task, Crew
from crewai import Agent, Task, Crew, Process from crewai import LLM
from crewai import *
Core classes are in the crewai package. Tools (SerperDevTool etc.) are in the separate crewai_tools package.
crewai_tools
from crewai_tools import SerperDevTool, FileReadTool
from crewai import SerperDevTool
crewai_tools is a separate pip package. It is NOT included with pip install crewai.

Minimal two-agent crew with sequential process

from crewai import Agent, Task, Crew, Process researcher = Agent( role='Senior Researcher', goal='Uncover groundbreaking technologies in AI', backstory='You are an expert researcher with a passion for AI innovation.', verbose=True ) writer = Agent( role='Tech Writer', goal='Craft compelling articles about AI discoveries', backstory='You are a skilled writer who makes complex topics accessible.', verbose=True ) research_task = Task( description='Research the latest breakthroughs in AI for 2026.', expected_output='A list of 5 key AI breakthroughs with brief descriptions.', agent=researcher ) write_task = Task( description='Write a short article based on the research findings.', expected_output='A 3-paragraph article in markdown format.', agent=writer ) crew = Crew( agents=[researcher, writer], tasks=[research_task, write_task], process=Process.sequential, verbose=True ) result = crew.kickoff() print(result)
crewai --version
Debug
Known issues
breakingPython <3.10 is not supported. CrewAI requires Python >=3.10 and <3.14. Installation on 3.9 will fail or produce broken behavior.
fix
Use Python 3.10, 3.11, or 3.12. Python 3.13 is supported but 3.14 is not yet.
affects: all
breakingTask.expected_output is a required field. Omitting it raises a validation error at instantiation time.
fix
Always specify expected_output in every Task definition, even if just a short description string.
affects: all
breakingcrewai-tools is a completely separate package from crewai. Tools like SerperDevTool, FileReadTool, and WebsiteSearchTool raise ImportError if crewai-tools is not installed separately.
fix
pip install crewai-tools (or pip install 'crewai-tools[mcp]' for MCP support)
affects: all
breakingThe recommended project structure uses YAML config files (src/<project>/config/agents.yaml and tasks.yaml) with @CrewBase, @agent, @task decorators. Code-only setups from older tutorials (pre-1.0) are still valid but the YAML-first pattern is now canonical and most docs assume it.
fix
Use 'crewai create crew <name>' CLI command to scaffold the correct project structure with YAML configs.
affects: >=1.0.0
breakingThe crewai-tools repo (crewAIInc/crewAI-tools on GitHub) is now archived. Tool development has moved to the crewai-tools PyPI package maintained in the main crewai ecosystem.
fix
Install from PyPI: pip install crewai-tools. Do not use the archived GitHub repo directly.
affects: all
gotchaSmall open-source models (7B and below) often fail at function/tool calling within CrewAI. The framework relies heavily on the LLM's ability to generate correctly structured tool calls.
fix
Use models with strong tool-call support: GPT-4o, Claude 3.5+, Gemini 2.0+, or Qwen3-72B+ for reliable agentic behavior.
affects: all
gotchaWindows users encounter build errors for chroma-hnswlib==0.7.6 (a memory dependency) due to missing C++ build tools.
fix
Install Visual Studio Build Tools with the 'Desktop development with C++' workload before pip install crewai.
affects: all
gotchacrew.kickoff() is synchronous and blocking. For async contexts or FastAPI use, use crew.kickoff_async() instead.
fix
await crew.kickoff_async(inputs={...}) in async contexts.
affects: >=1.0.0
gotchaNon-OpenAI LLM providers require litellm and the correct model string format: 'provider/model-name' (e.g. 'anthropic/claude-sonnet-4-5', 'ollama/gemma3'). Passing just the model name without provider prefix silently routes to OpenAI.
fix
Use LLM(model='anthropic/claude-sonnet-4-5', api_key=...) or set the MODEL env var to 'provider/model-name'.
affects: all
Errors
Common errors & fixes
OPENAI_API_KEY is required
CrewAI, or its underlying dependencies like `litellm`, often defaults to requiring an OpenAI API key for validation, even when a different LLM provider or local model is intended for use.
fix
If using OpenAI, ensure your `OPENAI_API_KEY` is set as an environment variable or in a `.env` file. If using another LLM (e.g., Groq, Ollama, Google Generative AI), explicitly pass the `llm` parameter to your agents and crew. You might still need to set a dummy `OPENAI_API_KEY="sk-dummy"` in your `.env` file to bypass initial validation if the error persists.
ModuleNotFoundError: No module named 'tiktoken'
The `tiktoken` library, essential for tokenization with many LLMs and often required for embeddings, is a dependency that might not be automatically installed with the base `crewai` package or if specific 'extras' like `[embeddings]` or `[tools]` were omitted during installation.
fix
Install `tiktoken` explicitly. It's often beneficial to install it along with the `crewai[embeddings]` or `crewai[tools]` extras to ensure all related dependencies are met: `pip install 'crewai[embeddings]'` or `pip install tiktoken`.
AttributeError: 'list' object has no attribute 'get'
This error typically occurs when a list is provided in a context where a dictionary is expected, and the code attempts to call the `.get()` method (which is a dictionary method) on that list. This often happens with malformed YAML configurations for agents or tasks.
fix
Review your agent and task definitions, especially if loading from YAML files. Ensure that where dictionaries are expected (e.g., for agent configurations), you are providing a dictionary-like structure and not a list. Check for incorrect indentation or syntax in your YAML.
ModuleNotFoundError: No module named 'crewai'
The `crewai` library has not been installed in your current Python environment, or the environment where it was installed is not active.
fix
Install the `crewai` package using pip in your active Python environment: `pip install crewai`.
Agent stopped due to iteration limit or time limit.
An agent has exceeded the configured maximum number of iterations (`max_iter`) or the maximum allowed execution time (`max_execution_time`) while attempting to complete its assigned task. This can occur with complex tasks, less capable LLMs, or insufficient default limits.
fix
Increase the `max_iter` and/or `max_execution_time` parameters when initializing your agent. For example, `Agent(..., max_iter=25, max_execution_time=120)`. If the problem persists, consider using a more powerful LLM or breaking down the task into simpler, more manageable sub-tasks.
Upgrade
Version history
1.15.17latest on PyPI · released Aug 20, 2026
Audit
Dependencies
Python >=3.10, <3.14requiredHard requirement. Python 3.9 and below are not supported.
litellmrequiredRequired for non-native LLM providers. Installed with crewai but must be configured for non-OpenAI models.
Agent activity
63 hits · last 30 days
node
58
Amazon
1
OpenAI (training)
1
Resources
crewai — pip install crewai · libregistry