stanfordnlp/dspy

github.com/stanfordnlp/dspy Developer Tools Open-source projectOpen source

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

github.com/stanfordnlp/dspy
stanfordnlp/dspy homepage screenshot

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
Best for: Python developers who build language model applications and want to program their behavior and optimize it systematically rather than tune prompts by hand.
Good for
  • Released under the MIT license and open source
  • Documentation is available at dspy.ai
  • Installable through pip

stanfordnlp/dspy at a glance

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

stanfordnlp/dspy alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Developer Tools

Well-known listings from the same topic.

All 423

stanfordnlp/dspy FAQ

How do I install DSPy?
Run pip install dspy. To install the latest version from the main branch, the repository page gives a pip install command that points to the GitHub repository.
Where can I find DSPy documentation?
The official documentation is at dspy.ai.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing