Updated – May 31, 2026
- Rewritten for LangChain v1.0 (GA October 2025) — new
create_agentfactory, LangGraph as the official agent runtime, and standard content blocks for multimodal responses. - Added v1.0 Python and JavaScript quickstarts with the new split integration packages (
langchain-openai,langchain-anthropic, etc.). - Replaced legacy
LLMChain/AgentExecutorexamples with current LCEL andcreate_agentpatterns. - Refreshed the alternatives section, FAQ, and v0.x → v1.0 migration guidance.
Large Language Models (LLMs) have demonstrated an incredible ability to understand and generate human-like text, but their true potential is unlocked when they can interact with the world beyond their pre-trained knowledge. This is where LangChain enters the picture. LangChain is a popular open-source framework for developing applications powered by LLMs. It acts as a bridge — connecting language models to external data, tools, and APIs — and as of LangChain v1.0 (released October 22, 2025), it has been rebuilt around a simpler core and LangGraph as the official agent runtime.
Whether you’re shipping a chatbot that queries your internal documents or a multi-step agent that books travel through APIs, LangChain provides the essential building blocks. This guide explains what LangChain is in 2026, how the v1.0 architecture works, how to get started in Python and JavaScript, and how it compares to the rest of the LLM application stack.
What Is LangChain? (Short Answer)
LangChain is an open-source framework that helps developers build applications on top of large language models. It provides:
- A standard interface to dozens of model providers (OpenAI, Anthropic, Google, Mistral, Hugging Face, local models, and more).
- Composable runnables (the LCEL / Runnable interface) for wiring prompts, models, retrievers, and tools into pipelines.
- A first-class agent abstraction — in v1.0, the new
create_agentfactory, built on top of LangGraph as the durable agent runtime. - A growing ecosystem: LangGraph (agent orchestration), LangSmith (observability, tracing, evals), and LangGraph Platform (deployment).
The fundamental goal is the same as it was at launch: provide a standard, extensible interface for chaining together components to create production LLM applications. What changed in v1.0 is how you chain them.
LangChain v1.0 at a glance
- Released: October 22, 2025 (Python + JavaScript reached 1.0 together).
- Core change: Slimmer
langchainpackage. Provider code split into separate integration packages (e.g.langchain-openai,langchain-anthropic,langchain-google-genai). - Agents: New
create_agentfactory replaces the legacyAgentExecutor. Agents run on LangGraph, which gives you durability, streaming, human-in-the-loop, and time travel for free. - Multimodal: Standard content blocks unify text, images, audio, citations, and tool calls across providers.
- Stability promise: Public APIs follow semantic versioning. Legacy v0.x APIs remain available behind
langchain-classicuntil v2.0.
How LangChain Works in v1.0
LangChain v1.0 keeps the same mental model — models, prompts, retrievers, tools, memory, agents — but the surface area is smaller and the agent story is now centered on LangGraph.
Models, Messages, and Content Blocks
In v1.0, every chat model speaks the same BaseChatModel interface and returns standard content blocks: text, tool_call, reasoning, image, audio, and citation blocks. This means the same code handles a text reply from Anthropic, a tool call from OpenAI, and an image response from Google without provider-specific glue.
# Python
from langchain.chat_models import init_chat_model
model = init_chat_model("openai:gpt-5", temperature=0)
response = model.invoke("Explain LangChain in one sentence.")
print(response.text)
// JavaScript / TypeScript
import { initChatModel } from "langchain";
const model = await initChatModel("openai:gpt-5", { temperature: 0 });
const response = await model.invoke("Explain LangChain in one sentence.");
console.log(response.text);
Prompts and Structured Output
Prompt templates are still first-class, but native structured output is now the recommended path for extracting typed data:
from pydantic import BaseModel
from langchain.chat_models import init_chat_model
class Song(BaseModel):
title: str
artist: str
model = init_chat_model("anthropic:claude-sonnet-4-5")
structured = model.with_structured_output(Song)
song = structured.invoke("Suggest a song by Radiohead.")
print(song.title, song.artist)
Under the hood this uses each provider’s native tool-calling or JSON-mode support — no fragile string parsing.
LCEL: The Runnable Interface
Instead of dozens of bespoke Chain classes, v1.0 standardizes on the Runnable interface (sometimes called LCEL — LangChain Expression Language). Any prompt, model, retriever, parser, or tool is a Runnable, and you compose them with |:
from langchain_core.prompts import ChatPromptTemplate
from langchain.chat_models import init_chat_model
prompt = ChatPromptTemplate.from_template("Translate to French: {text}")
model = init_chat_model("openai:gpt-5-mini")
chain = prompt | model
print(chain.invoke({"text": "Good morning"}).text)
The legacy LLMChain, SimpleSequentialChain, and friends are deprecated and live in langchain-classic for backward compatibility.
Agents on LangGraph
This is the biggest architectural shift in v1.0. The old AgentExecutor is deprecated. The recommended way to build an agent is the create_agent factory, which compiles your model + tools + system prompt into a LangGraph state machine:
from langchain.agents import create_agent
from langchain.tools import tool
@tool
def get_weather(city: str) -> str:
"""Get the weather for a city."""
return f"It's 72F and sunny in {city}."
agent = create_agent(
model="openai:gpt-5",
tools=[get_weather],
system_prompt="You are a concise travel assistant.",
)
result = agent.invoke({"messages": [{"role": "user", "content": "Weather in Austin?"}]})
print(result["messages"][-1].content)
Because the agent is a LangGraph graph, you automatically get:
- Streaming of tokens and intermediate steps.
- Checkpointing so an agent can pause, persist its state, and resume later.
- Human-in-the-loop interrupts before tool calls.
- Time travel for replaying or branching from any prior step.
For more complex flows — supervisor agents, multi-agent teams, cyclical state machines — drop down to LangGraph directly. The two libraries are designed to interoperate.
Memory and State
In v1.0, conversational memory is handled by LangGraph’s checkpointer rather than the old Memory classes. You pass a thread_id, and the runtime persists message history (in memory, SQLite, Postgres, or Redis) between invocations. The legacy ConversationBufferMemory and friends are deprecated.
Retrieval-Augmented Generation (RAG)
RAG remains one of LangChain’s strongest use cases. The pipeline is unchanged conceptually:
- Split documents into chunks with a text splitter.
- Embed the chunks with an embedding model and store them in a vector store (pgvector, Pinecone, Chroma, Qdrant, Weaviate, etc.).
- Retrieve the top-k chunks most similar to the user’s query.
- Generate an answer by passing the retrieved context to the LLM.
In v1.0 this is expressed as a small Runnable graph (or, when you need agentic RAG with reflection and re-querying, a LangGraph agent).
Quickstart: Install and Run LangChain v1.0
v0.x to v1.0 migration
If you’re upgrading from LangChain 0.1–0.3, expect import path changes (provider code moved to langchain-openai, langchain-anthropic, etc.), LLMChain → LCEL, and AgentExecutor → create_agent on LangGraph. The official migration guide covers each deprecated symbol. If you can’t migrate immediately, pin to langchain==0.3.* (the LTS branch) or install langchain-classic alongside v1.x.
Python
pip install -U langchain langchain-openai langgraph
export OPENAI_API_KEY=sk-...
from langchain.agents import create_agent
from langchain.tools import tool
@tool
def add(a: int, b: int) -> int:
"""Add two numbers."""
return a + b
agent = create_agent(model="openai:gpt-5-mini", tools=[add])
print(agent.invoke({"messages": [{"role": "user", "content": "What is 21 + 21?"}]}))
JavaScript / TypeScript
npm install langchain @langchain/openai @langchain/langgraph
export OPENAI_API_KEY=sk-...
import { createAgent, tool } from "langchain";
import { z } from "zod";
const add = tool(
async ({ a, b }) => a + b,
{
name: "add",
description: "Add two numbers",
schema: z.object({ a: z.number(), b: z.number() }),
},
);
const agent = createAgent({
model: "openai:gpt-5-mini",
tools: [add],
});
const result = await agent.invoke({
messages: [{ role: "user", content: "What is 21 + 21?" }],
});
console.log(result.messages.at(-1)?.content);
That’s the entire “hello world” for a v1.0 agent in either language.
Common LangChain Use Cases
The v1.0 ergonomics haven’t changed the kinds of products people build with LangChain — they’ve just made them faster to ship.
Retrieval-Augmented Q&A Over Documents
Connect an LLM to a knowledge base (internal wiki, product docs, contracts, support tickets) and let users ask natural-language questions. This is the most common production use case and the one most teams start with.
Summarization
Boil long inputs down to what matters: sales calls, support transcripts, financial filings, research papers, code bases, legal contracts. Map-reduce and refine patterns are now expressed as simple Runnable graphs.
Data Extraction
Turn unstructured text into structured records using with_structured_output. Pull invoice line items, contact info, or compliance fields out of free-form text and drop them directly into a database or API call.
Natural-Language SQL and Tabular Analytics
Let non-technical users query a SQL database or CSV in plain English. LangChain orchestrates schema introspection, query generation, execution, and natural-language response — typically wrapped as a LangGraph agent so it can self-correct on bad queries.
Code Understanding and Generation
Index a codebase as a vector store and build a Copilot-style assistant that can answer questions about your code, suggest changes, or generate new modules grounded in the existing architecture.
API Orchestration
Use tools and create_agent to let users hit your APIs with natural language: “Cancel my order from yesterday,” “Schedule a meeting with Sam next Tuesday,” “What’s the status of ticket 4421?”
Advanced Chatbots
Combine LangGraph’s checkpointer (memory), tools (live data), structured output (typed responses), and human-in-the-loop interrupts to ship chatbots that are actually production-grade — not just demos.
Autonomous and Multi-Agent Workflows
For long-running, multi-step work — research, code generation, complex customer flows — LangGraph supports supervisor patterns, multi-agent teams, and durable execution with checkpoints and replay. This is where the v1.0 runtime really earns its keep.
The LangChain Ecosystem in 2026
LangChain is no longer a single library. It’s a stack:
| Tool | Purpose | When to use it |
|---|---|---|
| LangChain v1.0 | Models, prompts, retrievers, tools, create_agent | Day-to-day app development on top of LLMs. |
| LangGraph | Durable agent runtime, state machines, multi-agent | Complex flows, cycles, supervisors, long-running tasks. |
| LangSmith | Observability, tracing, datasets, evals | Debugging in dev, monitoring in prod, regression testing. |
| LangGraph Platform | Hosted deployment for LangGraph apps | Shipping agents without rolling your own infra. |
| Integration packages | langchain-openai, langchain-anthropic, etc. | Pulled in per-provider so your install stays small. |
LangSmith in particular has become table stakes for serious LangChain projects — it gives you trace-level visibility into every prompt, tool call, retrieval, and token, plus offline evals on saved datasets.
Integrating LangChain in Mobile Apps: The Challenges and Our Solution
LangChain is powerful, but integrating it into a production-grade mobile application is its own engineering problem. The library lives on the server; the experience lives on the phone. That gap is where most LangChain mobile projects struggle.
Why Mobile Integration Is Hard
- Performance and latency. Mobile users expect immediate feedback. LLM calls can take seconds, and multi-step agents can take longer. You need streaming, optimistic UI, prefetching, and aggressive caching to keep the experience tight.
- Data privacy and security. When LangChain talks to proprietary data — health records, financial documents, internal knowledge — you need encryption in transit and at rest, scoped API keys, audit logs, and tenant isolation. None of that ships out of the box.
- Resource management. On-device work has to respect battery, network, and memory limits. Most LangChain workloads belong on the server, but the client still needs careful state management and offline fallbacks.
- Scalability and reliability. Your backend must handle bursty agent traffic, slow upstream model calls, and partial failures without dropping conversations. LangGraph’s checkpointer helps; you still need the surrounding infrastructure.
- Modularity. Real LangChain integrations are modular — separate services for retrieval, tools, agents, and evals — so each piece can be optimized, observed, and replaced independently.
How metacto Can Help
This is where we come in. At metacto we specialize in building AI-enabled mobile applications, and we use LangChain and LangGraph for agent orchestration and LLM integrations in production apps.
With over 20 years of app development experience and more than 120 successful projects, we know how to translate a LangChain prototype into a polished, production-ready feature. Our AI development services cover the full stack: agent design with create_agent and LangGraph, RAG pipelines with vector stores and reranking, LangSmith-based observability and evals, and the mobile-side work — streaming, caching, and secure key handling — that turns it all into a great user experience. For deeper background on the models LangChain orchestrates, see our guide to building with LLMs.
LangChain Alternatives in 2026
LangChain is a dominant player, but the LLM framework landscape has matured. Pick the tool that matches your problem.
LangGraph (Same Family)
LangGraph is now the official agent runtime for LangChain v1.0, but you can also use it standalone. It’s a stateful graph framework for agents with cycles, branches, persistence, and human-in-the-loop. Reach for it directly when your flow is complex enough that you want to design the state machine explicitly.
LlamaIndex
LlamaIndex remains the strongest alternative for data-heavy RAG — rich document parsers, indexing strategies, query engines, and an opinionated end-to-end pipeline for retrieval. Many teams use LangChain for orchestration and LlamaIndex for the retrieval layer.
Haystack (deepset)
Production-grade pipelines for RAG and search, with a modular architecture and strong enterprise focus. Good fit when you want a more “framework,” less “library” feel and a mature evaluation story.
CrewAI
Multi-agent platform with low-code tools, role-based agent definitions, and a large integration catalog. Popular for sales, support, and ops automations where you want named “crews” of agents collaborating.
Microsoft: AutoGen and Semantic Kernel
- AutoGen — Multi-agent framework with strong Azure integration; conversation-driven orchestration.
- Semantic Kernel — Lightweight dev kit (C#, Python, Java) that fits naturally into enterprise .NET stacks.
Akka
Actor-based concurrency platform for the JVM. Not LangChain-shaped, but the right answer when you need extreme throughput, fault tolerance, and real-time guarantees for AI workloads.
Low-Code and Visual Builders
- Flowise — open-source, drag-and-drop LLM orchestration.
- Langflow — visual builder over a Python framework, tightly aligned with LangChain.
- Rivet — desktop visual programming for AI flows.
- n8n — general-purpose automation platform with strong AI nodes.
Other Notable Frameworks
| Platform | Primary Use Case | Notes |
|---|---|---|
| LlamaIndex | Data ingestion and RAG | Best-in-class parsers and query engines. |
| Haystack | Production RAG and search | Modular, enterprise-friendly, strong evals. |
| CrewAI | Multi-agent automations | Role-based agents, large integration library. |
| Griptape | Secure conversational AI | Strong on data privacy and structured workflows. |
| DSPy | Programmatic prompt optimization | Treats prompts as compiled programs. |
| Outlines | Constrained, reliable generation | Grammar-constrained decoding for typed outputs. |
| txtai | Embeddings DB + orchestration | Lightweight, good for semantic search. |
This landscape changes fast, but LangChain plus LangGraph plus LangSmith is now the most common starting point for teams shipping LLM apps in 2026.
Frequently Asked Questions
LangChain FAQ
What is LangChain used for?
LangChain is used to build applications on top of large language models. The most common use cases are retrieval-augmented Q&A over private documents, summarization, structured data extraction, natural-language SQL, code assistants, API orchestration, advanced chatbots, and autonomous or multi-agent workflows.
What is LangChain v1.0?
LangChain v1.0 is the first stable release of the framework, released October 22, 2025 for both Python and JavaScript. It introduces a simplified core, a new create_agent factory built on LangGraph, standardized multimodal content blocks, and split integration packages (langchain-openai, langchain-anthropic, etc.). Public APIs now follow semantic versioning.
What is the difference between LangChain and LangGraph?
LangChain is the high-level framework — models, prompts, retrievers, tools, and the create_agent factory. LangGraph is the lower-level, stateful graph runtime that powers v1.0 agents. Use LangChain's create_agent for typical agents; drop down to LangGraph directly when you need custom multi-agent topologies, complex cycles, or fine-grained state control.
Is LangChain still relevant in 2026?
Yes. After a rough patch in 2023–2024 around stability and abstractions, the v1.0 release in late 2025 addressed most of the criticism: a smaller core, deprecated legacy APIs, a real agent runtime in LangGraph, and a stable API contract. It remains the most popular starting point for LLM apps and integrates with virtually every model provider and vector store.
Does LangChain support both Python and JavaScript?
Yes. LangChain Python and LangChain.js both reached 1.0 together in October 2025 with feature parity for the core APIs — chat models, tools, create_agent, structured output, and LangGraph integration. Most production apps use Python on the backend; JS/TS is common for Node and edge deployments.
Is LangChain free?
Yes — the LangChain library itself is open-source under the MIT license and free to use. You pay for the LLM API calls (OpenAI, Anthropic, etc.), any managed vector store, and optionally LangSmith (the observability/evals product) or LangGraph Platform (managed deployment), which have free tiers and paid plans.
What language is LangChain written in?
There are two official implementations: LangChain (Python) and LangChain.js (TypeScript/JavaScript). They share the same concepts and a largely identical API. Pick the one that matches your backend stack.
Should I upgrade from LangChain v0.x to v1.0?
For new projects, yes — start on v1.0. For existing v0.x projects, plan a staged migration: the official guide maps every deprecated symbol to its v1.0 replacement (LLMChain → LCEL Runnables, AgentExecutor → create_agent on LangGraph, Memory classes → LangGraph checkpointer). If you can't migrate immediately, the v0.3 LTS branch and the langchain-classic package keep old code running until v2.0.
How does LangChain compare to LlamaIndex?
LangChain is broader — agents, tools, orchestration, plus RAG. LlamaIndex is deeper on the data side — best-in-class document parsers, indexing strategies, and query engines. Many teams use both: LlamaIndex for the retrieval layer and LangChain (or LangGraph) for the agent and orchestration layer.
Conclusion
LangChain has firmly established itself as the default framework for LLM application development, and the v1.0 release in late 2025 addressed most of the criticism that piled up during its rapid-growth years. The core is smaller, the legacy chains and AgentExecutor are gone, and the new create_agent factory on top of LangGraph gives you durable, streamable, observable agents out of the box. Combined with LangSmith for evals and tracing, you finally have a stack that’s serious about production.
Building on that stack inside a mobile application is still a real engineering problem — performance, security, scalability, and modularity all matter — and that’s where an experienced partner pays for itself.
Ready to ship a LangChain-powered product?
We design and build production LLM apps on LangChain v1.0, LangGraph, and LangSmith — from RAG pipelines to multi-agent workflows to polished mobile experiences. Talk to our AI engineering team.