LangChain
★ 140.7k · GitHub →The original LLM application framework, now an agent engineering platform with the largest integration library.
Install
$ pip install langchain What is LangChain?
LangChain started in 2022 as the framework that popularized chaining LLM calls with tools and retrieval. After a major 1.x overhaul it repositioned itself as an "agent engineering platform": a standard interface over chat models, embeddings, vector stores, and tools, plus a curated agent abstraction built on top of LangGraph. The chain-everything sprawl of the 0.x era has been trimmed — most of the surface area now lives in integration packages you opt into.
Its real moat is integrations. Hundreds of model providers, vector databases, retrievers, and toolkits ship behind one interface, so swapping OpenAI for Anthropic or Pinecone for pgvector is a one-line change. The surrounding ecosystem — LangGraph for low-level orchestration, LangSmith for tracing and evals, Deep Agents for planning/subagent patterns — is where the LangChain company actually monetizes; the framework itself is MIT-licensed.
The honest trade-off: abstraction depth. LangChain sits between you and the model API, and when something misbehaves you debug through its layers. Teams that outgrew the 0.x abstractions often rewrote against raw SDKs; the 1.x rewrite addressed much of that criticism, but the framework still rewards developers who learn its idioms rather than fight them.
Key capabilities
- ▸ Unified interface over hundreds of model providers, vector stores, embeddings, and tools
- ▸ Standard agent abstraction (create_agent) built on the LangGraph runtime
- ▸ Deep Agents package for planning, subagents, and file-system-backed long tasks
- ▸ First-class LangSmith integration for tracing, evals, and production debugging
- ▸ Mature Python and JS/TS implementations with an unmatched template and tutorial ecosystem
When to use it
Pick LangChain when integration breadth matters more than minimal abstraction — RAG pipelines mixing several vector stores, apps that must swap model providers, or teams that want the LangSmith observability story out of the box. Skip it if you are building one focused agent against one provider: a thinner SDK (Pydantic AI, OpenAI Agents SDK, Strands) gives you fewer layers to debug. And if you need fine-grained control over agent state machines, go straight to LangGraph underneath it.
Alternatives
Frequently asked questions
Is LangChain still relevant, or has it been replaced by LangGraph?
Both are maintained by the same company with different jobs. LangChain provides integrations and a standard agent abstraction; LangGraph is the low-level orchestration runtime underneath. Since the 1.x releases, LangChain agents actually run on LangGraph, so it is layered rather than replaced — you drop down to LangGraph when you need custom control flow.
Is LangChain free for commercial use?
Yes. The LangChain framework is MIT-licensed open source with no usage restrictions. The company monetizes through LangSmith (observability, evals) and LangSmith Deployment, both optional paid products. You can run LangChain in production with any OpenTelemetry-compatible tracing backend instead of LangSmith.
Why do some developers avoid LangChain?
The 0.x era earned a reputation for over-abstraction: deep call stacks, breaking changes, and wrappers that obscured the underlying API. The 1.x rewrite slimmed the core and stabilized interfaces, but the fundamental trade remains — you accept an abstraction layer in exchange for portability and integrations. Teams wanting maximum transparency often prefer thinner SDKs.
Star count updated 2026-07-02 · refreshed weekly from the GitHub API · browse all tools →