LangChain (Python)
Framework for composing applications with LLMs through chains and agents.
Agent, MCP and tool libraries PyPI MIT
Used in agent projects
141
1.1% of 12,697 public repos built with AI coding agents
Rank in agent, mcp and tool libraries
#4 of 9
by use in those projects
Downloads
37.3M
PyPI, last 7 days, langchain
GitHub stars
148K
last push Oct 10, 2026
How LangChain (Python) is used
LangChain (Python) is a dependency in 141 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (1.1%), #4 of 9 in agent, mcp and tool libraries. The most used alternative there is Model Context Protocol SDK (JavaScript). Projects that use it most often also use python-dotenv (73.8%), Pydantic (57.4%), FastAPI (52.5%).
Often used with LangChain (Python)
| python-dotenv | 73.8% of LangChain (Python) projects · 11.3× more than average |
|---|---|
| Pydantic | 57.4% of LangChain (Python) projects · 11.2× more than average |
| FastAPI | 52.5% of LangChain (Python) projects · 12.4× more than average |
| Uvicorn | 51.8% of LangChain (Python) projects · 12.1× more than average |
| LangGraph | 51.1% of LangChain (Python) projects · 79.1× more than average |
| Requests | 39.7% of LangChain (Python) projects · 7.5× more than average |
| OpenAI Python Library | 39.0% of LangChain (Python) projects · 20.3× more than average |
| Pydantic Settings | 35.5% of LangChain (Python) projects · 17.9× more than average |
By coding agent
| GitHub Copilot | 2.4% of projects set up for it |
|---|---|
| Cursor | 2.0% of projects set up for it |
| Claude Code | 1.3% of projects set up for it |
| Gemini CLI | 2.3% of projects set up for it |
| OpenCode | 1.6% of projects set up for it |
| OpenAI Codex | 1.1% of projects set up for it |
Share of public repos configured for each agent that list LangChain (Python) as a dependency.
Install
| Package | pip install langchain |
|---|---|
| Packages counted | langchain, langchain-openai, langchain-core, langchain-community, langchain-google-genai, langchain-text-splitters, langchain-mcp-adapters, langchain-anthropic |
| Main stacks | Python (136), Next.js (3), .NET (1), Other (1) |
| Example projects | prompt-security/ps-fuzz, MotleyAI/motleycrew, sidetrip-ai/ici-core, ericzakariasson/uber-eats-mcp-server, Azure-Samples/python-mcp-demos |
Alternatives to LangChain (Python)
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Model Context Protocol SDK (JavaScript) npm TypeScript SDK for building MCP servers and clients to extend AI agent capabilities. |
603 (4.7%) | 65.4M | 13.5K | MIT |
| Model Context Protocol SDK (Python) pypi Python SDK for building MCP servers and clients to extend AI agent capabilities. |
484 (3.8%) | 60.6M | 24.5K | MIT |
| FastMCP (Python) pypi Fast, Pythonic framework for building MCP servers and clients for AI tool integration. |
169 (1.3%) | 14.3M | 28K | — |
| LangGraph pypi Framework for building stateful, multi-actor applications with LLMs. |
82 (0.6%) | 12.1M | 43K | — |
| LangChain.js npm Build applications with LLMs using composable abstractions for chains, agents and memory. |
67 (0.5%) | 6.2M | 18.3K | MIT |
| Mastra npm Framework for building AI agents with tools, memory and MCP server support. |
39 (0.3%) | 2M | 28.7K | Apache-2.0 |
| fastMCP (JavaScript) npm TypeScript framework for building Model Context Protocol servers. |
33 (0.3%) | 709K | 3,274 | MIT |
| LangChain (JavaScript) npm TypeScript framework for building applications with LLMs, chains, agents and memory. |
30 (0.2%) | 3.1M | 18.3K | MIT |