SuperOptiX Workflow with CrewAI
Define agents by role, goal, and backstory
Start single, scale to teams
Assign specific tasks to agents
Role + goal + backstory + task optimization
uv pip install superoptix "crewai>=1.15"
super agent pull researcher_crew
super agent compile researcher_crew --framework crewai
super agent evaluate researcher_crew # Result: 4/4 PASS (100%)! 🎉
super agent compile researcher_crew --framework crewai --optimize super agent optimize researcher_crew --auto light --framework crewai
super agent run researcher_crew --framework crewai --goal "AI trends in 2025"
GEPA optimizes role + goal + backstory together as a single variable
| Component | Impact | Example |
|---|---|---|
| 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 |
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
Why Ollama Works with CrewAI (unlike DeepAgents)
from crewai.llm import LLM llm = LLM( model="ollama/gpt-oss:20b", base_url="http://localhost:11434" ) # No bind_tools() limitations!
| Model | Size | Best For |
|---|---|---|
| gpt-oss:20b | 20B | ⭐ Recommended |
| gpt-oss:120b | 120B | Maximum quality |
| llama3.1:8b | 8B | Fast, testing |
| qwen2.5:14b | 14B | Good balance |
Use cloud LLMs for production-grade performance — supports ALL LiteLLM providers
# Set API key export GOOGLE_API_KEY="your-key" # Playbook config: language_model: location: cloud provider: google model: gemini-2.0-flash
# Set API key export OPENAI_API_KEY="sk-..." # Playbook config: language_model: location: cloud provider: openai model: gpt-4o
# Set API key export ANTHROPIC_API_KEY="sk-ant-..." # Playbook config: language_model: location: cloud provider: anthropic model: claude-sonnet-4-5
| Feature | DSPy | DeepAgents | OpenAI SDK | CrewAI |
|---|---|---|---|---|
| Ollama Support | ❌ | |||
| Multi-Agent | ❌ | Sub-agents | Handoffs | Native |
| Role-Based | ❌ | ❌ | ❌ | |
| Optimizable Vars | 10+ | 1 | 1 | 5 |
| Community | 5K | 1K | 50K+ | 100K+ |
| Best For | Prompts | Planning | Simple | Teams |