DSPy vs LangGraph
Program — don't prompt — your language models. Compile declarative pipelines into optimized prompts. — versus — Build stateful, multi-actor LLM apps as graphs — durable execution, human-in-the-loop, streaming.
A different bet: optimize prompts as code rather than orchestrate them.
| DSPy | LangGraph | |
|---|---|---|
| Stars | 36k | 37k |
| Forks | 3.1k | 6.3k |
| Language | Python | Python |
| License | MIT | MIT |
| Last activity | 2 days ago | 2 days ago |
| Topics | orchestration, rag | agents, orchestration |
| Curated connections | 1 | 16 |
DSPy — the curator's take
Program — don't prompt — your language models. Compile declarative pipelines into optimized prompts.
LangGraph — the curator's take
You reach for LangGraph the moment a simple agent loop stops being enough — when you need state that survives a crash, a human approving a step mid-run, or a flow that can loop back on itself. Most teams arrive here from plain LangChain and don't leave. If all you want is a quick tool-calling agent, this is more machinery than you need — start lighter and come back when you hit the wall.