Default Framework
DSPy logo

DSPy

Stanford Research Framework - The most powerful optimization framework in the AI space. Maximum flexibility with 10+ optimizable variables.

Default SuperOptiX Framework
10+ Optimizable Variables
Full Ollama Support (FREE!)

SuperOptiX & DSPy

DSPy is the most powerful optimization framework in the AI space. SuperOptiX harnesses DSPy's optimization principles and extends them for agentic AI.

🎯 Why DSPy is Perfect for Agentic Systems

DSPy's iterative optimization principles align perfectly with Test-Driven Development (TDD) and Behavior-Driven Development (BDD) methodologies.

DSPy Core StrengthAgentic Need
Optimization-FirstReliable agent behavior
Assertions & EvaluationsAgent validation
Signature GenerationContext engineering
Module CompositionMulti-agent coordination

🚀 SuperOptiX: Agentic Evolution of DSPy

SuperOptiX includes sophisticated modules designed specifically for agentic and multi-agent scenarios:

  • Multi-Agent Coordination Modules - Advanced orchestration patterns
  • Protocol Support Modules - MCP and A2A integration
  • Memory-Optimized Modules - Context-aware memory management
  • Guardrail Modules - Safety and compliance checks
🔬

Structured Prompting

Signatures for input/output specs

Automatic Pipeline Generation

From specifications to code

📊

Built-in Evaluation

Assertions and metrics

🎯

Multiple Optimizers

SIMBA, MIPROv2, BootstrapFewShot

📦 Installation

Core Installation (includes DSPy)

uv tool install superoptix

With DSPy specifically

uv tool install superoptix --with "superoptix[frameworks-dspy]"

Note: DSPy is the default framework - it's included in the core installation!

🚀 Quick Start

Get started with DSPy in minutes

1

Pull Demo Agent

super agent pull sentiment_analyzer
2

Compile (DSPy is default)

super agent compile sentiment_analyzer

No need to specify --framework, DSPy is the default!

3

Evaluate Baseline

super agent evaluate sentiment_analyzer
4

Optimize with GEPA

super agent compile sentiment_analyzer --optimize
super agent optimize sentiment_analyzer --auto light
5

Run

super agent run sentiment_analyzer

🎯 What GEPA Optimizes

DSPy has the most optimizable variables of any framework

Signatures

HIGH

Input/output specifications for each module

Instructions

HIGH

System prompts and task descriptions

Chain-of-Thought

HIGH

Reasoning step prompts

Few-Shot Examples

MEDIUM

Example demonstrations

Module Connections

MEDIUM

How modules chain together

Retrieval Queries

MEDIUM

RAG query optimization

🔧 DSPy Optimizers

Use DSPy's native optimizers or SuperOptiX's Universal GEPA

⭐ Recommended

GEPA

Universal optimizer that works across ALL frameworks

DSPy Native

SIMBA

DSPy's similarity-based optimizer

DSPy Native

MIPROv2

Multi-instruction prompt optimizer

DSPy Native

BootstrapFewShot

Bootstrap few-shot examples

⚙️ Configuration

Example Playbook

apiVersion: agent/v1
kind: AgentSpec
metadata:
  name: my_dspy_agent
spec:
  target_framework: dspy  # or omit for default
  language_model:
    provider: ollama
    model: llama3.1:8b
    api_base: http://localhost:11434
  persona:
    role: Research Assistant
    goal: Analyze complex topics
  input_fields:
    - name: query
      type: str
      required: true
  output_fields:
    - name: analysis
      type: str
      required: true
  feature_specifications:
    scenarios:
      - name: Basic analysis
        input:
          query: "What is machine learning?"
        expected_output:
          expected_keywords:
            - machine
            - learning
            - algorithm

☁️ 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

📋 When to Use DSPy

Choose DSPy when:

  • You need maximum optimization flexibility
  • You want to optimize multiple variables (10+)
  • You're doing research or complex reasoning
  • You have well-defined, focused tasks
  • You want to use DSPy's native optimizers

Consider Other Frameworks:

OpenAI SDK

If you want the simplest API and fast prototyping

CrewAI

If you need multiple agents working together

DeepAgents

If you need complex planning and LangGraph workflows

🏆 Ready to Build with DSPy?

Start with the most powerful optimization framework in AI