Overview
LangChain is an open-source framework for building agents and applications powered by large language models. It gives you a standard interface over models, embeddings, vector stores, retrievers, and tools, so you can wire these pieces together into chains and agents instead of writing provider-specific glue code for each one.
It is aimed at developers who want to connect an LLM to their own data and external systems without locking into a single model vendor. Because the abstractions are consistent across providers, you can swap one model for another as your needs change, and you can work at a high level for a quick start or drop down to lower-level components for fine-grained control.
As an app framework in the LLM orchestration space, LangChain sits at the center of a wider ecosystem: LangGraph for controllable agent workflows, Deep Agents for higher-level agent patterns, LangSmith for evaluation and debugging, and LangChain.js for JavaScript and TypeScript projects.
What it does
- Standard interface across chat models, embeddings, vector stores, and retrievers, so you can swap providers without rewriting your app
- A large library of third-party integrations for model providers, tools, vector stores, and retrievers
- Real-time data augmentation: connect LLMs to internal and external data sources
- Modular, component-based design for rapid prototyping and iteration
- Flexible abstraction layers, from high-level chains to low-level components
- Pairs with LangGraph for agent orchestration and LangSmith for evals, observability, and debugging
Getting started
Install the package, then initialize a chat model and call it. The README's example targets a hosted model, so you will need that provider's API key set in your environment.
Install LangChain
Add the package to your Python project. The README uses uv.
uv add langchainInitialize a model and invoke it
Use init_chat_model to load a model by its provider:name string, then call invoke with your prompt.
from langchain.chat_models import init_chat_model
model = init_chat_model("openai:gpt-5.5")
result = model.invoke("Hello, world!")Go further with agents
For agent orchestration and controllable workflows, look at LangGraph; for developing, debugging, and deploying agents, see LangSmith. A JS/TS equivalent is available as LangChain.js.
Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Build a retrieval-augmented chatbot that answers from your own documents using LangChain's retrievers and vector store integrations
- Prototype and compare different model providers behind a single interface to find the best fit for a task
- Connect an LLM to external tools and data sources to build an agent that takes actions
- Stand up a production LLM app with evaluation and observability via the LangSmith integration
LangChain in the news
- 2026-09-03MAJORLangChain 1.4.0 — a built-in MCP adapter for agent tools
- 2026-05-05MAJORCopilotKit Raises $27M for AG-UI — Agent-to-UI Protocol Now Backed by Google, Microsoft, Amazon, Oracle
- 2026-04-21NOTABLEBuild Interactive Agents With Generative UI — Free DeepLearning.AI Short Course by CopilotKit
- 2026-04-15MAJORAnthropic MCP Design Flaw Enables RCE Across 150M+ Downloads
- 2026-03-10NOTABLEDeerFlow 2.0 — open-source SuperAgent harness
From the AI/TLDR release feed — every item is source-verified when it ships.
How LangChain compares
LangChain alongside other open-source app frameworks tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| LangChain | ★ 147k | Build agents and LLM apps from interoperable, swappable components |
| LlamaIndex | ★ 52.2k | A data framework for connecting language models to your own documents and data sources, with built-in agent and retrieval (RAG) tooling. |
| Haystack | ★ 26.5k | An orchestration framework from deepset for building modular LLM pipelines and agents for search, RAG, and question answering. |
| Jina | ★ 21.9k | Jina-serve is a Python framework for building, scaling, and deploying AI services and multi-step pipelines that communicate over gRPC, HTTP, and WebSockets. |
| LLM | ★ 12.5k | Simon Willison's plugin-extensible CLI and Python library for prompting remote and local models, logging every prompt and response to SQLite, and generating embeddings. |
| Prompt Flow | ★ 11.2k | Microsoft's toolkit for building LLM apps as executable flows that link prompts, Python code, and tools, with tracing, batch evaluation, and deployment. |
| Rig | ★ 8.7k | A Rust library for building LLM-powered applications, giving one unified interface over 20+ model providers and 10+ vector stores plus an agent runtime with streaming, tools, and OpenTelemetry GenAI tracing. |
| OGX | ★ 8.4k | The project formerly called Llama Stack: a self-hosted agentic API server that speaks the OpenAI, Anthropic and Google GenAI APIs over pluggable model providers. |
