← frameworks directory○ community

Framework · Python · crewAI Inc.

CrewAI.

Some problems are not a single agent. They are a researcher and a writer and an editor, each with their own tools and perspective. CrewAI is the framework that takes that abstraction seriously.

$ pip install crewai

CrewAI's central bet is that multi-agent collaboration is more useful than people assume, but only when the abstractions match how teams actually work. Defined roles, hand-offs, tools per role, and a process that orchestrates the whole thing. The result is a framework that feels like staffing a small team rather than configuring a single bot.

The mental model is different from LangGraph or a custom loop. You do not define states; you define roles. Each role gets a goal, a backstory, tools, and the things it is allowed to delegate. The crew runs and produces an artifact, and the design conversation up front is about who is on the team rather than what the next state transition is.

§01The primitives

The framework breaks the design surface into five primitives that map onto how teams operate:

  • An Agent is a role with a goal, backstory, model, tools, and (optionally) memory.
  • A Task is a unit of work assigned to a specific agent, with the expected output spelled out.
  • A Crew is a collection of agents and tasks, run sequentially or hierarchically.
  • A Process is how the crew orchestrates: sequential, hierarchical, or consensus-based.
  • Memory covers both short-term and long-term, and agents in the same crew can reference each other's memory.

§02When it fits

Research-heavy reports. Content production pipelines that move from research to outline to draft to edit. Customer support that needs both lookup and empathy from different specialists. Anything where naming the roles up front makes the design clearer than naming the steps. CrewAI is also the right abstraction when the work product is genuinely multi-perspective: an analyst draft critiqued by a skeptic produces something one agent on its own does not.

§03Setup

pip install crewai

from crewai import Agent, Task, Crew

researcher = Agent(
    role="Senior researcher",
    goal="Find the best info on X",
    backstory="...",
    tools=[search, fetch],
)

writer = Agent(
    role="Tech writer",
    goal="Turn research into a clear post",
    backstory="...",
)

crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, write_task],
    process="sequential",
)
result = crew.kickoff()

§04Caveats

  • Multi-agent costs more. Two agents doing 60% of the job each is more expensive than one doing 100%. Use the abstraction only when it actually helps.
  • Role-play prompting. The framework leans on role and backstory prompts, which are effective but feel theatrical. Either commit to the prompt style or pick a framework that does not lean on it.
  • Debugging multi-agent runs is harder than debugging single-loop agents. Logging is the workhorse. Verbose mode by default in dev.