LangChain
Framework for composing applications with LLMs through chains and agents.
3. Used by agents' projects
Dependency in 127 public GitHub projects set up for AI coding agents that we scanned (2.0%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
docs.langchain.com/llms.txtFrom the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What LangChain does
LangChain now centers on one function, <code>create_agent</code>, which the docs call a minimal harness: you pick a model, pass plain Python functions as tools, and add behavior through middleware, with LangGraph as the runtime underneath.
LangChain popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How LangChain is used
- LangChain is a dependency in 127 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (7.8% of the 1,623 Python ones), #4 of 192 in agent, mcp and tool libraries.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 2,194; those are left out of every share on this page.
- The most used alternative in our scan is LangGraph (78 projects).
- Projects that use it most often also use python-dotenv (70.9%), Pydantic (56.7%), FastAPI (53.5%).
By coding agent
Often used with
LangChain in practice
Strengths
The docs describe <code>create_agent</code> as a starting point that you extend piece by piece. Guardrails, retries, routing and tool policies are added as middleware when your use case needs them.
The docs promise one interface for chat models and embeddings across providers. In the docs examples, moving from <code>openai:gpt-5.5</code> to <code>ollama:devstral-2</code> changes only the model argument and the install comment.
Agents from <code>create_agent</code> are built on LangGraph. The docs say this lets LangChain take advantage of LangGraph's durable execution, human-in-the-loop support and persistence.
In the Chat LangChain post, the team re-runs ingestion through the Indexing API. The post says its record manager tracks writes to the vector store and handles deduplication and cleanup, so documents do not have to be re-indexed from scratch.
Watch out for
In a 2023 post, the maintainers wrote that packing an entire ecosystem into one package leaves users with many features to learn. The post predates the current docs, which center on <code>create_agent</code>.
The README sends advanced customization and agent orchestration to LangGraph, and it sends newcomers to Deep Agents. Expect to work out which of the three layers your project needs.
Each provider example in the docs installs something beyond <code>langchain</code>. Some use an extra such as <code>"langchain[openai]"</code>. Others use a separate package such as <code>langchain-ollama</code> or <code>langchain-fireworks</code>.
Quickstart: call a chat model
from langchain.chat_models import init_chat_model
model = init_chat_model("openai:gpt-5.5")
result = model.invoke("Hello, world!")More about LangChain
Agent Skills for it
- : 5 Agent Skills: langchain-agent-experiments, langchain-agent-monitoring, langchain-agent-tracing, langchain-build-agent, langchain-eval-engi
- langchain-architecture: Design LLM applications using LangChain 1.x and LangGraph for agents, memory, and tool integration. Use when building LangChain applications
- langchain: Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+
- langchain-architecture: Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applic
- langchain-chains: LangChain chain composition including SequentialChain, RouterChain, and LCEL patterns
Head to head
- LangChain vs LangGraph used together in 68 projects
Packages around it
- langchain-openai: OpenAI models
- langchain-core: core abstractions
- langchain-community: community integrations
- langchain-google-genai: Google Gemini models
- langchain-text-splitters: document chunking
- langchain-mcp-adapters: MCP tool adapters
Alternatives
LangChain This page
Framework for building stateful, multi-actor applications with LLMs.
AI agent framework built with Pydantic for structured, typed agent development.
Framework to build RAG applications connecting LLMs to your custom data and documents.
Microsoft SDK for integrating LLMs with traditional code for AI applications.
Get started
Install it.
pip install langchainRules for your agent
## LangChain
- Build agents with `create_agent` from `langchain.agents`, passing `model`, `tools` and `system_prompt`.
- Pass the model as a `"provider:model"` string where the docs do, e.g. `"openai:gpt-5.5"` or `"ollama:devstral-2"`. When a provider needs extra settings, as Azure needs `azure_deployment`, build the model with `init_chat_model` and pass the object as `model`.
- Install the provider extra or package shown in the docs alongside `langchain` (`"langchain[openai]"`, `"langchain[anthropic]"`, `langchain-ollama`, `langchain-aws`).
- Write tools as typed Python functions with a docstring, and pass them in `tools=[...]`.
- Invoke with `{"messages": [...]}` and read the reply from `result["messages"][-1].content_blocks`.
- Add guardrails, retries, routing or tool policies through middleware. For workflows that combine deterministic and agentic steps, use LangGraph.
- Fetch `https://docs.langchain.com/llms.txt` to discover available docs pages before exploring further.