
stanfordnlp/dspy
DSPy is a framework for programming language models, with algorithms to optimize prompts and model weights.

About stanfordnlp/dspy
DSPy is an open-source Python framework, released under the MIT license, for programming language models rather than writing prompts for them. Its name stands for Declarative Self-improving Python. Developers write modular Python code to build AI systems and use DSPy's algorithms to optimize the prompts and model weights those systems depend on. The homepage gives examples of systems it can be used for, including simple classifiers, retrieval-augmented generation (RAG) pipelines, and agent loops.
DSPy is installed with pip, and documentation is hosted at dspy.ai. The repository also lists research papers on the underlying methods. The homepage does not describe runtime requirements, supported model providers, or limitations, so these are not covered here.
Key features
- Compose language model programs as modular Python code instead of hand-written prompts
- Algorithms for optimizing prompts and model weights
- Can be used to build classifiers, RAG pipelines, and agent loops
- Installable with pip install dspy
- Can install the latest main branch directly from the GitHub repository
- Released under the MIT license and open source
- Documentation is available at dspy.ai
- Installable through pip
stanfordnlp/dspy at a glance
- Website
- github.com/stanfordnlp/dspy
- Category
- Development › Developer Tools
- Type
- Open-source project
- Pricing
- Not confirmed. Check the site
- Open source
- Yes · Source code
- Language
- English
- Last checked
- Oct 6, 2026 · Online when checked
- Listed
- Oct 5, 2026
Guides for Developer Tools
stanfordnlp/dspy alternatives
Tools and sites you could use instead, ranked by how closely they match.
PyMC provides Bayesian modeling and probabilistic programming tools for Python.
pytesseract is a Python wrapper for Google Tesseract that provides optical character recognition.
GPT-Migrate helps move a codebase from one programming language or framework to another.
Gitingest turns a GitHub repository URL into a text digest suited to language model prompts.
pyclugen implements the multidimensional cluster generation algorithm in Python.
Use scikit-image, a Python software library, to process digital images.
Popular in Developer Tools
Well-known listings from the same topic.
stanfordnlp/dspy FAQ
How do I install DSPy?
Where can I find DSPy documentation?
Tell us and an editor will check it.
Claim the listing and suggest updates yourself. An editor checks every claim first.













