crewAI README

The project's README from github.com/crewAIInc/crewAI. As one markdown file: README.md.

Open source Multi-AI Agent orchestration framework

crewAIInc%2FcrewAI | Trendshift

Homepage · Open Source · Docs · Start Cloud Trial · Blog · Forum

GitHub Repo stars GitHub forks GitHub issues GitHub pull requests License: MIT

PyPI version PyPI downloads Twitter Follow

Fast and Flexible Multi-Agent Automation Framework

CrewAI is an open-source Python framework with high-level abstractions and low-level APIs for building production-ready multi-agent workflows. It gives developers autonomous agent collaboration through Crews and precise, event-driven control through Flows.

With over 100,000 developers certified through our community courses at learn.crewai.com, CrewAI is rapidly becoming the standard for production-ready agentic automation.

CrewAI AMP Suite

For organizations that need a commercial control plane around CrewAI, CrewAI AMP Suite adds managed deployment, observability, governance, security, and enterprise support.

You can try one part of the suite, the Crew Control Plane, for free.

Crew Control Plane Key Features:

CrewAI AMP is designed for enterprises seeking a powerful, reliable solution to transform complex business processes into efficient, intelligent automations.

Table of contents

Build with AI

Using an AI coding agent? Teach it CrewAI best practices in one command:

Claude Code:

/plugin marketplace add crewAIInc/skills
/plugin install crewai-skills@crewai-plugins
/reload-plugins

Four skills that activate automatically when you ask relevant CrewAI questions:

Skill When it runs
getting-started Scaffolding new projects, choosing between LLM.call() / Agent / Crew / Flow, wiring crew.jsonc / main.py
design-agent Configuring agents — role, goal, backstory, tools, LLMs, memory, guardrails
design-task Writing task descriptions, dependencies, structured output (output_pydantic, output_json), human review
ask-docs Querying the live CrewAI docs MCP server for up-to-date API details

Cursor, Codex, Windsurf, and others (skills.sh):

npx skills add crewaiinc/skills

This installs the official CrewAI Skills — structured instructions that teach coding agents how to scaffold Flows, configure Crews, design agents and tasks, and follow CrewAI patterns.

Why CrewAI?

CrewAI Logo

CrewAI unlocks the true potential of multi-agent automation, delivering speed, flexibility, and control through Crews of AI agents and event-driven Flows:

CrewAI empowers developers and teams to build intelligent automations that balance simplicity, flexibility, and production-grade control.

Getting Started

Setup and run your first CrewAI agents by following this tutorial.

CrewAI Getting Started Tutorial

Learning Resources

Learn CrewAI through our comprehensive courses:

Understanding Flows and Crews

CrewAI offers two powerful, complementary approaches that work seamlessly together to build sophisticated AI applications:

  1. Crews: Teams of AI agents with true autonomy and agency, working together to accomplish complex tasks through role-based collaboration. Crews enable:

    • Natural, autonomous decision-making between agents
    • Dynamic task delegation and collaboration
    • Specialized roles with defined goals and expertise
    • Flexible problem-solving approaches
  2. Flows: Production-ready, event-driven workflows that deliver precise control over complex automations. Flows provide:

    • Fine-grained control over execution paths for real-world scenarios
    • Secure, consistent state management between tasks
    • Clean integration of AI agents with production Python code
    • Conditional branching for complex business logic

The true power of CrewAI emerges when combining Crews and Flows. This synergy allows you to:

Getting Started with Installation

To get started with CrewAI, follow these simple steps. The full walkthrough lives in the installation guide.

1. Installation

CrewAI requires Python >=3.10 and <3.14. Check your version with:

python3 --version

CrewAI uses UV for dependency management and package handling. If you haven't installed uv yet, install it first.

macOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

If your system doesn't have curl, you can use wget:

wget -qO- https://astral.sh/uv/install.sh | sh

Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

If you run into any issues, refer to UV's installation guide.

Then install the CrewAI CLI:

uv tool install crewai

If you encounter a PATH warning, run:

