cloudparts

LangChain

An MIT-licensed Python and JavaScript framework whose create_agent runs the model and tool-calling loop for you, with one interface over many model providers and middleware hooks around every step.

Type
Open source
Made by
LangChain Inc.
License
MIT
Facts checked
13 October 2026

What it is

Since version 1.0 (October 2025) LangChain is built around one call, create_agent: you give it a model, a list of tools and a system prompt, and it runs the loop. The model is sent the conversation and the tool schemas; if it answers with tool calls, the agent runs those tools, appends the results to the message list and calls the model again, until a reply has no tool calls. A model is named by a string such as "openai:gpt-5.5" or "claude-sonnet-4-6", and partner packages such as langchain-openai and langchain-anthropic translate LangChain’s standard messages and content blocks (text, reasoning, citations, tool calls) to and from each provider’s API, so swapping providers is mostly a one-line change.

What create_agent returns is a compiled LangGraph graph, so a LangChain agent inherits LangGraph’s checkpointing, streaming and human-in-the-loop pauses, and can be dropped into a larger graph as one node. Customization goes through middleware: hooks that run before and after each model and tool call. Built-in middleware covers summarizing old messages near the context limit, pausing for human approval of a tool call, redacting PII, retries, fallbacks and call limits. MCP tools load through langchain.mcp (built on FastMCP, in beta since 1.4.0 in September 2026). For RAG, its Document type, embeddings and vector store integrations let you index chunks and wrap a store as a retriever the agent can call. Everything is free and open source; LangChain Inc. makes money from LangSmith, its closed-source platform for tracing, evaluation and hosting agents.

Why teams pick it

  • A short path to a working tool-calling agent: one create_agent call, with the same code running against OpenAI, Anthropic, Google, Bedrock, Ollama and other providers
  • Middleware lets you change prompts, tool choice, retries or approvals at each step without forking the agent loop
  • Runs on LangGraph, so durable execution, persistence and streaming come with it, and you can drop down to a custom graph when the loop isn’t enough
  • Semantic versioning since 1.0, with no breaking changes until 2.0 and at least a year of maintenance for 1.x after 2.0 ships

Watch out for

  • By the LangChain team’s own account, its abstractions were sometimes too heavy and its package surface had grown unwieldy; 1.0 moved the old chains and agents into langchain-classic, so many older tutorials no longer match the current API
  • Tracing, evaluation and managed deployment are in LangSmith, a separate paid product (the free Developer plan includes 5,000 base traces a month and one seat)
  • Many integrations are separate packages with their own versioning, and only partner packages maintained by LangChain promise semantic versioning
  • LangChain 0.3 receives only security and critical fixes, and only until December 2026

Alternatives

What all agent frameworks have in common →Compare side by side →

How it fits with other technologies

A tool-calling agent with create_agent (pip install -qU langchain "langchain[anthropic]") · python

from langchain.agents import create_agent

def get_weather(city: str) -> str:
    """Get weather for a given city."""
    return f"It's always sunny in {city}!"

agent = create_agent(
    model="claude-sonnet-4-6",
    tools=[get_weather],
    system_prompt="You are a helpful assistant",
)

result = agent.invoke(
    {"messages": [{"role": "user", "content": "What's the weather in San Francisco?"}]}
)
print(result["messages"][-1].content_blocks)

See it in a real stack

No architecture uses LangChain yet. Drop it into the playground and wire it up yourself.Open playground →
Where it came from2022–2026

LangChain shipped as a Python package on 24 October 2022, a month before ChatGPT. It had two parts: wrappers that hid the differences between LLM APIs, and “chains”, fixed sequences of steps such as retrieve-then-generate for RAG; the name comes from “Language” and “Chains”. ReAct-style agents followed in December 2022, a JavaScript version in January 2023, and LangChain Inc. was formed around the project in February 2023. As providers added chat message APIs and native function calling, LangChain changed its core to messages and to tool calling instead of parsing JSON from model text.

By 2024 developers wanted more control than the high-level chains gave them. The team built LangGraph as a lower-level orchestration library and, from late 2024, marked most chains and agents deprecated in favor of it. LangChain 1.0 on 20 October 2025 finished the turn: it replaced every chain and agent with a single agent abstraction built on LangGraph, added middleware for customization and standard content blocks for model output, and moved the old APIs to langchain-classic.

Why it’s built this way

Standardize model inputs and outputs across providers
Each provider has its own parameters and message formats. A standard interface lets developers switch to whichever model is best at the moment without rewriting the app, which the team saw as essential when the best model for a task changes often.
One agent built on LangGraph instead of many chains
Prebuilt chains were hard to customize once a use case diverged from them. Putting a single agent loop on top of LangGraph gave durable execution and human-in-the-loop support, and middleware gave control over each step without dropping to raw LLM calls.
Integrations split out of the core package
By mid-2024 LangChain had over 700 integrations. Moving them into standalone partner packages or langchain-community kept the core small and let each integration version on its own.

Timeline

  1. 2022

    LangChain v0.0.1 released as a Python package in October

  2. 2023

    JavaScript version released; LangChain Inc. formed around the project

  3. 2024

    Version 0.1.0, the first release past 0.0.x, in January

  4. 2024

    Over 700 integrations, split out into separate packages

  5. 2025

    LangChain 1.0: create_agent on LangGraph, middleware and standard content blocks

  6. 2026

    Version 1.4 builds MCP support into langchain.mcp

Sources12 · facts checked 13 October 2026

Improve this page on GitHub