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 | 38k | 41k |
| Forks | 3.3k | 6.9k |
| Language | Python | Python |
| License | MIT | MIT |
| Last activity | 3 days ago | yesterday |
| Topics | orchestration, rag | agents, orchestration |
| Curated connections | 2 | 24 |
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.