Install
npm install @langchain/langgraphStateful, graph-based agents for TypeScript — StateGraph, createAgent and middleware, interrupts, Send and Command, streaming, persistence and production.
TypeScript port of LangGraph. Same graph-based mental model as the Python version — explicit state, durable checkpoints, conditional routing — with type-safe streaming, Zod/Standard Schema state, and ReducedValue/UntrackedValue field types. Ready-made agents come from createAgent in the langchain package.
Current version: @langchain/langgraph 1.7.4 (checked 2026-11-19). Node 20+.
Install
npm install @langchain/langgraphBest for
Cycles, conditional routing, multi-agent coordination, streaming servers.
@langchain/core 1.3.0: tool-call arguments stream as tool-call-delta slices instead of block-delta snapshots (see Other additions). @langchain/langgraph is unchanged at 1.7.4.DeltaChannel, exit durability, interrupt resumption and node-cache persistence. No API removals.timeout (NodeTimeoutError) and errorHandler; StateGraph.setNodeDefaults() for graph-wide retryPolicy/cachePolicy; cooperative draining with RunControl/GraphDrained; DeltaChannel (beta); RemoteGraph v3 streaming (1.4.0); GraphCallbackHandler for interrupt and resume events (1.4.17).STREAM_EVENTS_V3_MODES; createGraphRunStream/GraphRunStream/SubgraphRunStream; stream transformers (createLifecycleTransformer, createMessagesTransformer, createSubgraphDiscoveryTransformer, createValuesTransformer).Overwrite for bypassing a reducer.StateSchema, ReducedValue and UntrackedValue, with Standard Schema support (Zod 4, Valibot, ArkType) and the schema utilities isSerializableSchema, isStandardSchema, getJsonSchemaFromSchema, getSchemaDefaultGetter.See the comprehensive guide for details.
npm install @langchain/langgraph@1.7.4 @langchain/coreimport { StateGraph, MessagesAnnotation, START, END, MemorySaver } from '@langchain/langgraph';import { AIMessage, HumanMessage } from '@langchain/core/messages';
const graph = new StateGraph(MessagesAnnotation) .addNode('respond', async (state) => ({ messages: [new AIMessage(`You said: ${state.messages.at(-1)?.content}`)], })) .addEdge(START, 'respond') .addEdge('respond', END) .compile({ checkpointer: new MemorySaver() });
const result = await graph.invoke( { messages: [new HumanMessage('Hello')] }, { configurable: { thread_id: 'session-1' } });console.log(result);Ready? Start Zero → Hero Step 1 →
| Date | Version | Changes |
|---|---|---|
| 2026-10-25 | 1.5.2 | Checked against @langchain/core 1.3.0 and langchain 1.5.19: install lines resolve, examples type-check under strict; added a note on tool-call-delta streaming. |
| 2026-10-25 | 1.5.2 | Release notes rebuilt from the published packages (StateSchema and Standard Schema arrived in 1.1.0, Overwrite in 1.2.0); the per-node tracePolicy claim removed (no released JS version has it). Observability page rewritten with tested callback, GraphCallbackHandler, "tasks" stream and OpenTelemetry examples; middleware page gained custom hooks, execution order and a built-ins table; Express page gained token streaming per thread and a working container build; RunControl draining and DeltaValue examples added. Fixed the claim that interrupt() works without a checkpointer (it throws). |
| 2026-10-21 | 1.5.2 | Examples type-check under strict (chained builders, typed addSequence steps); recommended tsconfig fixed; @langchain/community removed. New page for interrupts, Command, Send, subgraphs, the Functional API and time travel; production guide rewritten around checkpointers, node policies, testing with fakeModel and the LangGraph CLI; invented type-hierarchy diagram replaced. |
| 2026-10-21 | 1.5.2 | Brought up to date with @langchain/langgraph 1.5.2 (from 1.3.5); current version now comes from the site’s version data. Removed the @langgraphjs/toolkit recommendation (that package is an npm security placeholder); agents now use createAgent from langchain. Fixed invented APIs and broken examples across the comprehensive guide, recipes, production guide, middleware and streaming pages (see the comprehensive guide’s revision history). Symbols and examples checked by installing the packages and running the key snippets. |
| 2026-04-21 | 1.2.9 | Index redesigned with Zero → Hero + Jump-to-topic grid. |
| April 19, 2026 | 1.2.9 | Standard JSON Schema; new type utilities. |
| November 2025 | 1.0.2 | Initial TypeScript guide. |
Note: Python implementation lives at LangGraph (Python).