uv tool update-shell

If you encounter the chroma-hnswlib==0.7.6 build error (fatal error C1083: Cannot open include file: 'float.h') on Windows, install Visual Studio Build Tools with Desktop development with C++.

Verify the install:

uv tool list

You should see something like:

crewai v0.102.0
- crewai

To upgrade the global CLI later:

uv tool install crewai --upgrade

This upgrades the global crewai CLI tool only. To upgrade the crewai version inside a project's virtual environment, see Upgrading CrewAI in a project.

2. Setting Up Your Crew

crewai create crew creates a JSON-first crew project. Agents live in agents/*.jsonc, tasks and crew-level settings live in crew.jsonc, and crewai run loads that JSON definition directly.

crewai create crew <project_name>

This command creates a new project folder with the following structure:

my_project/
├── .gitignore
├── .env
├── agents/
│   └── researcher.jsonc
├── crew.jsonc
├── knowledge/
├── pyproject.toml
├── README.md
├── skills/
└── tools/

If you need the older Python/YAML scaffold with crew.py, config/agents.yaml, and config/tasks.yaml, run:

crewai create crew <project_name> --classic

See Using Annotations for the classic pattern.

To customize your project, you can:

Use {placeholder} values in agent and task text, then set defaults in crew.jsonc under inputs. When you run crewai run, the CLI prompts for any missing values.

Example of a simple crew with a sequential process:

crewai create crew latest-ai-development
cd latest_ai_development

Then edit the generated files:

agents/researcher.jsonc

{
  "role": "{topic} Senior Data Researcher",
  "goal": "Uncover cutting-edge developments in {topic}",
  "backstory": "You're a seasoned researcher who finds relevant information and presents it clearly.",
  "llm": "openai/gpt-4o",
  "tools": ["SerperDevTool"],
  "settings": {
    "verbose": true
  }
}

agents/reporting_analyst.jsonc

{
  "role": "{topic} Reporting Analyst",
  "goal": "Create detailed reports based on {topic} data analysis and research findings",
  "backstory": "You're a meticulous analyst who turns complex data into clear, concise reports.",
  "llm": "openai/gpt-4o",
  "settings": {
    "verbose": true
  }
}

crew.jsonc

{
  "name": "Latest AI Development",
  "agents": ["researcher", "reporting_analyst"],
  "tasks": [
    {
      "name": "research_task",
      "description": "Conduct thorough research about {topic}. Find recent, relevant information.",
      "expected_output": "A list with 10 bullet points of the most relevant information about {topic}.",
      "agent": "researcher"
    },
    {
      "name": "reporting_task",
      "description": "Review the research and expand each topic into a full section for a report.",
      "expected_output": "A markdown report with the main topics, each with a full section of information. No fenced code blocks around the whole document.",
      "agent": "reporting_analyst",
      "context": ["research_task"],
      "output_file": "output/report.md",
      "markdown": true
    }
  ],
  "process": "sequential",
  "verbose": true,
  "inputs": {
    "topic": "AI Agents"
  }
}

3. Running Your Crew

Before running your crew, set the required keys in your .env file:

Then install dependencies and run from the project directory:

crewai install
crewai run

If you need additional packages, use uv add <package-name>.

You should see the output in the console, and output/report.md should be created in the project root.

In addition to the sequential process, you can use the hierarchical process, which automatically assigns a manager to the defined crew to properly coordinate the planning and execution of tasks through delegation and validation of results. See more about the processes here.

For a Flow-first walkthrough, see the Quickstart.

Key Features

CrewAI gives developers a practical foundation for building agentic systems that move from prototype to production: autonomous collaboration where it helps, explicit workflow control where it matters, and Python-native customization throughout.

Choose CrewAI to build powerful, adaptable, and production-ready AI automations.

Examples

You can test different real life examples of AI crews in the CrewAI-examples repo:

Quick Tutorial

CrewAI Tutorial

Write Job Descriptions

Check out code for this example or watch a video below:

Jobs postings

Trip Planner

Check out code for this example or watch a video below:

Trip Planner

Stock Analysis

Check out code for this example or watch a video below:

Stock Analysis

Using Crews and Flows Together

CrewAI's power truly shines when combining Crews with Flows to create sophisticated automation pipelines. CrewAI flows support logical operators like or_ and and_ to combine multiple conditions. This can be used with @start, @listen, or @router decorators to create complex triggering conditions.

Here's how you can orchestrate multiple Crews within a Flow:

from crewai.flow.flow import Flow, listen, start, router, or_
from crewai import Crew, Agent, Task, Process
from pydantic import BaseModel

# Define structured state for precise control
class MarketState(BaseModel):
    sentiment: str = "neutral"
    confidence: float = 0.0
    recommendations: list = []

class AdvancedAnalysisFlow(Flow[MarketState]):
    @start()
    def fetch_market_data(self):
        # Demonstrate low-level control with structured state
        self.state.sentiment = "analyzing"
        return {"sector": "tech", "timeframe": "1W"}  # These parameters match the task description template

    @listen(fetch_market_data)
    def analyze_with_crew(self, market_data):
        # Show crew agency through specialized roles
        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 = Task(
            description="Analyze {sector} sector data for the past {timeframe}",
            

crewAI (crewAIInc/crewAI)

Searching Database…

59.8K ·GitHub
这是什么?CrewAI 是一个开源的 Python 框架,用于编排角色扮演式的自主 AI 智能体。这些智能体可以组成 Crews 团队协作,也可以以事件驱动的 Flows 方式运行,从而自动完成复杂任务。
它是框架还是库?Crews 和 Flows 有什么区别?它是一个框架,包含两个相辅相成的构建模块:Crews 让一组 AI 智能体基于角色进行决策并自主协作;Flows 则是事件驱动的工作流,可以对状态和分支进行精确、确定性的控制。
怎样让一个 Crew 跑起来?安装 Python 3.10+,创建项目,在 crew.jsonc 和 main.py 等文件中配置智能体和任务,在 .env 中设置你的 API 密钥,然后在项目目录下运行 `crewai run`。
我需要特定的大模型服务商或额外的 API 密钥吗?你需要所连接的模型服务商的 API 密钥,可以是兼容 OpenAI 接口的服务商,也可以是通过 LLM 设置接入的其他服务商。如果要使用网络搜索工具,还需要一个 Serper.dev 的 API 密钥。
免费框架和 CrewAI AMP 的主要区别是什么?核心框架免费且开源,但可观测性、治理、安全、企业支持和托管部署等功能都属于付费的 CrewAI AMP Suite;只有 Crew Control Plane 这一组件提供免费版。
这适合谁?什么时候该用 CrewAI 而不是更简单的工具?它面向 Python 开发者,从简单的自动化任务到可用于生产环境的多智能体系统都能胜任。你可以选择自主协作(Crews)、严格控制(Flows),或者两者结合使用。
CrewAI 的智能体能使用 MCP 工具,或与其他智能体框架通信吗?可以。CrewAI 支持 MCP 和 A2A(智能体间通信)协议,因此智能体既可以调用外部工具服务器,也能与其他智能体系统互通。
CrewAI 为哪些编程智能体提供了技能?CrewAI 为 Claude Code 提供了官方技能,例如可自动激活的 getting-started、design-agent、design-task、ask-docs 等。此外,还可以通过 skills.sh 为 Cursor、Codex、Windsurf 等工具安装相应技能。
我能在一个 Crew 里混用层级式和顺序式执行吗?可以。除了默认的顺序式流程,你还可以使用层级式流程:CrewAI 会自动指派一个管理智能体,在团队成员之间分配并审核任务。
CrewAI 有社区或学习路径吗?有。CrewAI 在 learn.crewai.com 提供课程,已有超过 100,000 名开发者通过课程获得认证。课程涵盖多智能体基础知识和高级应用场景。
Creator
crewAIInc
Size
293 MB
Stars
59.8K
Age
2y
Commits · 90 Days