Skip to content

Guide · Open source

How to use crewAI: install, build agents and run a crew

Updated · written with AI from the project's own documentation and checked against our catalogue data

CrewAI is an open-source Python framework for orchestrating multiple AI agents. You give each agent a role and goal, and they collaborate through what the project calls Crews, while Flows offer more precisely controlled, event-driven workflows. This guide is for developers who want to install CrewAI, understand its two main building blocks, and run a first multi-agent workflow.

CrewAIcrewAIInc/crewAI · ★ 60.4k · MIT

Quick start

  1. 1Confirm Python is installed. CrewAI is a Python framework, so make sure Python is available on your machine before you begin.
  2. 2Install CrewAI. Run pip install crewai to install the package from PyPI.
  3. 3Learn Crews and Flows. Read the README's overview of Crews for autonomous agent teams and Flows for event-driven control.
  4. 4Define your agents. Give each agent a clear role and goal that matches part of the task.
  5. 5Set up your crew. Define the tasks and bring the agents together into a crew, following the Quick Tutorial or the official docs.
  6. 6Run and review. Run the crew, check the output, and adjust agent roles or task descriptions as needed.

What does CrewAI do?

CrewAI is described in its README as an open-source Python framework with high-level abstractions and low-level APIs for building multi-agent workflows. It has two main parts: Crews, where role-based AI agents collaborate autonomously, and Flows, which are event-driven workflows that give precise control over execution paths and state.

The project is aimed at developers building multi-step automations with LLMs. It is not a no-code tool.

  • Crews: teams of agents with defined roles, goals and expertise that collaborate on a task.
  • Flows: production-ready, event-driven workflows with fine-grained control, state management between tasks, and native support for Crews.

What you need before you install CrewAI

The README lists Python as the prerequisite and installs the package from PyPI. Because CrewAI is a Python framework, you need to be comfortable writing and running Python code. The README does not list other specific requirements, so check the project documentation for the Python version it supports.

Install CrewAI with pip

Install the package from PyPI using pip, as shown in the project's README.

pip install crewai

Create your first crew: agents, tasks and a run

The README's Getting Started section walks through three stages: installation, setting up your crew, and running your crew. Setting up a crew means defining the agents, each with a role and goal, and the work they will do together. The README points to its Quick Tutorial and the official docs at docs.crewai.com for the exact project scaffolding and code.

Agent roles and goals are the core of the design. Describe each agent's specialty clearly so the crew can divide work sensibly.

  • Install CrewAI and confirm it imports in your Python environment.
  • Define one or more agents, each with a role and goal.
  • Define the tasks the crew should complete.
  • Run the crew and review the output.

Choose between Crews and Flows

Use Crews when you want agents to decide how to divide and carry out work. Use Flows when you need tighter control over execution paths and state. The README says the two approaches work together, so a Flow can also make use of Crews.

The README's best-fit list says CrewAI suits developers who want both autonomous agent teams and step-by-step control via Flows, and builders who want low-level control over prompts and execution logic.

  • Pick Crews for autonomous, role-based collaboration.
  • Pick Flows for precise, event-driven control and consistent state.
  • Combine both when a workflow needs structure around some autonomous steps.

Connect your crew to a model and use the build tools

The README includes a section titled Connecting Your Crew to a Model, but the source provided here does not include its contents, so consult the docs for model configuration details.

If you use an AI coding agent, the README says CrewAI Skills can be installed to teach it CrewAI patterns. For Claude Code the project lists a plugin marketplace, and for Cursor, Codex, Windsurf and others it lists the npx skills command shown in its README.

npx skills add crewaiinc/skills

What people use it for

  • Prototyping a multi-agent workflow where a researcher, writer and reviewer agent hand work between them.
  • Building a multi-step automation with LLMs that needs step-by-step control via Flows.
  • Experimenting with low-level control over prompts and execution logic.
  • Exploring the README examples such as Write Job Descriptions, Trip Planner and Stock Analysis.

Frequently asked questions

Is CrewAI free to use?

CrewAI is listed under the MIT licence, which is a permissive open-source licence. The README also mentions a commercial product called CrewAI AMP Suite, which is a separate paid offering with managed deployment and enterprise support.

What do I need to install CrewAI?

The README lists Python as the prerequisite and installs the package from PyPI with pip install crewai. You also need to write Python code to use it.

Can non-programmers use CrewAI?

No. The project is a Python framework and requires writing code. The README's not-for list names non-programmers as a poor fit.

What is the difference between Crews and Flows?

Crews are teams of role-based agents that collaborate autonomously on tasks. Flows are event-driven workflows that give precise control over execution paths and state, and they can include Crews.

What are the alternatives to CrewAI?

The comparable projects listed in the analysis are LangGraph, AutoGen, LlamaIndex and Microsoft Semantic Kernel. Each targets AI application or agent development, so compare them against your needs for control and workflow structure.

Is CrewAI a hosted service?

CrewAI is an open-source framework you run yourself. The README mentions a Cloud Trial and the commercial AMP Suite for managed deployment, but those are separate from the open-source package.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

CrewAI suits Python developers who want to prototype multi-agent workflows with role-based agents and, where needed, tighter step-by-step control through Flows. Non-programmers, teams wanting a fully managed product without setup, and simple single-prompt tasks should look elsewhere.

Install options & downloads