CrewAI: Free Open-Source Multi-Agent AI Framework for Python

Quick answer: CrewAI is a free, open-source (Apache 2.0) Python framework for building teams of role-based AI agents that collaborate on multi-step tasks. It has 30M+ downloads and 28,000+ GitHub stars, and works with any LLM — so paired with a free backend like Groq or Gemini and Serper's free search tier, a full multi-agent pipeline runs at $0.

CrewAI lets you hire a "crew" of specialized AI workers — a researcher, a writer, a code reviewer — each with a defined role, goal, and tools, then orchestrates them to complete work too complex for a single prompt. It runs on OpenAI, Groq, Gemini, Anthropic, Ollama (local), or any OpenAI-compatible API.

Install

pip install crewai crewai-tools

Requires Python 3.10–3.13. No server or Docker for basic use.

Four Core Concepts

  • Agent — an AI worker with a role, goal, and backstory, powered by an LLM and optionally equipped with tools.
  • Task — a specific job assigned to an agent, with a description and expected output format.
  • Crew — the team: a list of agents and tasks plus a process (sequential or hierarchical) that defines collaboration.
  • Tool — extends agents: SerperDevTool (search), FileReadTool, CodeInterpreterTool, ScrapeWebsiteTool, and 30+ more.

Quick Start: A Two-Agent Pipeline

A researcher finds information; a writer turns it into a blog post.

import os
from crewai import Agent, Task, Crew, Process
from crewai_tools import SerperDevTool

# Set your LLM API key (use Groq for free)
os.environ["OPENAI_API_KEY"] = "your-groq-api-key"
os.environ["OPENAI_API_BASE"] = "https://api.groq.com/openai/v1"
os.environ["OPENAI_MODEL_NAME"] = "openai/gpt-oss-120b"

search_tool = SerperDevTool()  # free at serper.dev

researcher = Agent(
    role="Technology Researcher",
    goal="Find accurate, up-to-date information on the given topic",
    backstory="You are an expert researcher who finds reliable sources and key insights.",
    tools=[search_tool],
    verbose=True
)

writer = Agent(
    role="Technical Writer",
    goal="Write clear, developer-friendly blog posts based on research",
    backstory="You write engaging technical content developers enjoy reading.",
    verbose=True
)

research_task = Task(
    description="Research the latest developments in {topic}. Focus on use cases and key features.",
    expected_output="A detailed research summary with key findings, statistics, and sources.",
    agent=researcher
)

write_task = Task(
    description="Using the research, write a 600-word blog post about {topic}.",
    expected_output="A complete, well-structured blog post ready for publication.",
    agent=writer
)

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

result = crew.kickoff(inputs={"topic": "CrewAI multi-agent framework"})
print(result.raw)

Process Types

ProcessHow It WorksBest For
SequentialTasks run one after another; output feeds the nextClear-order pipelines (research → write → review)
HierarchicalA manager agent delegates tasks and reviews resultsComplex workflows needing coordination and QA

Free LLM Backends

Switch providers without touching agent or task code — just change environment variables.

ProviderFree TierSpeedConfig
Groq30 RPM, 1,000 req/day on the Free PlanVery fast (LPU)OPENAI_API_BASE=https://api.groq.com/openai/v1
Google GeminiFree tier; daily caps not published (check AI Studio)FastUse crewai's Gemini LLM class
DeepSeekNone — top-up requiredModerateOPENAI_API_BASE=https://api.deepseek.com/v1
Ollama (local)Unlimited, 100% localDepends on hardwareOPENAI_API_BASE=http://localhost:11434/v1
OpenRouterMultiple free modelsVariesOPENAI_API_BASE=https://openrouter.ai/api/v1

Example: Code Review Pipeline

Two agents review the same code — one for bugs, one for security:

code_reviewer = Agent(
    role="Senior Python Developer",
    goal="Review Python code for bugs, security issues, and performance problems",
    backstory="You have 10 years of Python experience and a focus on code quality.",
    verbose=True
)

security_auditor = Agent(
    role="Application Security Engineer",
    goal="Identify security vulnerabilities in the provided code",
    backstory="You specialize in OWASP Top 10 vulnerabilities and secure coding.",
    verbose=True
)

review_task = Task(
    description="Review the following Python code:nn{code}nnIdentify bugs and improvement areas.",
    expected_output="A structured code review with specific line references and fixes.",
    agent=code_reviewer
)

security_task = Task(
    description="Audit the same code for security vulnerabilities: "
                "SQL injection, hardcoded secrets, insecure deserialization.",
    expected_output="Security audit report with severity ratings (Critical/High/Medium/Low).",
    agent=security_auditor
)

crew = Crew(
    agents=[code_reviewer, security_auditor],
    tasks=[review_task, security_task],
    process=Process.sequential
)

result = crew.kickoff(inputs={"code": open("myapp.py").read()})

Built-in Tools

ToolPurposeFree?
SerperDevToolGoogle web search (serper.dev)2,500 searches/month free
ScrapeWebsiteToolScrape webpage contentYes (no key needed)
FileReadTool / FileWriterToolRead / write local filesYes
CodeInterpreterToolExecute Python in a sandboxYes
GithubSearchToolSearch GitHub repositoriesYes (GitHub token)
YoutubeVideoSearchToolSearch YouTube contentYes

CrewAI vs Other Frameworks

FrameworkEaseFlexibilityCommunityBest For
CrewAI★★★★★★★★★☆★★★★★Role-based agent teams, quick prototyping
LangGraph★★★☆☆★★★★★★★★★☆Complex stateful workflows, fine control
AutoGen (Microsoft)★★★☆☆★★★★☆★★★★☆Conversational agent loops, research
AutoGPT★★★★☆★★☆☆☆★★★☆☆Standalone autonomous tasks
Dify★★★★★★★★☆☆★★★★☆No-code AI app building

Choose CrewAI when you want role-based agent pipelines in Python with minimal boilerplate. Its declarative style (role → goal → task → crew) maps to how humans think about teams, making it the easiest framework to learn and ship.

Automate with OpenClaw

To run a pipeline on a schedule, trigger it via WhatsApp, or monitor output without extra infrastructure, OpenClaw — a free AI agent tool — can call your CrewAI scripts, send results, and keep logs, all serverless.

npm install -g openclaw@latest
openclaw onboard

# Trigger your pipeline on a schedule or on-demand via chat
python crewai_pipeline.py --topic "AI news today"

Cost Breakdown: $0

  • Framework: Free, open source (Apache 2.0)
  • LLM: Free with Groq (1,000 req/day on chat models), Gemini (unpublished caps), or local Ollama
  • Web search: Free with Serper.dev (2,500 searches/month)
  • Hosting: Run locally or on a free cloud VM (Oracle Always Free, GitHub Actions)
  • Typical dev usage: $0/month

Frequently Asked Questions

Is CrewAI free for commercial use?

Yes. CrewAI is open source under the Apache 2.0 license, which permits commercial use and modification. Your only potential cost is the LLM behind it — and that can be $0 with a free-tier provider.

Can I run CrewAI without paying for an LLM?

Yes. Point it at Groq, Gemini, or DeepSeek free tiers, or a fully local Ollama model, by setting the OPENAI_API_BASE environment variable. Agent and task code stays unchanged.

Sequential or hierarchical process?

Use sequential for clear ordered pipelines (research → write → review). Use hierarchical when a manager agent should delegate and review — better for complex workflows needing coordination.

Get Started

GitHub | Docs | crewai.com