Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

LangChain

Framework for composing applications with LLMs through chains and agents.

Agent, MCP and tool librariesPYPI

GitHubWebsiteIts AgentGid profile

1. License

License from PyPI classifier.

github.com/langchain-ai/langchain

From 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

89 / 100
Gid Score, #13 overall
37.6M
downloads a week, pypi
150K
GitHub stars
127
agent projects use it
LangChain: downloads per weekPyPI, langchain 37,486,084
LangChain: GitHub starslangchain-ai/langchain 149,961

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

74 projects, 2.4%
52 projects, 2.1%
43 projects, 1.3%
11 projects, 2.3%
6 projects, 1.3%
5 projects, 1.5%

Often used with

In 70.9% of its projects
In 56.7% of its projects
In 53.5% of its projects
In 53.5% of its projects
In 52.8% of its projects
In 38.6% of its projects
In 37.8% of its projects
In 35.4% of its projects

LangChain in practice

Strengths

Middleware instead of a monolith

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.

Models swap by string

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.

LangGraph runtime underneath

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.

Re-indexing without duplicates

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

A lot of surface to learn (2023 view)

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

Three layers to choose between

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.

Every provider example adds an install

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

See all

Head to head
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
More in Agent, MCP and tool libraries

Alternatives

LangChain This page

MITGid 8937.6M/wk

LangGraph

Framework for building stateful, multi-actor applications with LLMs.

MITGid 8015.2M/wk

Pydantic AI

AI agent framework built with Pydantic for structured, typed agent development.

MITGid 641.8M/wk

LlamaIndex

Framework to build RAG applications connecting LLMs to your custom data and documents.

MITGid 59406K/wk

Semantic Kernel

Microsoft SDK for integrating LLMs with traditional code for AI applications.

MITGid 5585.6K/wk

Compare LangChain with another tool

Get started

Install it.

pip install langchain

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## 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.