Stack Gems
Menu
← Catalog

DSPy

MIT program LMs with signatures and optimizers (Stanford NLP)

AI Agents / Orchestration · OSS/MIT · 38.7k

Reviewed 2026-09-15 · last push 2026-10-18 · repo checked 2026-10-19

What's Good

MIT (stanfordnlp/dspy). Declarative Python modules, compilers/optimizers that tune prompts and weights, community + Stanford NLP lineage. Docs at dspy.ai. Fits classifiers, RAG, and agent loops when you want systematic improvement over hand-tuned templates.

The Catch

Vs LangChain/LangGraph (orchestration graphs) and Promptfoo (YAML eval/red-team): DSPy is program-and-optimize LMs, not an MCP-first runtime and not a hosted eval SaaS. Optimizer runs cost tokens/compute; you still bring models and data. Not a drop-in coding agent.

Verdict

MIT LM programming framework. Optimize modules; do not confuse it with MCP runtime glue.

Embed

Maintainer? Add the badge to your README. It is free, links to this review, and there is no paid version.

Reviewed on Stack Gems

Markdown

[![Reviewed on Stack Gems](https://stackgems.com/badge/dspy.svg)](https://stackgems.com/gems/dspy)

HTML

<a href="https://stackgems.com/gems/dspy"><img src="https://stackgems.com/badge/dspy.svg" alt="DSPy reviewed on Stack Gems" height="20"></a>