DSPy

Framework for programming, not prompting, LLMs.

Verified live · 7/11/2026

Disclosure: some links below are affiliate links. If you sign up through them we may earn a commission — at no extra cost to you. It never affects our rankings.

Visit DSPy

What is DSPy?

An open-source framework from Stanford NLP for programming LLM pipelines with modules and optimizers instead of manual prompts. Automatically compiles and tunes prompts for tasks.

Pros

  • Automatic prompt optimization
  • Declarative modules
  • Research-backed

Cons

  • Different mental model
  • Steeper onboarding

Pricing

From Free · Open source

Top DSPy alternatives

  • AgnoFast, lightweight framework for multimodal agents.
  • CrewAIFramework for orchestrating role-playing agent crews.
  • GriptapePython framework for agents, pipelines, and workflows.
  • HaystackOpen-source framework for LLM search and agents.
  • LangChainPopular framework for building LLM apps and agents.
  • LangGraphGraph-based library for stateful, multi-actor agents.

See the full DSPy alternatives guide →

Compare DSPy

The Magpie’s Haul

Five hand-picked AI tools + one deal, every week. Free.

No spam. Unsubscribe anytime.