LangChain
LangChain is an MIT-licensed framework for building agents and LLM-powered applications, with create_agent as its current entry point and LangGraph as the underlying orchestration runtime. LangSmith, a separate paid product, adds tracing, evaluation, and deployment.
What is LangChain?
LangChain is an MIT-licensed framework for building agents and LLM-powered applications. Its official documentation frames the current product around `create_agent`: a minimal harness that combines a model, tools, a system prompt, and optional middleware. The harness is the loop around the model, and LangChain's abstractions are meant to let developers compose that loop without writing every integration and control-flow primitive from scratch.
LangChain is not a single product. The ecosystem splits into distinct layers with different licenses and cost structures. The framework (`langchain`, `langchain-core`) and the orchestration runtime (`langgraph`) are open source and MIT-licensed. LangSmith—tracing, evaluation, datasets, and managed deployment—is a separate, closed-source product with its own pricing. Deep Agents and Managed Deep Agents sit further up the stack, offering a batteries-included harness and a hosted runtime respectively. Confusing “LangChain” with “LangSmith” is the most common source of sticker shock: the framework costs nothing, while the observability layer can become a material operating expense.
The framework is model-agnostic. Official examples cover OpenAI, Anthropic, Google, and OpenRouter, and the integration surface extends across model providers, vector stores, document loaders, and tools. The trade-off of that breadth is abstraction depth: LangChain adds layers over the provider APIs, and when those layers do not match the task, developers must debug through them.
How does LangChain work?
A minimal LangChain application starts with `create_agent`, passing a model identifier, a list of tools, and a system prompt. The agent receives a message list, selects tools when the model decides to, executes them, and returns the final message content. Tools are ordinary Python functions decorated with `@tool`; the model sees their names and descriptions and decides when to call them.
For workflows that need deterministic branching, persistence, checkpointing, or human-in-the-loop pauses, the agent can be backed by LangGraph, LangChain's low-level orchestration runtime. LangGraph represents execution as a graph of nodes and edges, allowing developers to combine agentic steps with fixed control flow. LangSmith, when enabled, records traces of each step—model calls, tool calls, and intermediate state—so developers can inspect what happened and evaluate agent trajectories over time.
The workflow from the user's perspective is code-first: you write Python or TypeScript, install the framework and provider-specific integration packages, and run the application in your own environment or a deployment target. LangChain does not impose a visual builder or a hosted workspace; those are separate products in the ecosystem.
Use Cases
- Building a single-agent application with tool calling, where the model decides which functions to invoke and in what order
- Adding persistence, checkpointing, and human-in-the-loop approval to an agent workflow via LangGraph
- Composing RAG pipelines with document loaders, text splitters, embeddings, vector stores, and retrievers behind a standardized interface
- Prototyping across multiple model providers without rewriting application code when switching from one API to another
- Instrumenting an agent with tracing and evaluation before moving it toward production
Pricing
Pricing model: Freemium
| Plan | Price | Billing | Included usage | Notes |
|---|---|---|---|---|
| LangChain / LangGraph (Open Source) | Free | — | MIT-licensed framework and orchestration runtime. No seat fees, no trace meters, no usage limits imposed by LangChain. You pay only for the LLM API usage and infrastructure you consume. | — |
| LangSmith Developer | $0 | per month | 1 seat, 5,000 base traces per month, then pay-as-you-go. 14-day trace retention. | — |
| LangSmith Plus | $39 | per seat per month | Unlimited seats, 10,000 base traces per month shared across the organization, then pay-as-you-go. One free small serverless deployment included; additional deployment usage is metered. | — |
Common Limitations
- Breaking changes across major versions · LangChain's release cadence has historically introduced breaking changes between versions. As of 2026, 1.x has stabilized compared with the 0.1/0.2 era, but the 0.3 line is supported only until December 2026, and practitioners still report maintaining version-branch code for cross-version compatibility. Teams should budget for migration work when pinning to a major version.
- Abstraction leakage and debugging overhead · LangChain's value comes from layering abstractions over the model loop. When an abstraction does not fit the use case—common in structured extraction, multi-model routing, or fine-grained state control—developers must reason through layers they did not write. LangSmith tracing helps, but raw Python or direct SDK calls remain easier to debug when the abstraction is the problem.
- LangSmith cost at scale · LangSmith pricing combines a per-seat subscription with usage-based trace charges. Beyond included allowances, base traces are billed per 1,000, and extended trace retention beyond 14 days is billed at a higher rate. Teams generating high trace volumes can find the observability layer more expensive than the framework itself, which is free.
- Multi-agent orchestration maturity · While LangGraph provides durable execution, persistence, and human-in-the-loop primitives, practitioners continue to describe multi-agent coordination as less mature than single-agent flows. Complex multi-agent architectures may require more custom coordination logic than the framework provides out of the box.
- Documentation fragmentation across the ecosystem · The LangChain ecosystem now spans LangChain, LangGraph, LangSmith, Deep Agents, and legacy langchain-classic. Documentation gaps and version mismatches between tutorials and current APIs are a recurring complaint, even among teams that adopt the framework. New users should verify that guides target the current 1.x / create_agent path rather than legacy 0.x patterns.
- Security maintenance is the adopter's responsibility · A CVE in langchain-core (CVE-2025-68664) was published in December 2025. Because the framework is open source and self-hosted, security patching, dependency audits, and upgrade cadence are the adopting team's responsibility, not the vendor's.
Key Features
- create_agent harness for model + tools + prompt + middleware
- Model-agnostic provider support (OpenAI, Anthropic, Google, OpenRouter, and others)
- LangGraph runtime for durable execution, persistence, checkpointing, and human-in-the-loop
- RAG primitives: document loaders, text splitters, embeddings, vector stores, retrievers
- LCEL (LangChain Expression Language) for composing chains
LangChain vs. LlamaIndex, CrewAI, and Dify
This comparison uses current official product information. It focuses on documented positioning, deployment models, and capability boundaries rather than subjective rankings.
| Tool | Positioning | Key differences | Best fit | Pricing note |
|---|---|---|---|---|
| LangChain Official site Framework overview Pricing | An MIT-licensed agent framework and orchestration layer for building LLM-powered applications, with create_agent as the current entry point and LangGraph as the underlying runtime. | Broadest integration surface, model-agnostic harness, and a clear split between the free framework and the paid LangSmith observability layer. Abstraction depth and ecosystem fragmentation are documented trade-offs. | Teams that want a flexible agent harness and are prepared to manage abstraction and version trade-offs in exchange for ecosystem breadth. | Framework and LangGraph are MIT-licensed and free. LangSmith Developer is free with 1 seat and 5,000 traces/month; Plus is $39/seat/month with 10,000 included traces, then pay-as-you-go. |
| LlamaIndex Official site Developer documentation | An MIT-licensed data framework for building RAG and agent applications over private data, with LlamaParse as its document-parsing product. | Retrieval-first abstractions (ingestion, indexing, query engines) and a specialized document-parsing layer. Often used as the retrieval layer underneath a broader orchestration framework rather than as a full replacement for LangChain. | Teams where retrieval over private documents is the architectural center of the application. | The LlamaIndex framework is MIT-licensed and free. LlamaCloud / LlamaParse have separate paid tiers. Verify current pricing on LlamaIndex's official pages. |
| CrewAI Official site Documentation | A multi-agent orchestration framework built around explicit agent roles, goals, tasks, and tools, with Crews and Flows as its documented collaboration and control-flow primitives. | Role-based mental model and fast multi-agent prototyping. Framework comparisons note less fine-grained state control and checkpointing than LangGraph, which may require additional infrastructure for durable execution. | Python teams whose problem decomposes naturally into specialist roles collaborating on a task, and who prioritize prototyping speed over low-level state control. | The open-source SDK is MIT-licensed and free. CrewAI AMP (hosted) has a free Basic tier with execution limits and paid Professional / Enterprise tiers. Verify current limits on CrewAI's pricing page. |
| Dify Official site Documentation | An open-source LLM application platform with a visual canvas for building chatbots, RAG pipelines, agents, and workflows, deployable on Dify Cloud or self-hosted. | Visual builder and built-in knowledge bases instead of a code-first framework. Dify packages applications for web and API publishing; LangChain provides the code-level components and orchestration runtime. | Teams that want a visual builder and built-in RAG without writing framework code, or that need a self-hosted application platform rather than a library. | Sandbox is free with one-time credits and workspace limits; paid Cloud plans exist. The self-hosted Community edition removes platform fees but requires infrastructure and model costs. |
Comparison checked against official product information on 2026-11-05. Features and pricing may change.
Frequently Asked Questions
Is LangChain free?
The LangChain framework and the LangGraph runtime are MIT-licensed and free to use at any scale. There are no seat fees or trace meters imposed by LangChain itself. You pay for the LLM API calls, embedding costs, vector store hosting, and any other infrastructure you consume. LangSmith, the observability and evaluation product, is separate and has paid plans.
Do I need LangSmith to use LangChain?
No. LangSmith is optional. The framework runs without it. However, LangChain's own documentation recommends LangSmith for tracing and evaluation, and when abstraction-layer bugs occur, tracing is often the fastest way to see what the agent actually did. Teams should weigh the debugging convenience against the per-seat and per-trace cost.
What is the difference between LangChain and LangGraph?
LangChain is the agent framework and component layer—model abstractions, tools, prompts, RAG primitives, and create_agent. LangGraph is a lower-level orchestration runtime that represents execution as a graph with persistent state, checkpointing, human-in-the-loop interrupts, and streaming. create_agent is built on LangGraph underneath. Use LangChain when you want a ready-made harness; reach for LangGraph directly when you need explicit control over deterministic and agentic steps in the same workflow.
Is LangChain production-ready?
The framework has stabilized significantly since the 0.1/0.2 era, and 1.x is the current stable line. But "production-ready" depends on the team's tolerance for abstraction leakage and version migration. LangChain itself does not manage your deployment, security patching, or infrastructure. For a hosted runtime, the ecosystem offers Managed Deep Agents and LangSmith Deployment, both of which are separate paid or metered offerings. Teams should treat the framework as a library they operate, not a managed platform.
Why do developers complain about LangChain?
The most common criticisms are abstraction leakage, breaking changes across versions, and documentation fragmentation across the ecosystem's many packages and products. Part of the reputation is earned history from the 0.1/0.2 era; part persists because the framework genuinely adds layers that can obscure raw API behavior. The pragmatic approach is to use LangChain when its integrations and harness save meaningful time, and to drop to raw provider SDKs or LangGraph directly when the abstraction becomes the obstacle.
Alternative Tools
- Dify Dify is an open-source platform for building, deploying, and operating LLM applications, agents, RAG pipelines, and workflows through a visual canvas, with cloud-hosted and self-hosted deployment options.
- OpenAI Agents SDK OpenAI Agents SDK is a lightweight, MIT-licensed Python and TypeScript framework for building multi-agent workflows using a minimal set of primitives: agents, tools, handoffs, guardrails, sessions, and tracing.
- Vercel AI SDK Vercel AI SDK is a free, Apache 2.0 TypeScript toolkit for building streaming AI UIs and agents with React, Next.js, Vue, Svelte, and Node.js. It unifies 100+ models across providers behind a single API, ships React hooks for chat and generative UI, and requires Node.js 22+ with ESM-only imports in v7. It is not a RAG framework or a full agent orchestrator.
- CrewAI CrewAI is an open-source Python framework for orchestrating role-playing AI agent teams (Crews) within structured, stateful workflows (Flows), with a hosted AMP platform for enterprise governance.
- Google ADK Google ADK is an Apache 2.0 open-source framework for building, evaluating, and deploying multi-agent systems, with first-class support for Gemini and Google Cloud and coverage across Python, TypeScript, Go, Java, and Kotlin.
- Browser Use Browser Use is an MIT-licensed open-source AI browser agent (Python and TypeScript) that lets LLMs control a browser, paired with a usage-based cloud offering at $0.02 per browser-hour for managed stealth browsers, CAPTCHA solving, and a hosted agent API.