Lesson 1 of 5·11 min read

Understanding CrewAI

CrewAI takes a unique approach in the multi-agent world: role-based agents that collaborate like a real team. Instead of programming complex state graphs, you define agents with roles, goals, and backstories — and CrewAI orchestrates the collaboration.

Philosophy: Role-Based Agents

CrewAI is inspired by real teamwork. Each agent has:

  • Role: What the agent is (e.g., "Senior Research Analyst")
  • Goal: What the agent should achieve
  • Backstory: Context and expertise of the agent

This metaphor makes it intuitive to design multi-agent systems — even without deep technical knowledge.

The Three Building Blocks

1. Agents

Autonomous units with defined roles and capabilities:

from crewai import Agent

researcher = Agent(
    role="Senior Research Analyst",
    goal="Find the most relevant information on the topic",
    backstory="You are an experienced research analyst with 15 years "
              "of experience in the technology industry.",
    verbose=True,
    allow_delegation=True
)

2. Tasks

Concrete assignments for agents to complete:

from crewai import Task

research_task = Task(
    description="Research the latest trends in {topic}",
    expected_output="A structured report with the top 5 trends",
    agent=researcher
)

3. Crews

Teams of agents working together on tasks:

from crewai import Crew, Process

crew = Crew(
    agents=[researcher, writer, editor],
    tasks=[research_task, writing_task, editing_task],
    process=Process.sequential,
    verbose=True
)
result = crew.kickoff()

Process Types

ProcessDescriptionUse Case
SequentialTasks are processed one after anotherLinear workflows (Research → Write → Edit)
HierarchicalA manager agent delegates and coordinatesComplex projects with decisions

Sequential Process

Agent 1 (Research) → Agent 2 (Write) → Agent 3 (Edit) → Result

Hierarchical Process

Manager Agent
├── delegates to Research Agent
├── reviews result
├── delegates to Writer Agent
├── reviews result
└── approves final result

CrewAI vs. LangGraph

AspectCrewAILangGraph
AbstractionHigh-level (roles, goals)Low-level (nodes, edges, state)
Learning curveShallow — quick startSteep — full control
FlexibilityGood for team workflowsMaximum flexibility
CustomizationLimited but sufficientUnlimited
Best forBusiness workflows, contentComplex technical agents

Practical tip: CrewAI is ideal when you need a working multi-agent team quickly. If you need maximum control over state, routing, and cycles, choose LangGraph.

📝

Quiz

Question 1 of 3

Was ist das zentrale Design-Prinzip von CrewAI?