Skip to main content
Watch: I Built an AI App Without Leaving Databricks

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.

DSPy and LangChain (agents) compared field by field; rows marked Differs are where their docs differ
FieldDSPyLangChain (agents)
MaintainerDiffersStanford NLPLangChain Inc
LanguagesDiffersPythonPython, TypeScript
LicenseMITMIT
Latest versionsDiffersPython: dspy 3.4.1 (2026-10-12)Python: langchain 1.4.6 (2026-10-14); TypeScript: langchain 1.5.18 (2026-10-16)
MCPYesYes
Multi-agentDiffersNot statedYes
Durable executionDiffersNot statedYes
Human in the loopDiffersNot statedYes
StreamingYesYes
Structured outputYesYes
TracingDiffersNot statedYes
MemoryDiffersNot statedYes
EvalsDiffersYesNot stated
Model-agnosticYesYes
Install commands listedDiffers2 (Python)3 (Python and TypeScript)
Quickstart snippetPython snippet publishedPython snippet published
What it is, per its docsDiffersDSPy 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.
HomepageDiffersdspy.aidocs.langchain.com/oss/python/langchain/overview
Source repositoryDiffersgithub.com/stanfordnlp/dspygithub.com/langchain-ai/langchain

Install both

Copied verbatim from the page linked under each command.

DSPy

Python

Terminal
pip install dspy

Source: github.com/stanfordnlp/dspy/blob/main/README.md

Terminal
pip install -U dspy

Source: dspy.ai

LangChain (agents)

Python

Terminal
pip install -U langchain

Source: docs.langchain.com/oss/python/langchain/install

Terminal
uv add langchain

Source: docs.langchain.com/oss/python/langchain/install

TypeScript

Terminal
npm install langchain @langchain/core

Source: docs.langchain.com/oss/javascript/langchain/install

FAQ

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.