CrewAI Integration
CrewAI logo

CrewAI

Multi-Agent Framework with 100,000+ Certified Developers! Role-based agent design perfect for optimization.

Works with Ollama (unlike DeepAgents!)
GEPA optimizes role + goal + backstory
100K+ Certified Developers

🔄 How It Works

SuperOptiX Workflow with CrewAI

📝SuperSpec YAML
compile
🐍CrewAI Python
evaluate
BDD Scenarios
optimize
🧬GEPA Optimizer
run
🚀crew.kickoff()

Role-Based Design

Define agents by role, goal, and backstory

Multi-Agent Native

Start single, scale to teams

Task Delegation

Assign specific tasks to agents

5 Optimizable Vars

Role + goal + backstory + task optimization

📦 Installation

uv pip install superoptix "crewai>=1.15"

Includes:

  • • crewai 1.15+
  • • SuperOptiX core with GEPA 0.1.4

Requirements:

  • • Python 3.11+
  • • Git (for DSPy dependency)

🚀 Quick Start

1

Pull Demo Agent

super agent pull researcher_crew
2

Compile

super agent compile researcher_crew --framework crewai
3

Evaluate

super agent evaluate researcher_crew
# Result: 4/4 PASS (100%)! 🎉
4

Optimize

super agent compile researcher_crew --framework crewai --optimize
super agent optimize researcher_crew --auto light --framework crewai
5

Run

super agent run researcher_crew --framework crewai --goal "AI trends in 2025"

🎯 What GEPA Can Optimize

GEPA optimizes role + goal + backstory together as a single variable

ComponentImpactExample
role
HIGH
"Senior AI Researcher" → "AI Research Specialist with expertise in..."
goal
HIGH
"Uncover developments" → "Discover, analyze, and synthesize breakthrough..."
backstory
MEDIUM
"You're a researcher" → "Distinguished researcher with 10+ years experience..."
task.description
HIGH
What the task should accomplish
task.expected_output
HIGH
What the task should produce

📋 SuperSpec Playbook Structure

apiVersion: agent/v1
kind: AgentSpec
metadata:
  name: researcher_crew
  id: researcher_crew
  namespace: demo
  version: 1.0.0

spec:
  target_framework: crewai
  
  # LLM Configuration - Works with Ollama!
  language_model:
    provider: ollama
    model: ollama:gpt-oss:20b
    api_base: http://localhost:11434
  
  # CrewAI Agent Profile (GEPA optimizes this!)
  persona:
    role: Senior AI Researcher
    goal: Uncover cutting-edge AI developments
    backstory: |
      You're a seasoned researcher with deep expertise in AI.
      Known for finding authoritative sources and presenting
      clear, actionable insights.
    traits:
      - analytical
      - thorough
  
  # CrewAI Task Configuration
  tasks:
    - name: research_task
      description: |
        Conduct comprehensive research on {topic}.
        Find the most relevant and up-to-date information.
      expected_output: |
        A detailed research report with:
        - 5-10 key findings
        - Clear explanations
        - Relevant context
  
  # BDD Scenarios for Testing
  feature_specifications:
    scenarios:
      - name: AI frameworks research
        input:
          topic: "AI agent frameworks"
        expected_output:
          report: "Research report"
          expected_keywords:
            - agent
            - framework
            - AI

🦙 Ollama Configuration

Why Ollama Works with CrewAI (unlike DeepAgents)

CrewAI has its own LLM class!

from crewai.llm import LLM

llm = LLM(
    model="ollama/gpt-oss:20b",
    base_url="http://localhost:11434"
)

# No bind_tools() limitations!

Recommended Ollama Models

ModelSizeBest For
gpt-oss:20b20B⭐ Recommended
gpt-oss:120b120BMaximum quality
llama3.1:8b8BFast, testing
qwen2.5:14b14BGood balance

☁️ Cloud Model Configuration

Use cloud LLMs for production-grade performance — supports ALL LiteLLM providers

🟢

Google Gemini

FREE Tier Available
# Set API key
export GOOGLE_API_KEY="your-key"

# Playbook config:
language_model:
  location: cloud
  provider: google
  model: gemini-2.0-flash
🔵

OpenAI

# Set API key
export OPENAI_API_KEY="sk-..."

# Playbook config:
language_model:
  location: cloud
  provider: openai
  model: gpt-4o
🟠

Anthropic Claude

# Set API key
export ANTHROPIC_API_KEY="sk-ant-..."

# Playbook config:
language_model:
  location: cloud
  provider: anthropic
  model: claude-sonnet-4-5

CrewAI vs Other Frameworks

FeatureDSPyDeepAgentsOpenAI SDKCrewAI
Ollama Support
Multi-AgentSub-agentsHandoffsNative
Role-Based
Optimizable Vars10+115
Community5K1K50K+100K+
Best ForPromptsPlanningSimpleTeams

Best for:

  • Multi-agent collaboration
  • Role-based task distribution
  • Complex crew dynamics
  • Team-based workflows
  • Production systems

❌ Not ideal for:

  • Simple single-agent tasks (use DSPy or OpenAI SDK)
  • Maximum prompt optimization (use DSPy)
  • Planning-heavy workflows (use DeepAgents)

Ready to Build Multi-Agent Teams?

Start building collaborative AI agents with CrewAI today!