dspy-ai
DSPy
Decision gist · record as of 2026-08-14
Yes. DSPy is actively maintained, permissively licensed, has low install friction, and addresses a real pain point in language model application development. The framework has strong community adoption (37189 GitHub stars, top 5000 PyPI packages) and zero known vulnerabilities. Install it if you're building anything beyond simple single-prompt use cases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later
- Installation is straightforward with low friction.
- The package is actively maintained with a recent release and substantial community engagement (37189 GitHub stars), indicating solid ongoing development.
License · maintenance · safety
MIT License (permissive) — MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-08-03 (11 days) · last repo commit 2026-08-14 · 37,189 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 909,681 downloads/mo, #4,748 on PyPI
Alternatives
Verify before relying
pip install dspy-ai
import dspy
# Define a simple task using DSPy
class SimpleClassifier(dspy.ChainOfThought):
pass- Whether the framework requires external LLM API keys or supports local models exclusively
- Performance characteristics and scalability limits for production deployments
- Specific version compatibility with popular LLM providers and APIs
What it is and what it does
DSPy is a framework that shifts language model development from manual prompt engineering to compositional Python programming. Instead of writing and tweaking prompts by hand, you define your AI system's logic in Python code, then use DSPy's optimization algorithms to automatically improve the prompts and weights that drive your language model's outputs. This approach scales from simple classifiers to complex retrieval-augmented generation pipelines and agent loops.
The framework treats language model calls as compilable, optimizable components rather than black-box function calls. You compose these components into larger systems using standard Python patterns, and DSPy provides tools to teach your language models to deliver high-quality outputs for your specific tasks. The result is more maintainable and iteratively improvable AI applications compared to hand-crafted prompt management.
Use it for
- Build modular RAG systems where retrieval and generation steps are optimized together
- Create multi-step agent workflows where each language model call's behavior is automatically refined
- Develop classifiers with automatically optimized prompts tailored to your data
- Iterate rapidly on language model applications by recompiling instead of manual prompt rewrites
- Compose reusable language model components into larger systems with clear interfaces
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
DSPy is actively maintained, permissively licensed, has low install friction, and addresses a real pain point in language model application development. The framework has strong community adoption (37189 GitHub stars, top 5000 PyPI packages) and zero known vulnerabilities. Install it if you're building anything beyond simple single-prompt use cases.
Install
dspy-ai on PyPI
Before you install
Installation is straightforward with low friction. The package is actively maintained with a recent release and substantial community engagement (37189 GitHub stars), indicating solid ongoing development.
Requires Python 3.9 or later
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install dspy-ai
import dspy
# Define a simple task using DSPy
class SimpleClassifier(dspy.ChainOfThought):
pass
Verify before relying
- Whether the framework requires external LLM API keys or supports local models exclusively
- Performance characteristics and scalability limits for production deployments
- Specific version compatibility with popular LLM providers and APIs
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagedspy |
| Maintenance | Actively maintained 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 909,681 / month, #4,748 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: dspy_ai-3.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “language model programming framework”
- dspy-aiDSPy is a framework for building and optimizing modular AI systems…
- dspyDSPy is a framework for building and optimizing modular language…
- ell-aiell-ai is a functional prompt engineering framework that lets you…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also dspy · ell-ai · ray · gepa · databricks-bundles · adam-atan2-pytorch · google-tunix · autogluon · autogluon.tabular · autogluon.timeseries