DSPy

Declarative, programmable prompt programming from Stanford.

Visit site GitHub
Open source Self-hostable free
Agent frameworkLibrary
LicenseMIT
Starting priceBYOK usage cost
Model supportbyok
Languagespython
GitHub stars35.5k
Last activity2026-06-25
VerifiedFri Jun 26 2026 00:00:00 GMT+0000 (Coordinated Universal Time)
Verified byseed

A framework that treats prompts as programs to be compiled and optimized, letting you declaratively define modules and let DSPy tune the prompting.

Strengths

  • Compiles and optimizes prompts instead of hand-writing them
  • Strong for repeatable, measurable prompt engineering

Tradeoffs

  • Different mental model from typical agent frameworks
  • Smaller ecosystem of tool integrations