ScriptsApr 6, 2026·2 min read

CrewAI — Multi-Agent Orchestration Framework

Python framework for orchestrating role-playing AI agents that collaborate on complex tasks. Define agents with roles, goals, and tools, then let them work together autonomously. 25,000+ stars.

AG
Agent Toolkit · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

pip install crewai crewai-tools
from crewai import Agent, Task, Crew

researcher = Agent(
    role="Senior Researcher",
    goal="Find the latest AI trends",
    backstory="Expert at analyzing tech trends",
    tools=[search_tool]
)

writer = Agent(
    role="Tech Writer",
    goal="Write engaging content about AI",
    backstory="Skilled at making complex topics accessible"
)

research_task = Task(
    description="Research the top 5 AI coding tools in 2026",
    agent=researcher
)

write_task = Task(
    description="Write a blog post based on the research",
    agent=writer
)

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

Intro

CrewAI is a Python framework for orchestrating role-playing AI agents that collaborate on complex tasks with 25,000+ GitHub stars. Define agents with specific roles, goals, backstories, and tools, then organize them into crews that work together autonomously — like assembling a virtual team where each member has specialized expertise. Best for developers building multi-agent systems for research, content creation, data analysis, and workflow automation. Works with: Claude, GPT-4, Gemini, Ollama, any LangChain-supported model. Setup time: under 3 minutes.


Core Concepts

Agents

Each agent has a role, goal, and optional tools:

analyst = Agent(
    role="Data Analyst",
    goal="Analyze datasets and find actionable insights",
    backstory="10 years of experience in data science",
    tools=[csv_tool, sql_tool, chart_tool],
    llm="claude-sonnet-4-20250514"
)

Tasks

Tasks define what needs to be done:

analysis_task = Task(
    description="Analyze Q1 sales data and identify top-performing regions",
    expected_output="Report with charts and recommendations",
    agent=analyst,
    output_file="q1_analysis.md"
)

Crews

Crews orchestrate agents and tasks:

crew = Crew(
    agents=[analyst, writer, reviewer],
    tasks=[analysis_task, write_task, review_task],
    process=Process.sequential  # or Process.hierarchical
)

Process Types

Process How It Works
sequential Tasks run one after another
hierarchical Manager agent delegates to workers

Built-In Tools

from crewai_tools import (
    SerperDevTool,      # Web search
    ScrapeWebsiteTool,  # Web scraping
    FileReadTool,       # Read files
    DirectoryReadTool,  # Read directories
    CodeInterpreterTool # Execute code
)

Real-World Example: Content Pipeline

# Research → Write → Edit → Publish
researcher = Agent(role="Researcher", tools=[search_tool])
writer = Agent(role="Writer")
editor = Agent(role="Editor")

crew = Crew(
    agents=[researcher, writer, editor],
    tasks=[
        Task(description="Research topic X", agent=researcher),
        Task(description="Write 1000-word article", agent=writer),
        Task(description="Edit for grammar and clarity", agent=editor),
    ],
    process=Process.sequential
)

Key Stats

  • 25,000+ GitHub stars
  • Role-based agent design
  • Sequential and hierarchical processes
  • 20+ built-in tools
  • Memory and caching support

FAQ

Q: What is CrewAI? A: CrewAI is a Python framework for building teams of AI agents that collaborate on complex tasks, each with specialized roles, goals, and tools.

Q: Is CrewAI free? A: Yes, open-source under MIT license. Enterprise edition available.

Q: How is CrewAI different from LangGraph? A: CrewAI uses a role-playing metaphor — you define agents with roles and goals. LangGraph uses a graph-based approach with nodes and edges. CrewAI is more intuitive for team-like workflows.


🙏

Source & Thanks

Created by CrewAI. Licensed under MIT.

crewAI — ⭐ 25,000+

Thanks to the CrewAI team for making multi-agent orchestration accessible.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets