Framework comparison - verified
DSPy vs LangChain (agents)
DSPy (Stanford NLP) and LangChain (agents) (LangChain Inc), compared field by field from their official docs as of October 18, 2026. Their docs differ on 7 points, listed below; the table also shows versions, install commands and links.
Key differences
- Languages: LangChain (agents) lists TypeScript and DSPy does not.
- Multi-agent: DSPy does not state it in its docs; LangChain (agents) documents it.
- Durable execution: DSPy does not state it in its docs; LangChain (agents) documents it.
- Human in the loop: DSPy does not state it in its docs; LangChain (agents) documents it.
- Tracing: DSPy does not state it in its docs; LangChain (agents) documents it.
- Memory: DSPy does not state it in its docs; LangChain (agents) documents it.
- Evals: DSPy documents it; LangChain (agents) does not state it in its docs.
Generated from the fields below that differ. Versions, dates and links are left to the table.
Side by side
Every field we track, with the source linked on each value. Rows marked Differs are where the two frameworks' docs differ.
| Field | DSPy | LangChain (agents) |
|---|---|---|
| MaintainerDiffers | Stanford NLP | LangChain Inc |
| LanguagesDiffers | Python | Python, TypeScript |
| License | MIT | MIT |
| Latest versionsDiffers | Python: dspy 3.4.1 (2026-10-12) | Python: langchain 1.4.6 (2026-10-14); TypeScript: langchain 1.5.18 (2026-10-16) |
| MCP | Yes | Yes |
| Multi-agentDiffers | Not stated | Yes |
| Durable executionDiffers | Not stated | Yes |
| Human in the loopDiffers | Not stated | Yes |
| Streaming | Yes | Yes |
| Structured output | Yes | Yes |
| TracingDiffers | Not stated | Yes |
| MemoryDiffers | Not stated | Yes |
| EvalsDiffers | Yes | Not stated |
| Model-agnostic | Yes | Yes |
| Install commands listedDiffers | 2 (Python) | 3 (Python and TypeScript) |
| Quickstart snippet | Python snippet published | Python snippet published |
| What it is, per its docsDiffers | DSPy is a Python framework for building AI systems by declaring tasks as typed signatures composed into modules, with optimizers that tune prompts and weights against a metric. | LangChain is a framework for building agents and LLM-powered applications whose create_agent function provides a configurable agent harness of model, tools, prompt, and middleware, built on top of LangGraph. |
| HomepageDiffers | dspy.ai | docs.langchain.com/oss/python/langchain/overview |
| Source repositoryDiffers | github.com/stanfordnlp/dspy | github.com/langchain-ai/langchain |
Install both
Copied verbatim from the page linked under each command.
LangChain (agents)
Python
pip install -U langchainuv add langchainTypeScript
npm install langchain @langchain/coreFAQ
What is the difference between DSPy and LangChain (agents)?
Going by their official docs: Languages: LangChain (agents) lists TypeScript and DSPy does not. Multi-agent: DSPy does not state it in its docs; LangChain (agents) documents it. Durable execution: DSPy does not state it in its docs; LangChain (agents) documents it. Human in the loop: DSPy does not state it in its docs; LangChain (agents) documents it. The table lists 3 more.
Do DSPy and LangChain (agents) both support MCP?
DSPy: yes. LangChain (agents): yes. "Not stated" means the docs do not say.
Which languages do DSPy and LangChain (agents) support?
DSPy: Python. LangChain (agents): Python, TypeScript. Both list Python.
What licenses do DSPy and LangChain (agents) use?
DSPy: MIT. LangChain (agents): MIT.
Do DSPy and LangChain (agents) support durable execution and human in the loop?
Durable execution: DSPy not stated, LangChain (agents) yes. Human in the loop: DSPy not stated, LangChain (agents) yes. "Not stated" means the docs do not say.
What are the latest versions of DSPy and LangChain (agents)?
As of October 18, 2026: DSPy Python package dspy 3.4.1 (October 12, 2026); LangChain (agents) Python package langchain 1.4.6 (October 14, 2026) and TypeScript package langchain 1.5.18 (October 16, 2026).
More comparisons
Newsletter
Agent frameworks, every week
One email per week. Framework releases, new agent tooling and what they mean for what you build.