How it works

CrewAI is an open source Python framework for building teams of AI agents that work together. The metaphor is a work team: each agent has a role, and the team receives tasks.

Core concepts:

  • Agent: has a role, a goal and a context, such as "researcher" or "writer".
  • Task: the work to be done, with a description and the expected output.
  • Crew (team): the group of agents and tasks, with the execution order.
  • Tools: functions agents can use, such as web search or file reading.
  • Process: how work flows, sequentially or with one agent coordinating the others.

The output of one task can serve as input for the next. So the researcher delivers notes, the writer writes the text and the reviewer adjusts.

Each agent uses a language model, and the framework lets you configure different models per agent.

Practical example

A store wants to produce product descriptions with quality. It builds a team of three agents:

  1. Researcher: collects product characteristics and audience information.
  2. Writer: writes the description.
  3. Reviewer: checks tone, errors and exaggerated claims.

The Python skeleton follows this idea:

Python
from crewai import Agent, Task, Crew

redator = Agent(role="Redator", goal="Escrever descrições claras", backstory="Especialista em e-commerce")
tarefa = Task(description="Escreva a descrição do produto X", expected_output="Texto de 100 palavras", agent=redator)
equipe = Crew(agents=[redator], tasks=[tarefa])
resultado = equipe.kickoff()

Exact parameters change between versions. Check the official documentation before using.

What it's for

CrewAI is for automating work that benefits from role division: research, content production, data analysis, support triage and review.

For developers, it reduces the code needed to create a simple multi-agent system. For business owners, it lets you test an AI team on a repetitive process before investing in something bigger.

Quick comparison: CrewAI focuses on the team metaphor with roles. LangGraph focuses on flows as graphs, with more control over each step. Choose based on how much control you need.

bridgecode also works with agent squads, but by coordinating code agents like Claude Code and Codex, and not a library for you to program.

Best practices:

  • Start with 2 or 3 agents, not ten.
  • Define the expected output for each task.
  • Limit each agent's tools to what's necessary.
  • Review the final output before publishing or sending.