Skip to content

Harness profile

CrewAI: teams of role-based agents inside structured flows

CrewAI is an open-source Python framework for building teams of agents, each with a role, a goal and tools, that work through tasks together. It is best for work that splits naturally into roles, wrapped in event-driven Flows that keep the overall process under control.

StudiedLast reviewed 4 min read

Explained from public sources. Mai has not built this yet.

On this page

In plain English

CrewAI lets you describe AI agents the way you would describe a small team: a researcher, a writer, a reviewer, each with a role, a goal and the tools they are allowed to use. You give the team tasks, and the agents work through them, passing results along. Around the team sits a Flow, an ordinary step-by-step process that decides when the team is called and what happens with its output. It is a Python library you run yourself, with a paid platform available for hosting and oversight.

How it works

CrewAI has two halves that the docs recommend using together.

Crews are teams of agents. Each agent has a role, a goal and tools, and each task describes a piece of work. A crew runs its tasks under one of two processes:

  • Sequential: tasks run in order, and each task’s output becomes context for the next.
  • Hierarchical: a manager agent plans the work, assigns tasks to the agent best suited to each, checks the results and decides when the job is done. You must supply a model for the manager or your own manager agent.

Flows are event-driven workflows written as Python classes. A method marked @start() begins the flow, @listen() runs a method when another finishes, and @router() sends execution down a labelled branch based on a result. State lives on the flow, either as a free-form dictionary or as a typed model, and @persist saves it (to SQLite by default) so a run can be resumed or forked from a saved point. Flows can be plotted as an interactive diagram.

Flow: Start, Router. Then Crew: Manager agent, Researcher, Writer. Then Custom tools, MCP servers. Then You review. Then Flow state, Memory.

A Flow controls the process and hands the open-ended step to a crew of role-based agents

Memory. Crews, agents and flows share one Memory class. Records sit in a tree of scopes, so an agent can be given a private branch. The default store is LanceDB on local disk, and semantic recall needs an embedding model, which defaults to an OpenAI model unless you configure another, such as a local one through Ollama.

Models. There are native integrations for OpenAI, Anthropic, Google Gemini, Azure, AWS Bedrock and Snowflake Cortex. Everything else, from Mistral and Groq to Ollama and OpenRouter, goes through LiteLLM, and any OpenAI-compatible endpoint can be set by URL.

Tools and MCP. Agents take custom tools, and MCP servers can be listed on an agent directly, over stdio, SSE or Streamable HTTP. Tool filters limit which MCP tools an agent may call.

Human input. Flows have a @human_feedback decorator for console review during development. For production, the paid platform offers webhook-based review: the run pauses as pending human input, you receive the output, and you resume with feedback and an approval flag. Negative feedback makes the task retry with your notes added.

CrewAI is MIT licensed, Python only (3.10 to 3.13 at the time of review), and independent of LangChain. The commercial AMP Suite adds managed deployment, governance, tracing and observability, and enterprise support.

What it does best

  • Readable designs. Roles, goals and tasks read almost like a job description, which makes a multi-agent design easy to explain to the people whose work it mirrors.
  • Delegation out of the box. The hierarchical process gives you a manager that assigns and checks work without writing the routing yourself.
  • Structure where it counts. Flows let you keep the parts of a process that must be predictable in plain code, and hand only the open-ended step to a crew.
  • Wide model choice. Native providers plus LiteLLM cover most hosted and local models.
  • Simple MCP set-up. Adding a server to an agent is one field, with filters to narrow what it can reach.

Where it stops

  • Python only. There is no official version for other languages.
  • Production approvals lean on the paid platform. The open-source decorator suits console review. The webhook pause-and-resume flow is documented as an enterprise feature.
  • Tracing is mainly a platform feature. The repository lists tracing and observability under the commercial control plane.
  • MCP coverage is partial. The docs say the adapter mainly supports tools, not MCP prompts or resources.
  • Defaults assume OpenAI. The default model and the default embedding model for memory both need an OpenAI key unless you change them.

Where it goes wrong

Autonomy is the risk. A hierarchical crew lets a model decide who does what and when the job is finished, which is flexible but harder to predict and to test than a fixed sequence. Every round of manager review is also more model calls, so cost grows with the size of the team. Feedback given at a review step becomes context for later tasks, so long or vague notes can steer the rest of the run in ways you did not intend. And memory built with one embedding model may not match a later default, which the docs flag as needing a reset or a pinned embedder.

How Mai AI uses it

I would use CrewAI when a piece of work genuinely divides into roles, such as research, drafting and checking, and the client wants to see the design in those terms. I would keep the overall process in a Flow, persist its state, and only call a crew for the one step that needs judgement.

The idea I take from it is the pairing of a predictable outer process with a small, autonomous team inside it. That is the shape behind routing and specialist agents and sub-agents working in parallel, and it keeps the review step in a fixed place for human approval gates. For how this fits into a whole system, see how Mai AI designs custom AI operations systems.

Questions and answers

Is CrewAI free?

The CrewAI framework is open source under the MIT licence. CrewAI also sells a commercial platform, the AMP Suite, which adds managed deployment, governance, tracing and enterprise support.

Is CrewAI built on LangChain?

No. The project describes itself as a standalone Python framework with its own primitives.

What is the difference between a Crew and a Flow in CrewAI?

A Crew is a team of autonomous agents that work through tasks together. A Flow is an event-driven workflow with state and explicit control over steps, branches and loops. The docs recommend starting production apps with a Flow and calling a Crew from a step when that step needs autonomy.

Which models does CrewAI support?

It has native integrations for OpenAI, Anthropic, Google Gemini, Azure, AWS Bedrock and Snowflake Cortex, and reaches many other providers, including Ollama for local models, through LiteLLM. OpenAI-compatible endpoints also work.

Does CrewAI support MCP?

Yes. Agents can be given MCP servers directly, over stdio, SSE or Streamable HTTP. The docs note that the integration mainly covers MCP tools, not prompts or resources.

Sources

  1. CrewAI introductiondocs.crewai.com
  2. Processesdocs.crewai.com
  3. Flowsdocs.crewai.com
  4. Memorydocs.crewai.com
  5. LLMsdocs.crewai.com
  6. MCP servers as toolsdocs.crewai.com
  7. Human-in-the-loopdocs.crewai.com
  8. crewAI on GitHubgithub.com