Skip to main content

Documentation Index

Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-nhuses-1778700384-2b3c094.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

LangGraph v1 is a stability-focused release for the agent runtime. It keeps the core graph APIs and execution model unchanged, while refining type safety, docs, and developer ergonomics. It’s designed to work hand-in-hand with LangChain v1 (whose createAgent is built on LangGraph) so you can start high-level and drop down to granular control when needed.

Stable core APIs

Graph primitives (state, nodes, edges) and the execution/runtime model are unchanged, making upgrades straightforward.

Reliability, by default

Durable execution with checkpointing, persistence, streaming, and human-in-the-loop continues to be first-class.

Seamless with LangChain v1

LangChain’s createAgent runs on LangGraph. Use LangChain for a fast start; drop to LangGraph for custom orchestration.
To upgrade,
npm install @langchain/langgraph @langchain/core
For a complete list of changes, see the migration guide.

Deprecation of createReactAgent

The LangGraph createReactAgent prebuilt has been deprecated in favor of LangChain’s createAgent. It provides a simpler interface, and offers greater customization potential through the introduction of middleware.

Typed interrupts

StateGraph now accepts a map of interrupt types in the constructor to more closely constrain the types of interrupts that can be used within a graph.
import { StateGraph, MemorySaver, interrupt } from "@langchain/langgraph";
import * as z from "zod";

const stateSchema = z.object({
  foo: z.string(),
})

const graphConfig = {
  interrupts: {
    // Define a simple interrupt that accepts a reason and returns messages
    simple: interrupt<{ reason: string }, { messages: string[] }>, 
    // Define a complex interrupt with the same signature
    complex: interrupt<{ reason: string }, { messages: string[] }>, 
  }
}

const checkpointer = new MemorySaver();

const graph = new StateGraph(stateSchema, graphConfig)
  .addNode("node", async (state, runtime) => {
    // Trigger the simple interrupt with a reason
    const response = runtime.interrupt.simple({ reason: "test" });
    // Return the interrupt response as the new state
    return { foo: response };
  })
  // Compile the graph with the checkpointer
  .compile({ checkpointer });

// Invoke the graph with initial state
const result = await graph.invoke({ foo: "test" });

// Access the interrupt data
if (graph.isInterrupted(result)) {
  console.log(result.__interrupt__.messages);
}
For more information on interrupts, see the Interrupts documentation.

Frontend SDK enhancements

LangGraph v1 comes with a few enhancements when interacting with a LangGraph application from the frontend.

Event stream encoding

The low-level toLangGraphEventStream helper has been removed. Streaming responses are now handled natively by the SDK, and you can select the wire format via passing in the encoding format to graph.stream. This makes switching between SSE and normal JSON responses straightforward without changing UI logic. See the migration guide for more information.

useStream v1 in @langchain/{react,vue,svelte,angular}

@langchain/react, @langchain/vue, @langchain/svelte, and @langchain/angular v1 rebuild useStream on a v2-native streaming protocol. The hook moved out of @langchain/langgraph-sdk/react and into framework-specific packages, and most of the new surface area ships as companion selector hooks (or framework-equivalent composables/injectables) that subscribe only while a component is mounted.
v1 is a breaking release. The new protocol requires langgraph-api>=0.9.0rc1 on the server and bundles @langchain/langgraph-sdk>=1.9.0 as a dependency (installed automatically). If you can’t upgrade the server yet, pin to the pre-v1 release of your frontend package (@langchain/react@0.3, @langchain/vue@0.4, @langchain/svelte@0.4, or @langchain/angular@0.4).
Highlights:
  • Always-on root projections. values, messages, toolCalls, and interrupts are live on the root return without extra wiring or stream-mode configuration.
  • Selector hooks for namespaced data. useChannel, useExtension, useMessageMetadata, useSubmissionQueue, and per-subagent selectors open ref-counted subscriptions on mount and release them on unmount, so namespaced data only streams to components that need it.
  • Automatic re-attach. The session-based transport reconnects on remount; no more reconnectOnMount / joinStream dance.
  • Multimodal media streams. Built-in assembly for audio, images, video, and files via useAudioPlayer, useVideoPlayer, useMediaURL, and matching selectors.
  • Suspense and Error Boundary integration. useSuspenseStream hands the initial hydration phase to <Suspense> and surfaces non-streaming errors to Error Boundaries.
  • Pluggable transports. Implement AgentServerAdapter to route streaming traffic over a custom backend, WebSocket, or proxy without changing UI code.
  • Strongly typed agent inference. useStream<typeof agent>() unwraps state, tool calls, and subagent state maps directly from the agent’s type, including custom state keys and headless tools.
import {
  useStream,
  useSubmissionQueue,
  useSuspenseStream,
} from "@langchain/react";

function Chat() {
  const stream = useStream<typeof agent>({
    apiUrl: "http://localhost:2024",
    assistantId: "agent",
  });

  // Always-on projections from the root.
  const { messages, toolCalls, interrupts } = stream;

  // Scoped selector — opens a subscription only while this component is mounted.
  const queue = useSubmissionQueue(stream);
}
Vue exposes the same data through composables (provideStream, useStreamContext, selector composables); Angular ships matching helpers (injectStream, provideStream, injectProjection, selector injectables). See the LangChain frontend overview for end-to-end patterns and the per-framework package README for the full surface.

Reporting issues

Please report any issues discovered with 1.0 on GitHub using the 'v1' label.

Additional resources

LangGraph 1.0

Read the announcement

Overview

What LangGraph is and when to use it

Graph API

Build graphs with state, nodes, and edges

LangChain Agents

High-level agents built on LangGraph

Migration guide

How to migrate to LangGraph v1

GitHub

Report issues or contribute

See also