CrewAI

1.10.0 · active · verified Sat Feb 28

Python framework for orchestrating role-playing, autonomous AI agents. Agents collaborate via sequential or hierarchical processes to complete complex tasks. Built from scratch — independent of LangChain. Two core primitives: Crews (autonomous multi-agent collaboration) and Flows (event-driven, precise orchestration).

Warnings

Install

Imports

Quickstart

Minimal two-agent crew with sequential process

from crewai import Agent, Task, Crew, Process

researcher = Agent(
    role='Senior Researcher',
    goal='Uncover groundbreaking technologies in AI',
    backstory='You are an expert researcher with a passion for AI innovation.',
    verbose=True
)

writer = Agent(
    role='Tech Writer',
    goal='Craft compelling articles about AI discoveries',
    backstory='You are a skilled writer who makes complex topics accessible.',
    verbose=True
)

research_task = Task(
    description='Research the latest breakthroughs in AI for 2026.',
    expected_output='A list of 5 key AI breakthroughs with brief descriptions.',
    agent=researcher
)

write_task = Task(
    description='Write a short article based on the research findings.',
    expected_output='A 3-paragraph article in markdown format.',
    agent=writer
)

crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, write_task],
    process=Process.sequential,
    verbose=True
)

result = crew.kickoff()
print(result)

view raw JSON →