Skip to main content
This guide outlines changes in LangGraph v1 and how to migrate from previous versions. For a high-level overview of what’s new, see the release notes. To upgrade,
npm install @langchain/langgraph@next @langchain/core@next

Summary of changes

AreaWhat changed
React prebuiltcreateReactAgent deprecated; use LangChain createAgent
InterruptsTyped interrupts supported via interrupts config
toLangGraphEventStream removedUse graph.stream with the desired encoding format
useStreamSupports custom transports

Deprecation: createReactAgentcreateAgent

LangGraph v1 deprecates the createReactAgent prebuilt. Use LangChain’s createAgent, which runs on LangGraph and adds a flexible middleware system. See the LangChain v1 docs for details:
import { createAgent } from "langchain";

const agent = createAgent({
  model,
  tools,
  systemPrompt: "You are a helpful assistant.", 
});

Typed interrupts

You can now define interrupt types at graph construction to strictly type the values passed to and received from interrupts.
import { StateGraph, interrupt } from "@langchain/langgraph";
import * as z from "zod";

const State = z.object({ foo: z.string() });

const graphConfig = {
  interrupts: {
    approve: interrupt<{ reason: string }, { messages: string[] }>(),
  },
}

const graph = new StateGraph(State, graphConfig)
  .addNode("node", async (state, runtime) => {
    const value = runtime.interrupt.approve({ reason: "review" }); 
    return { foo: value };
  })
  .compile();
See Interrupts to learn more.

Event stream encoding

The low-level toLangGraphEventStream helper is removed. Streaming responses are handled by the SDK; when using low-level clients, select the wire format via an encoding option passed to graph.stream.
const stream = await graph.stream(input, {
  encoding: "text/event-stream",
  streamMode: ["values", "messages"],
});

return new Response(stream, {
  headers: { "Content-Type": "text/event-stream" }, 
});

Breaking changes

Dropped Node 18 support

All LangGraph packages now require Node.js 20 or higher. Node.js 18 reached end of life in March 2025.

New build outputs

Builds for all langgraph packages now use a bundler based approach instead of using raw typescript outputs. If you were importing files from the dist/ directory (which is not recommended), you will need to update your imports to use the new module system.
I