See also: Prompt engineering and Retrieval-augmented generation
LangChain is an open-source framework designed for building applications powered by large language models (LLMs). Available as both a Python and TypeScript package, the framework provides developers with modular components, pre-built chains, and agent architectures that simplify the process of connecting language models to external data sources, APIs, and tools. LangChain enables data-aware and agentic applications that can reason over private data, call external services, and interact dynamically with their environment [1].
Since its initial release in October 2022, LangChain has grown from a single Python library into a comprehensive platform for agent engineering. The project has accumulated over 130,000 GitHub stars across its ecosystem and is widely regarded as one of the most influential open-source projects in the artificial intelligence space [2]. As of early 2026, the Python package alone averages more than 28 million downloads per month from PyPI, with cumulative downloads surpassing 130 million across both Python and JavaScript [2].
LangChain was created by Harrison Chase and Ankush Gola. Chase studied statistics and computer science at Harvard University, graduating in 2017. After college, he joined Kensho Technologies, a fintech startup later acquired by S&P Global, where he led the entity linking team. He then served as Head of Machine Learning at Robust Intelligence, a startup focused on AI safety and model validation. These experiences exposed him to the inefficiencies in AI development pipelines and directly inspired the creation of LangChain [3][16].
Ankush Gola holds a B.S.E. in Electrical Engineering from Princeton University. Before co-founding LangChain, he worked as a software engineer at Facebook (now Meta) on mobile and data infrastructure, and later as a Technology Lead Software Engineer at Robust Intelligence, where he and Chase first worked together [17].
Chase initially developed the LangChain project in October 2022 while still at Robust Intelligence. The framework was released as an open-source project and quickly gained traction among developers building LLM-powered applications. By early 2023, Chase and Gola incorporated LangChain, Inc., headquartered in San Francisco, California [3].
LangChain's rapid adoption attracted significant venture capital interest. The company raised a seed round of $10 million from Benchmark in April 2023, followed just one week later by a $25 million Series A led by Sequoia Capital, which valued the company at approximately $200 million [3][4].
In October 2025, LangChain announced a $125 million Series B funding round led by IVP, with participation from new investors CapitalG and Sapphire Ventures, as well as existing backers Sequoia, Benchmark, and Amplify. Strategic investors included ServiceNow Ventures, Workday Ventures, Cisco Investments, Datadog, and Databricks. The round valued LangChain at $1.25 billion, granting it unicorn status. At the time of the announcement, the company had reached approximately $16 million in annual recurring revenue and served over 1,000 customers [4][5].
| Event | Date | Details |
|---|---|---|
| Initial release | October 2022 | Open-source Python library by Harrison Chase |
| LangChain, Inc. founded | January 2023 | Co-founded by Harrison Chase and Ankush Gola |
| Seed round | April 2023 | $10 million from Benchmark |
| Series A | February 2024 | $25 million led by Sequoia Capital ($200M valuation) |
| LangChain v0.3 | September 2024 | Pydantic 2 migration, modular package restructuring |
| LangChain and LangGraph 1.0 alpha | September 2025 | Major rewrite announced targeting late October GA |
| Series B | October 2025 | $125 million led by IVP ($1.25B valuation, unicorn status) |
| LangChain 1.0 GA | October 2025 | First stable major release with create_agent API |
| LangGraph 1.0 GA | October 2025 | Stable release for agent orchestration framework |
| LangChain 1.1 | Early 2026 | Model profiles, enhanced middleware, retry logic |
| Deep Agents | March 2026 | Planning, subagents, and persistent memory for long-horizon tasks |
LangChain's architecture is organized around six primary categories of components: Models, Prompts, Chains, Agents, Memory, and Retrieval. These components are designed to be modular and composable, allowing developers to mix and match building blocks to construct sophisticated applications [6].
At the center of any LangChain application is the model interface. LangChain provides a standardized abstraction layer for interacting with many different language model providers, including OpenAI, Anthropic, Google, Cohere, and Hugging Face. This abstraction allows developers to swap out underlying models without changing application logic.
LangChain supports three model types: LLMs (text-in, text-out), chat models (message-based interfaces), and text embedding models (used for vector search and similarity tasks). The framework includes prompt template utilities that help developers construct dynamic prompts with variable substitution, few-shot examples, and output formatting instructions.
Chains are sequences of operations assembled in a specific order to perform particular tasks. A chain might combine a prompt template, a model call, and an output parser into a single pipeline. For example, a summarization chain could load a PDF document, split its text into chunks, generate summaries for each chunk, and then combine those summaries into a final output.
LangChain includes implementations of many different chain types, covering use cases such as question answering over documents, SQL database querying, API interaction, and conversational retrieval. Developers can also compose custom chains by linking components together [1].
While chains follow a predetermined sequence of steps, agents use a language model as a reasoning engine to decide which actions to take and in what order. An agent receives user input, determines which tools to call, processes the results, and iterates until it arrives at a final answer. This makes agents suitable for tasks where the required steps cannot be known in advance [7].
LangChain provides several generic agent types, including ReAct agents (which alternate between reasoning and acting), plan-and-execute agents (which create a plan first, then execute each step), and OpenAI function-calling agents (which leverage the function-calling capabilities of specific models). Starting with LangChain 1.0, the create_agent abstraction provides the fastest way to build an agent with any model provider, built on the LangGraph runtime for reliability [15][18].
Tools are functions that an agent can invoke to interact with the outside world. LangChain ships with a collection of built-in tools and supports custom tool definitions. Common built-in tools include web search utilities, calculators, Python code interpreters, SQL database connectors, and API wrappers. Developers can define their own tools by wrapping any Python function with a tool decorator and providing a description that the agent uses to decide when and how to call it [7].
Memory enables context retention across interactions. Without memory, each call to a language model is stateless. LangChain provides several memory implementations:
| Memory Type | Description |
|---|---|
| ConversationBufferMemory | Stores the full conversation history |
| ConversationSummaryMemory | Maintains a running summary of the conversation |
| ConversationBufferWindowMemory | Keeps only the last K interactions |
| ConversationTokenBufferMemory | Keeps interactions up to a token limit |
| VectorStoreRetrieverMemory | Stores memories in a vector store and retrieves the most relevant ones |
These memory modules can be attached to chains and agents, allowing applications to maintain coherent, multi-turn conversations [8].
LangChain's retrieval system supports retrieval-augmented generation (RAG), a technique that grounds language model responses in external data. The retrieval pipeline typically involves loading documents from a source, splitting them into chunks, generating embeddings, storing those embeddings in a vector database, and retrieving the most relevant chunks at query time.
The framework includes over 100 document loaders for ingesting data from PDFs, web pages, databases, APIs, and many other sources. It also provides more than 10 text splitting methods and integrations with dozens of vector stores, including Pinecone, Chroma, Weaviate, FAISS, Milvus, and Qdrant [1].
LangChain's codebase underwent a significant architectural reorganization beginning in late 2023, moving from a monolithic package to a modular, multi-package structure. This split was completed with the release of LangChain v0.1 in January 2024 and refined further in v0.3 [19].
The original langchain package was divided into three core packages:
| Package | Purpose | Examples |
|---|---|---|
langchain-core | Core abstractions, interfaces, and LCEL runtime | Runnable, ChatModel, BaseTool, PromptTemplate |
langchain-community | Community-maintained third-party integrations | Vector stores, document loaders, embedding providers |
langchain | High-level chains, agents, and orchestration logic | create_agent, retrieval chains, SQL chains |
In addition, first-party integrations from major providers are published as standalone packages for tighter version control. These include langchain-openai, langchain-anthropic, langchain-google-genai, langchain-mistralai, and others. This separation allows each integration to version independently and manage its own dependencies without affecting the broader ecosystem [19].
Released in September 2024, LangChain v0.3 completed the migration from Pydantic 1 to Pydantic 2, removing the need for compatibility bridges like langchain_core.pydantic_v1. The release also dropped support for Python 3.8 and Pydantic 1 (both of which had reached end-of-life), made callbacks non-blocking by default, and simplified tool definition APIs. On the JavaScript side, all packages moved @langchain/core from a direct dependency to a peer dependency, giving developers explicit control over the core version used in their projects [20].
Announced as an alpha in September 2025 and reaching general availability in late October 2025, LangChain 1.0 represented the first major stable release of the framework. The team completely rewrote the library to be opinionated, focused, and powered by the LangGraph runtime. Key additions included:
create_agent API: A streamlined entry point for building agents with any model provider, replacing the older agent executor patterns.Released in early 2026, LangChain 1.1 introduced a model profile system where chat models expose a .profile attribute describing their supported capabilities (structured output, function calling, JSON modes). These profiles are sourced from models.dev, an open-source project indexing model behaviors across providers. The release also added retry middleware with exponential backoff, the OpenAIModerationMiddleware for policy violation checking, and the ability to pass SystemMessage instances directly to create_agent for advanced cache control [21].
LangChain Expression Language (LCEL) is a declarative syntax for composing chains of LangChain components. Introduced to simplify chain construction and provide built-in support for streaming, batching, and asynchronous execution, LCEL uses the Python pipe operator (|) to connect components in a left-to-right data flow [9].
The core abstraction behind LCEL is the "Runnable" interface. Every LangChain component that implements the Runnable protocol can be invoked, batched, streamed, and composed with other Runnables. When two Runnables are combined with the pipe operator, the output of the first becomes the input of the second. Internally, the | operator works through Python's __or__ and __ror__ magic methods, which are defined on the Runnable base class. When two Runnables are piped together, LangChain constructs a RunnableSequence that manages the data flow.
A simple LCEL chain might look like:
chain = prompt | model | output_parser
LCEL also provides RunnableParallel for executing multiple operations concurrently and RunnableLambda for wrapping arbitrary Python functions into pipe-compatible components.
Key benefits of LCEL include:
LCEL became the recommended approach for building chains, superseding the older LLMChain and similar legacy abstractions. With LangChain 1.0, LCEL continues to serve as the composable runtime underneath create_agent and other high-level APIs.
LangGraph is a framework for building stateful, multi-actor AI agent applications using graph-based orchestration. While LCEL and standard chains work well for linear workflows, LangGraph addresses the need for more complex agent architectures involving cycles, conditional branching, and persistent state [10].
In LangGraph, an application is defined as a directed graph where nodes represent agents, functions, or decision points, and edges define how data flows between them. A centralized StateGraph maintains the workflow's shared state, typically defined as a TypedDict or Pydantic model that persists and accumulates information as it flows through the graph. This design allows for:
PostgresSaver, the system automatically saves a snapshot of the graph state at every step.LangGraph provides durable execution, meaning that if an agent workflow is interrupted (due to a crash, timeout, or human intervention), it can be resumed from its last checkpoint. The framework also includes built-in support for human-in-the-loop patterns, where execution can be paused at designated points for human review or approval before continuing [10].
LangGraph supports multi-agent architectures where multiple specialized agents collaborate within a single graph. Each agent can have its own tools, prompts, and decision logic while sharing state through the centralized graph. This makes it possible to build systems where, for instance, a research agent gathers information, an analysis agent processes findings, and a writing agent produces output, all coordinated through the graph structure.
LangGraph 1.0 reached general availability in late October 2025, after powering agent systems at companies including Uber, LinkedIn, and Klarna. The 1.0 release marked a commitment to stability with no breaking changes until 2.0. Over 400 companies were running LangGraph in production at the time of release [10][11].
In early 2026, LangGraph 1.1 introduced a v2 streaming format with full type safety for stream(), astream(), invoke(), and ainvoke() methods, improving the developer experience for real-time agent applications [11].
The LangGraph Platform (rebranded as LangSmith Deployment in late 2025) provides managed infrastructure for deploying LangGraph applications. It handles scaling, state persistence, and monitoring for production agent systems, and integrates tightly with LangSmith for observability. Pricing follows a usage-based model measured in "nodes executed" and deployment minutes, with a free Developer tier supporting up to 100,000 nodes per month and managed Plus and Enterprise tiers for production workloads [10][22].
LangSmith is a developer platform for observability, testing, and evaluation of LLM applications. Unlike LangChain the framework, LangSmith is framework-agnostic; it can trace applications built with OpenAI SDK, Anthropic SDK, Vercel AI SDK, LlamaIndex, or custom implementations [12].
LangSmith's tracing system breaks each run into a structured timeline of steps, showing exactly what happened, in what order, and why. Developers can inspect individual LLM calls, see the exact prompts sent, view token usage, and identify where errors or unexpected behavior occurred. The platform supports Python, TypeScript, Go, and Java SDKs, and added end-to-end OpenTelemetry support in March 2025 for integration with existing observability pipelines [12].
LangSmith provides tools for systematic evaluation of LLM outputs. Developers can create datasets, define custom evaluators, and run automated test suites against their applications. The platform supports online evaluation (scoring production traffic in real time) and offline evaluation (running test suites against specific application versions). Pairwise annotation queues allow side-by-side comparison of outputs from different model versions or configurations. Evaluator types include human evaluation through annotation queues, heuristic checks, LLM-as-judge evaluators that score against defined criteria, and custom evaluators written in Python or TypeScript [12].
LangSmith has introduced several AI-powered capabilities to assist with agent development:
LangSmith provides a unified view of costs across an entire agent workflow, tracking not just LLM call costs but also tool execution and retrieval costs. This visibility helps teams optimize spending as they scale their applications.
| Plan | Price | Included Traces |
|---|---|---|
| Developer | Free | 5,000/month |
| Plus | $39/user/month | 10,000/month |
| Enterprise | Custom | Custom |
LangSmith offers managed cloud, bring-your-own-cloud (BYOC), and self-hosted deployment options for teams with data residency requirements [12].
The LangSmith Agent Builder, which entered public beta in 2025, provides a visual interface for creating and testing agents. It features a central chat interface with all available tools, one-click conversion from conversations to agent configurations, file upload support, and a unified tool registry. The Agent Builder is designed to make working with an agent feel like working with a teammate, lowering the barrier to entry for teams that prefer graphical interfaces over code [23].
LangChain supports the Model Context Protocol (MCP), an open standard originally developed by Anthropic for connecting AI agents to external tools and data sources. The official langchain-mcp-adapters package, maintained by the LangChain community with contributions from Anthropic, converts MCP tools into LangChain- and LangGraph-compatible tools, enabling interaction with tools across multiple MCP servers [24].
The MultiServerMCPClient class manages connections to multiple MCP servers simultaneously. It is stateless by default: each tool invocation creates a fresh MCP ClientSession, executes the tool, and cleans up. The library supports multiple transport mechanisms for client-server communication, including HTTP and stdio transports [24].
MCP has emerged as the de facto standard for tool integration in the AI agent ecosystem. In March 2025, OpenAI officially adopted MCP across its products. In December 2025, Anthropic donated MCP to the Agentic AI Foundation under the Linux Foundation, further solidifying its position as an industry standard. The langchain-mcp-tools library supports MCP Protocol version 2025-03-26 while maintaining backward compatibility with version 2024-11-05 [24].
Announced in March 2026, Deep Agents is an agent harness built on LangChain and LangGraph, designed for complex, long-horizon tasks that require planning, delegation, and persistent memory. The project represents LangChain's entry into the coding agent space alongside tools like Devin and GitHub Copilot [25].
Core components of Deep Agents include:
write_todos): Enables agents to break down complex tasks into discrete steps, track progress, and adapt plans as new information emerges.read_file, write_file, edit_file, ls, glob, and grep.execute tool.The Deep Agents CLI can run interactively as a chat-style coding agent or non-interactively via piped input for scriptable, headless execution. Evaluated against Terminal Bench 2.0 (an 89-task benchmark spanning software engineering, biology, security, and gaming scenarios), the Deep Agents CLI scored approximately 42.65% using Claude Sonnet 4.5 as the underlying model [25].
LangServe is an open-source library that simplifies the deployment of LangChain applications as REST APIs. Built on top of FastAPI and Pydantic, LangServe automatically generates API endpoints for any LangChain Runnable, including /invoke, /batch, and /stream endpoints that support concurrent requests [13].
Key features of LangServe include automatic input/output schema validation (inferred from the LangChain objects), interactive API documentation, a built-in web playground for testing deployed chains, and a client library for calling deployed endpoints from Python or JavaScript applications. LangServe supports deployment to platforms such as Google Cloud Run, AWS, and Replit [13].
One of LangChain's defining strengths is its extensive integration ecosystem. The framework connects to hundreds of external services and tools across several categories:
| Category | Examples | Approximate Count |
|---|---|---|
| LLM providers | OpenAI, Anthropic, Google, Cohere, Mistral, Meta Llama | 50+ |
| Vector stores | Pinecone, Chroma, Weaviate, FAISS, Milvus, Qdrant, pgvector | 40+ |
| Document loaders | PDF, HTML, CSV, Notion, Google Drive, S3, Confluence | 100+ |
| Tools | Web search, calculators, code interpreters, API wrappers, MCP servers | 50+ |
| Embedding models | OpenAI, Cohere, Hugging Face, Voyage AI, Google | 25+ |
| Callbacks/tracing | LangSmith, Weights & Biases, MLflow, Helicone, OpenTelemetry | 10+ |
Community-maintained integrations are published in the langchain-community package, while first-party integrations from major providers are distributed as standalone packages (e.g., langchain-openai, langchain-anthropic) [1].
The LangChain ecosystem encompasses several interconnected products and libraries. The following table summarizes the major components:
| Component | Type | Description | License |
|---|---|---|---|
langchain-core | Open-source library | Core abstractions, Runnable interface, LCEL runtime | MIT |
langchain | Open-source library | High-level chains, agents, create_agent API | MIT |
langchain-community | Open-source library | Community-maintained integrations (vector stores, loaders, etc.) | MIT |
| LangGraph | Open-source framework | Graph-based agent orchestration with durable execution | MIT |
| LangSmith | Commercial platform | Observability, evaluation, tracing, and agent deployment | Proprietary |
| LangServe | Open-source library | REST API deployment for LangChain Runnables | MIT |
| Deep Agents | Open-source framework | Planning, subagents, and memory for long-horizon tasks | MIT |
langchain-mcp-adapters | Open-source library | Bridge between LangChain/LangGraph and MCP servers | MIT |
| Partner packages | Open-source libraries | langchain-openai, langchain-anthropic, langchain-google-genai, etc. | MIT |
LangChain operates in an increasingly crowded market for LLM application frameworks. Several notable competitors have established distinct positions in the ecosystem.
LangChain and LlamaIndex are the two most widely used frameworks for building LLM applications, but they differ in scope and emphasis.
| Aspect | LangChain | LlamaIndex |
|---|---|---|
| Primary focus | General-purpose agent and chain orchestration | Data retrieval and search/RAG workflows |
| Architecture | Modular chains, agents, tools, memory | Query engines, indices, routers, fusers |
| Agent support | Extensive (ReAct, plan-and-execute, multi-agent via LangGraph) | Supported but not the primary focus |
| RAG capabilities | Full pipeline support via retrieval modules | Built-in, optimized query engines for RAG |
| Data ingestion | 100+ document loaders | Wide format support with structured extraction |
| Observability | LangSmith (dedicated platform) | LlamaTrace, third-party integrations |
| Best suited for | Complex agent workflows, multi-step reasoning, tool use | Document-heavy search, knowledge bases, Q&A over data |
| License | MIT | MIT |
LangChain excels in scenarios requiring dynamic agent behavior, tool use, and multi-step reasoning, while LlamaIndex is often preferred for applications centered on retrieval and question answering over large document collections. Many production systems use both frameworks together, with LlamaIndex handling data retrieval and LangChain managing the broader application logic [14].
| Framework | Developer | Focus | Key Strength | Language Support |
|---|---|---|---|---|
| LangChain/LangGraph | LangChain, Inc. | Agent orchestration, chains, RAG | Largest ecosystem, durable graph execution | Python, TypeScript |
| LlamaIndex | LlamaIndex, Inc. | Data retrieval and RAG | Optimized query engines and data connectors | Python, TypeScript |
| Semantic Kernel | Microsoft | Enterprise LLM integration | Deep Microsoft ecosystem integration | C#, Python, Java |
| CrewAI | CrewAI, Inc. | Multi-agent role-based collaboration | Role-based agent teams with crew orchestration | Python |
| Haystack | deepset | Production RAG and NLP pipelines | Deterministic, high-quality production pipelines | Python |
| AutoGen | Microsoft | Multi-agent conversations | Conversational agent patterns (merged with Semantic Kernel) | Python, C# |
CrewAI, which raised $18 million in October 2024 in a round led by Insight Partners with participation from notable angels including Andrew Ng and Dharmesh Shah, focuses specifically on role-based multi-agent collaboration. It reports serving nearly half of the Fortune 500 and executing over 10 million agents per month [26].
Haystack, developed by deepset, is a pipeline-centric framework that takes a directed acyclic graph (DAG) approach to building production NLP and RAG systems. Companies including Apple, Meta, NVIDIA, and Netflix use Haystack in production. Recent benchmarks suggest Haystack can match or outperform LangChain on certain RAG workloads, depending on the configuration [27].
Microsoft merged its AutoGen and Semantic Kernel projects into a unified Agent Framework in 2025, positioning it as the enterprise-grade option with deep integration into Azure and the broader Microsoft ecosystem [28].
LangChain has cultivated one of the largest open-source communities in the AI tooling space. Key community metrics as of early 2026 include:
The project follows a modular package structure. The core abstractions live in langchain-core, while langchain-community houses community-maintained integrations. First-party provider packages (such as langchain-openai and langchain-anthropic) are maintained separately for tighter version control. LangGraph, LangSmith, and Deep Agents have their own dedicated repositories and release cycles [1].
Despite its popularity, LangChain has faced sustained criticism from portions of the developer community, particularly during 2023 and 2024. The backlash became prominent enough to be commonly referred to as "LangChain hate" on social media and developer forums [30].
The most frequent criticism centers on LangChain's layered abstractions. Developers have described the framework as "over-engineered for simple tasks and fragile for complex ones," with abstractions piled on top of abstractions: chains, runnables, agents, tools, and callbacks all interacting in ways that can be difficult to reason about. For straightforward use cases (such as a single API call to an LLM), LangChain's overhead can feel disproportionate to the task [30][31].
During 2023 and early 2024, LangChain's rapid development pace led to frequent breaking changes between versions. Developers reported that interfaces were a moving target, making it difficult to maintain production applications. The v0.3 and 1.0 releases explicitly addressed this concern by committing to backward compatibility and semantic versioning [30].
The original monolithic langchain package pulled in dozens of dependencies for integrations that many users did not need. The package split into langchain-core, langchain-community, and standalone provider packages was a direct response to this criticism, allowing developers to install only the integrations they actually use [31].
Some developers have reported that LangChain's abstractions, particularly memory components and agent executors, can add noticeable latency per API call. Debugging can also be challenging, with vague type hints and inconsistent execution tracing in earlier versions. LangSmith's tracing capabilities and the 1.0 rewrite aimed to address these debugging and performance concerns [30].
Several companies, including Octomind, publicly documented their decision to remove LangChain from their tech stack in 2024, finding that direct API calls to LLM providers gave them more control and productivity. Others have argued that LangChain remains valuable for rapid prototyping and teams that benefit from its pre-built integrations, even if production systems sometimes outgrow its abstractions. The LangChain team has acknowledged much of this feedback, and the 1.0 rewrite with its streamlined API, middleware system, and focus on the LangGraph runtime was explicitly designed to address the most common complaints [31][32].
As of early 2026, LangChain has evolved significantly from its early days as a chain-composition library. The project now positions itself as a comprehensive "agent engineering platform" rather than simply an LLM framework [5].
LangChain 1.0 represented a major rewrite of the framework, introducing create_agent as the primary entry point for agent development, a middleware system for agent loop control, improved structured output generation, and a commitment to API stability. The JavaScript/TypeScript variant also reached stable releases, adding dynamic tools, recovery from hallucinated tool calls, and improved streaming error signals [15].
LangGraph 1.0 became generally available in October 2025, establishing itself as the standard approach for building production agent systems within the LangChain ecosystem. Its durable execution model and human-in-the-loop capabilities address key enterprise requirements around reliability and oversight [11].
LangSmith has continued to expand, with over 250,000 user signups and one billion trace logs recorded. Features added in 2025 and early 2026 include Polly (the AI debugging assistant), LangSmith Fetch (CLI trace access), the Insights Agent (scheduled automated analysis), automated trace clustering, cost monitoring across full agent workflows, and the Agent Builder visual interface [12][23].
The launch of Deep Agents in March 2026 signaled LangChain's expansion into the coding agent space, with built-in planning, subagent delegation, and persistent memory for complex, multi-step tasks [25].
The broader trend in the LangChain ecosystem reflects the AI industry's shift from simple LLM wrappers toward robust, production-grade agent infrastructure. With its unicorn valuation, growing customer base, and expanding product surface, LangChain, Inc. is positioned as a central player in the agentic AI tooling landscape.