Comparison
DSPy vs LangChain
A like-for-like, spec-level comparison. Both entries are verified against their docs and repo.
DSPy
Declarative, programmable prompt programming from Stanford.
LangChain
The broad framework for LLM applications and agents.
| Spec | DSPy | LangChain |
|---|---|---|
| Role | Agent framework | Agent framework |
| Tags | agent-framework, library | agent-framework, library, orchestration |
| License | MIT | MIT |
| Open source | Yes | Yes |
| Self-hostable | Yes | Yes |
| MCP support | No | Yes |
| Pricing | free | free |
| Starting price | BYOK usage cost | BYOK usage cost |
| Models | byok | byok |
| Languages | python | python, typescript |
| GitHub stars | 35.5k | 140.3k |
| Last activity | 2026-06-25 | 2026-06-26 |