LangChain Documentation
by LangChain
The most-used LLM framework's docs, and they tell you when to use LangGraph instead.
Overview
LangChain's documentation now lives at docs.langchain.com, and the older python.langchain.com URLs 308-redirect there. The framing has moved with it. The current overview opens on a single thesis, that an agent is a model plus a harness, where the harness is the prompt, the tools and the middleware that shape behaviour, and the page is organised around one function, create_agent, described as a minimal, highly configurable agent harness: supply a model, a list of Python functions as tools and a system prompt, then invoke it with messages. Provider support is unified across OpenAI, Anthropic, Google and others, so swapping models is close to a string change. The most useful property of these docs is that they say where LangChain sits in its own ecosystem instead of leaving you to find out: agents are built on top of LangGraph for durable execution and persistence, so you should reach for LangGraph directly when orchestration gets complex; Deep Agents is the batteries-included alternative with automatic context compression and subagent spawning; and LangSmith is an observability platform for tracing, debugging and evaluating agents built with any framework, not only this one. That triage is stated up front. The repository behind it has passed 143,000 GitHub stars, and it is also the most-criticised framework in the space, with the highest-scoring Hacker News post about it being an engineering team's write-up of why they stopped using it.
At a Glance
- Topic
- Frameworks
- Level
- Intermediate
- Format
- Documentation
- Cost
- Free
- Duration
- Reference docs; ~2 hours for the overview and a first agent, days for the full guides
- Provider
- LangChain
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Build a working agent with create_agent from a model, tools and prompt
- ✓Expose plain Python functions as tools an agent can call
- ✓Swap between OpenAI, Anthropic and Google models without rewriting the agent
- ✓Shape agent behaviour with middleware instead of stuffing everything into prompts
- ✓Decide when to drop to LangGraph for durable execution and orchestration
- ✓Trace, debug and evaluate agent runs with LangSmith observability
- ✓Choose between LangChain, Deep Agents and raw LangGraph for a given project
Highlights
- •The docs state when not to use LangChain, pointing to LangGraph for orchestration and Deep Agents for defaults, which most framework docs never do
- •One function, create_agent, replaces the sprawling chain abstractions the framework was criticised for
- •Provider-agnostic model configuration means switching from OpenAI to Anthropic is close to a one-line change
- •143.5k GitHub stars and the largest integration ecosystem of any LLM framework
- •LangSmith tracing works against agents built with any framework, so the observability story is not pure lock-in
Who It’s For
Best For
- ✓Developers building their first LLM agent in Python
- ✓Teams that need several model providers behind one interface
- ✓Engineers who want tracing and evaluation available from day one
- ✓Prototypers who expect to graduate to LangGraph as orchestration grows
Prerequisites
- •Intermediate Python, including decorators and type hints for tool definitions
- •An API key for at least one model provider
- •Basic understanding of what tool calling and system prompts do
FAQ
What is LangChain Documentation?
The official LangChain documentation, rebuilt around a single idea: an agent is a model plus a harness of prompt, tools and middleware. It shows you create_agent first, then is unusually direct about when to reach for LangGraph, Deep Agents or LangSmith instead. Worth reading with the well-known practitioner criticism of the framework's abstractions in view rather than as the only reference you consult.
Is LangChain Documentation free?
LangChain Documentation is free to access.
What level is LangChain Documentation for?
LangChain Documentation is aimed at a intermediate audience. Recommended background: Intermediate Python, including decorators and type hints for tool definitions, An API key for at least one model provider, Basic understanding of what tool calling and system prompts do.
How long does LangChain Documentation take?
Expect roughly Reference docs; ~2 hours for the overview and a first agent, days for the full guides. Most learners work through it at their own pace.
What will I learn from LangChain Documentation?
You'll learn: Build a working agent with create_agent from a model, tools and prompt; Expose plain Python functions as tools an agent can call; Swap between OpenAI, Anthropic and Google models without rewriting the agent; Shape agent behaviour with middleware instead of stuffing everything into prompts; Decide when to drop to LangGraph for durable execution and orchestration; Trace, debug and evaluate agent runs with LangSmith observability; Choose between LangChain, Deep Agents and raw LangGraph for a given project.
Topics
Sources
This page was written from 3 sources, 2 on domains other than docs.langchain.com.