LangChain
by LangChain, Inc. · Framework · also known as langchain (PyPI), LangChain.js
Open-source Python and JavaScript framework whose create_agent harness builds tool-using agents on the LangGraph runtime with swappable model providers and middleware
Overview
LangChain is an MIT-licensed framework from LangChain, Inc. for building LLM applications in Python and JavaScript. After its 1.0 redesign the library centers on create_agent, a configurable agent harness: you pass a model identifier such as a provider-prefixed string, a list of plain functions as tools and a system prompt, then add middleware for guardrails, retries, routing or custom tool policies. A standard model interface covers OpenAI, Anthropic, Google, Bedrock, Azure, Ollama, Hugging Face and many other providers, so switching vendors is mostly a string change, and a large integrations catalog supplies document loaders, vector stores and retrievers for retrieval-augmented generation.
Agents created with LangChain run on LangGraph, which supplies durable execution, persistence and human-in-the-loop controls, and they trace to LangSmith when an environment variable is set. Deep Agents, a batteries-included harness with context compression, a virtual filesystem and subagents, is built on the same primitives. The framework's strengths are breadth of integrations and a common vocabulary across providers; its recurring criticisms are abstraction overhead and API churn across major versions, so teams with simple needs sometimes call provider SDKs directly, and teams with complex control flow drop down to LangGraph.
Capabilities
- `create_agent` harness with tools, prompts and middleware
- Standard chat-model interface across many providers
- Document loaders, text splitters, vector-store and retriever integrations
- Middleware for guardrails, retries and routing
- Runs on the LangGraph runtime for persistence and human-in-the-loop
- Python and JavaScript packages with LangSmith tracing
Typical workflows
- Build a tool-calling agent and swap the model provider via a string
- Assemble a RAG pipeline from loaders, splitters and a vector store
- Trace agent runs in LangSmith during development
Strengths
- Largest integration catalog among agent frameworks
- Provider-agnostic model interface
- MIT license and active community
Limitations
- Abstraction layers can obscure provider-specific behavior
- Frequent API changes between major versions
- Complex control flow is better expressed directly in LangGraph
Prerequisites
- Python 3.10+ or Node.js
- API key for at least one model provider or a local runtime such as Ollama
Who it is for
- Application developers building LLM features and agents
- Teams standardizing on one interface across providers
Alternatives & comparison
- CrewAI
Open-source Python framework for role-based multi-agent crews and event-driven flows, with a commercial enterprise console for deploying, monitoring and triggering automations
MixedOpen source - DSPy
Python framework for programming language-model pipelines with typed signatures and modules, then optimizing prompts and weights automatically against a metric
Open sourceOpen source - Instructor
Python library for extracting validated structured data from LLM responses using Pydantic models, with automatic retries, streaming partials and support for many providers
Open sourceOpen source - LangGraph
Low-level orchestration framework and runtime for stateful, long-running agents expressed as graphs, with durable execution, checkpointing, human-in-the-loop and streaming
Open sourceOpen source - LiteLLM
Open-source Python SDK and self-hosted AI gateway that calls 100+ LLM providers in the OpenAI format, with routing, fallbacks, virtual keys, budgets, spend tracking and logging callbacks
MixedOpen source - LlamaIndex
Open-source Python framework for retrieval-augmented agents over your data, with connectors, indexes, query engines and event-driven workflows, alongside the commercial LlamaParse document platform
Open sourceOpen source - Model Context Protocol
Open JSON-RPC standard for connecting AI applications to tools, data and prompts through servers, now stewarded under the Linux Foundation with SDKs in many languages
Open sourceOpen source - OpenAI Agents SDK
Lightweight open-source Python and TypeScript framework for agents, handoffs, guardrails, sessions and tracing, defaulting to OpenAI's Responses API with adapters for other providers
Open sourceOpen source - Pydantic AI
Type-safe Python agent framework from the Pydantic team with validated structured outputs, dependency injection, swappable model providers, MCP, durable execution and evals
Open sourceOpen source
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- Licensehttps://github.com/langchain-ai/langchain/blob/master/LICENSEchecked Nov 1, 2026
Supports: license_spdx, source_model
- Official documentationLangChain overview (Python)checked Nov 1, 2026
https://docs.langchain.com/oss/python/langchain/overview
Supports: capabilities, integrations
- Official sitechecked Nov 1, 2026
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in Agent frameworks & orchestration
Apify
Apify Technologies s.r.o. · Data collection & crawling
Cloud platform and marketplace for running web-scraping and automation programs (Actors), with storages, proxies, scheduling, an API and an MCP server for agents
Claude Code
Anthropic · Coding agents & AI IDEs
Anthropic's agentic coding tool that reads a codebase, edits files and runs commands from the terminal, IDEs, a desktop app, the web and CI, with MCP, hooks, skills and subagents
Claude Platform
Anthropic · Model providers & APIs
Anthropic's developer platform for the Claude models: Messages API, tool use, structured outputs, prompt caching, batch processing and Managed Agents, plus cloud availability
OpenAI API
OpenAI · Model providers & APIs
OpenAI's hosted developer platform: Responses and Chat Completions APIs, Realtime voice, embeddings, images, audio, fine-tuning, evals and managed agents
Model Context Protocol
Model Context Protocol, a Series of LF Projects, LLC (originated by Anthropic) · Agent frameworks & orchestration
Open JSON-RPC standard for connecting AI applications to tools, data and prompts through servers, now stewarded under the Linux Foundation with SDKs in many languages
Instructor
Jason Liu and contributors (567 Labs) · Agent frameworks & orchestration
Python library for extracting validated structured data from LLM responses using Pydantic models, with automatic retries, streaming partials and support for many providers