# LangChain

> Build agents and LLM apps from interoperable, swappable components

- Category: App Orchestration / App Frameworks
- Language: Python
- Licence: MIT
- Repository: https://github.com/langchain-ai/langchain
- Website: https://www.langchain.com/
- Canonical page: https://ai-tldr.dev/tools/langchain/
- Updated: 2026-09-03

## In short

LangChain is an open-source framework for building agents and applications powered by large language models. It sits in the App Frameworks category of the App Orchestration tools and is open-source, written in Python and licensed MIT. To get started: install LangChain.

## 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.

1. Install LangChain

   Add the package to your Python project. The README uses uv.

```bash
uv add langchain
```

2. Initialize a model and invoke it

   Use init_chat_model to load a model by its provider:name string, then call invoke with your prompt.

```python
from langchain.chat_models import init_chat_model

model = init_chat_model("openai:gpt-5.5")
result = model.invoke("Hello, world!")
```

3. 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.

## 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

## Version history

- 2026-09-03 1.4.0: Adds the langchain.mcp namespace and its MCPAdapter class, which discovers the tools an MCP server exposes and adapts them into LangChain tools for create_agent. Built on FastMCP and shipped in beta.
