Today, Superagentic AI is proud to announce the DSPy Code, the comprehensive CLI to build and optimize your DSPy and GEPA code. DSPy Code is now live: an AI-powered CLI that brings DSPy-native intelligence, real GEPA optimization, and end-to-end automation into one interactive environment. You can explore the landing page for the full overview, star the GitHub repository, and dive into the documentation to start building.
Why DSPy Code?
Building DSPy applications has historically required a deep understanding of predictors, optimizers, adapters, and project structure. Developers often spend hours configuring optimization workflows, verifying compatibility with their local DSPy installation, and translating guidance from generic AI assistants into working code. DSPy Code solves this by embedding DSPy expertise directly into the CLI, automating tedious tasks, and guiding you from idea to production-ready code without leaving the terminal.
What DSPy Code Delivers
DSPy Code covers the entire lifecycle:
- Develop : Describe your goal in plain English, and the CLI generates signatures, modules, and complete programs tailored to your installed DSPy version.
- Validate : Run DSPy-aware validation that checks signatures, predictor usage, adapters, and overall best practices before you ship.
- Optimize : Execute real Genetic Pareto (GEPA) optimization with automated metric functions, prompt evolution, and progress tracking.
- Deploy : Export production-ready code with documented improvements, quality scores, and packages ready for handoff.
Key Capabilities
- DSPy-native intelligence : Built-in knowledge of every DSPy predictor, optimizer, adapter, and evaluation metric. Ask “What’s the difference between ChainOfThought and ReAct?” and get version-aware guidance with runnable code.
- Version-aware generation : DSPy Code indexes your installed DSPy package so everything it generates matches your APIs, and it warns when you need to upgrade.
- Real GEPA execution : Optimization workflows run end-to-end inside the CLI, driving improvements like 75% to 92% accuracy jumps automatically.
- Codebase RAG : The CLI indexes your project during
/init, enabling you to ask questions about your own code and generate modules that match your conventions. - Built-in MCP client : Connect to MCP servers to integrate external tools, APIs, databases, and services directly into your DSPy programs.
- Natural language learning : Ask “Show me a ReAct example” or “Explain GEPA” and get explanations grounded in your DSPy version. Learn by building.
- Complete automation : Slash commands handle initialization, data generation, optimization, evaluation, export, session management, and code history.
How Developers Use DSPy Code
Please visit landing page to explore more features of DSPy Code and Get Started.
- Starting new projects: Generate a complete DSPy project structure in minutes, with configuration files, templates, and best practices built in.
- Optimizing existing programs : Run
/datato create training examples, then/optimizeto execute GEPA and document performance gains. - Extending existing repos : Execute
/initin your current project; DSPy Code scans your codebase and generates modules that fit right in. - Learning DSPy : Ask natural language questions and receive answers using the DSPy version you actually have installed—no more doc diving.
- Connecting MCP servers : Use the built-in MCP client to call external tools and data sources for richer agentic workflows.
- Shipping production code : Validate every generated component, monitor quality scores, and export optimized packages with confidence.
Quick Start
pip install --upgrade dspy-code
dspy-code
/init
/connect ollama llama3.1:8b
Create a sentiment analyzer that takes text and outputs positive or negative
/validate
/optimize my_program.py training_data.jsonl
/run
This single session takes you from zero to validated, optimized DSPy code without leaving the CLI.
Watch DSPy Code in Action
Availability
- Landing page: https://super-agentic.ai/dspy-code
- GitHub: https://github.com/SuperagenticAI/dspy-code
- Documentation: https://superagenticai.github.io/dspy-code/
- PyPI: https://pypi.org/project/dspy-code/
Roadmap and Status
DSPy Code is currently in beta and under active development. Upcoming work includes additional templates, deeper optimization analytics, enhanced MCP integrations, and enterprise-focused features. Feedback from the community drives the roadmap, so issues, discussions, and contributions are encouraged.
Get Started with DSPy Code
- Install the CLI with
pip install --upgrade dspy-codeand rundspy-codeto get started. - Star the GitHub repository to follow progress.
- Read the full documentation for tutorials, command references, and guides.
- Share feedback via issues or discussions to help shape the next releases.
DSPy Code is built by Superagentic AI, a full-stack agentic AI company focused on production-grade intelligent developer tooling. We’re excited to see what you build with power of DSPy and GEPA.
