Packages

@langchain/langgraph

1.7.5 · 17 Nov 2026MIT5.2M / weekRepositoryHomepagenpmAtom feed

Your version

212 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 1.7.5

    17 Nov 2026
    • With a zod state schema, node updates and run input are validated with the cached partial schema instead of a new zod schema per update, which zod had to compile every time. A 50-step run on a 30-field zod state is 1.65x faster.

    • The Pregel loop finds DeltaChannel and UntrackedValue channels once per run instead of scanning every channel on each task and step. A 1,000-node chain runs 1.37x faster.

    • messagesStateReducer does less work per update on a long history: it rules out message chunks with a native prototype check first, looks up only the ids the update touches, and skips the removal pass when nothing is removed. A call on 2,000 messages is 4x faster.

  2. 1.7.4

    12 Nov 2026

    Only updates a dependency:@langchain/langgraph-sdk 1.16.0

  3. 1.7.3

    10 Nov 2026
    • Match whole namespace segments in getSubgraphs and getSubgraphsAsync, so a namespace such as research_review no longer also yields research|review, and yield a namespace's subgraph once when a node declares several subgraphs

    • Stop the run when a consumer breaks out of a for await loop over graph.stream() or graph.streamEvents(), or cancels the stream's reader. Only an explicit stream.cancel() aborted the run before; breaking out of the loop left the remaining nodes running in the background.

  4. 1.7.2

    7 Nov 2026
    • getState and getStateHistory report the result of a task that was interrupted and then resumed. The task's interrupt write stays on the checkpoint after it finishes, and that hid the result, so a node with human-in-the-loop never showed what it returned in history. A task that failed after writing some output now reports that output as its result too, as in Python. A task still paused at an interrupt keeps result: undefined.

  5. 1.7.1

    6 Nov 2026
    • langgraph: Add isUnknownInterruptError, which matches the error by name like isGraphInterrupt, so it also recognizes an UnknownInterruptError thrown by another copy of @langchain/langgraph

    • Task results in the tasks and debug stream modes carry the task's error (null when it succeeded), as they do in Python, so a failed task no longer looks completed.

  6. 1.7.0

    5 Nov 2026
    • langgraph: Give each interrupt() in a task its own id

      An interrupt raised after its task already got answers now gets its own id: the namespace hash plus the answer count. A task's first question keeps its id, and strict resume refuses an answer retried after a node asked its next question. Ids saved by older versions still answer: when a resume map has no entry for the task's next interrupt, the first id is used. A node retried by its retry policy now reuses its task's answers instead of asking again.

    • langgraph: Add a strict resume mode that refuses stale interrupt answers

      With the private configurable key __pregel_strict_resume set, the root graph throws UnknownInterruptError before writing anything when a Command({ resume }) names an interrupt that isn't pending, is an empty map, or is one value while several interrupts are pending. The error's reason (not_pending, empty_map or ambiguous) says which, with the interrupt ids involved in interruptIds and pendingIds. Without the key, resuming behaves as before.

      A task that raises several interrupts at once, such as a subgraph with parallel interrupts, now keeps all of them; before, only the last one was saved. Command({ resume: false }) and other falsy resume values now reach interrupt() instead of throwing EmptyInputError.

  7. 1.6.1

    4 Nov 2026
    • Restore per-node tracePolicy, using @langchain/core's TracePolicy (requires @langchain/core >= 1.3.4). It only changes what LangChainTracer sends to LangSmith; execution, streaming, and other callbacks see raw values.

  8. 1.6.0

    30 Oct 2026
    • langgraph: Give messages and tools events the namespace of the graph that ran them

      messages and tools stream events now carry the namespace of the graph that ran them:

      streamEvents with version: "v3" is unchanged.

    • langgraph: Keep every message a node returns in messages stream mode

      streamEvents with version: "v3" is unchanged.

    • langgraph: Route a RemoteGraph's subgraph events like a local graph's when it streams inside a node

      When a node streams a RemoteGraph and its parent graph is streamed with subgraphs: true:

  9. 1.5.3

    26 Oct 2026
    • Change the default DeltaChannel snapshot frequency from 1000 to 100 updates, matching Python. Channels now persist full snapshots more frequently to reduce replay latency at the cost of increased storage. Set snapshotFrequency: 1000 explicitly to retain the previous cadence.

  10. 1.5.2

    21 Oct 2026
  11. 1.5.1

    16 Oct 2026
    • A field that changes from a DeltaChannel to a plain reducer, for example to MessagesAnnotation, keeps its value on threads written under the DeltaChannel: reads rebuild it from the stored writes instead of returning the empty default, and the next run adds to it instead of replacing it.

    • With durability: "exit", resuming parallel interrupts one at a time no longer applies a finished task's output twice: the save at exit keeps only the writes made during that run, instead of storing the ones loaded with the checkpoint again under new indexes.

    • When one answer in a multi-answer resume fails its interrupt's responseSchema, the other tasks in the step now finish before the ZodError is thrown, instead of being aborted. A task aborted after its side effects kept its answer and ran again on the next resume. The error is unchanged, and the new isInvalidResume(error) tells it apart from other errors, as is_invalid_resume does in langgraph (Python).

  12. 1.5.0

    12 Oct 2026
    • Order parallel writes by task path, like langgraph (Python) — one sort key for live execution and every saver, instead of the task-id order #2544 added for DeltaChannel writes

      When two or more tasks in one superstep write the same DeltaChannel, their writes are now applied and replayed in (task_path, task_id, idx) order — the order Python's langgraph#8544 established — instead of task-id order. Task ids are uuid5 hashes that include the checkpoint id, so the old order permuted parallel writers from run to run and disagreed with Python.

      Upgrade notes:

    • A node served from the node cache now saves its writes like a node that ran. They were applied but never saved, so a DeltaChannel read back without them once the state was loaded again, under every durability. A cache hit is still streamed as cached and isn't written back to the cache.

    • An exit-durability run that starts from a checkpoint the thread has moved past, addressed by checkpoint_id, no longer stores its DeltaChannel writes on that checkpoint, where the branch that already grew from it read them too. The run now snapshots the channels it wrote instead.

  13. 1.4.21

    7 Oct 2026
    • Breaking

      langgraph: isCommand no longer accepts plain objects, so JSON graph input shaped like { lg_name: "Command", goto, update } is treated as ordinary state input instead of a control directive. Command instances, including ones built by another installed copy of @langchain/langgraph, are still recognized. To pass a command as input, construct it with new Command(...).

    • Breaking

      langgraph: Require @langchain/langgraph-sdk 1.12.3 or later.

  14. 1.4.20

    6 Oct 2026
    • Give each update of a multi-update bulkUpdateState super-step its own task id, so a DeltaChannel keeps every update instead of only the first

    • Don't ask the checkpointer for the history of a DeltaChannel that was never written; it is empty, and the walk for it read every ancestor of the thread on every load. Only checkpoints whose metadata has delta_writes_versioned skip it: graphs with a DeltaChannel set it on new threads, where every DeltaChannel write has a version, so threads started by earlier versions keep reading as before. updateState now versions the writes it takes from the head, which also stops PostgresSaver from dropping them, and keeps the DeltaChannel writes it makes on a new thread.

    • Exit durability no longer saves a checkpoint as its own parent when a run ends without running anything, such as replaying the newest checkpoint of a finished thread; with a DeltaChannel, reading such a thread crashed

  15. 1.4.19

    3 Oct 2026
    • Read a subgraph's DeltaChannel with the checkpointer the parent resolved, instead of hydrating it empty; hydrating a written DeltaChannel without a checkpointer or config now throws instead of returning an empty value; state methods resolve the checkpointer the way a run does, so a checkpointer: false graph no longer writes state with a checkpointer lent through the config and has no task state in getState, and a checkpointer: true graph used as a root rejects state methods with the run's error; getState, getStateHistory and updateState use a checkpointer: true subgraph's namespace as its run stores it, so reads find its state and updates are no longer lost; resuming from a subgraph checkpoint returned by getState(config, { subgraphs: true }) now applies the resume value instead of re-firing the interrupt

  16. 1.4.18

    25 Sep 2026

    Only updates a dependency:@langchain/langgraph-sdk 1.12.0

  17. 1.4.17

    21 Sep 2026
    • Add GraphCallbackHandler with typed handleInterrupt and handleResume events through normal callback configuration, matching Python graph lifecycle behavior. Lifecycle callbacks are awaited before terminal chain callbacks and work independently of stream mode.

  18. 1.4.16

    18 Sep 2026
    • langgraph: Add responseSchema option to interrupt()

      interrupt(value, { responseSchema }) lets a graph declare the shape of the
      value it expects on resume. A Zod schema validates the resume value and the
      parsed result is what interrupt() returns; a raw JSON Schema object is passed
      through as-is. The schema is surfaced on Interrupt.response_schema so clients
      such as Studio can render a typed form instead of a free-form JSON editor.
      Omitting the option keeps today's behavior.

  19. 1.4.15

    12 Sep 2026
    • langgraph: Add per-node tracePolicy input/output processors and omitPayload

      Transform the payloads recorded on a node's own trace run while retaining its span and timing. Processors receive raw values and fall back to the original payload if they throw. Graph state, root runs, and child runs remain unchanged when processors do not mutate their arguments.

      Matches Python's callback-level behavior: transforms also affect chain events and message streaming, so omitting outputs can suppress messages returned directly by nodes and omitting inputs can affect message deduplication.

  20. 1.4.14

    4 Sep 2026
    • langgraph: pushMessage emits on the streamEvents v3 messages channel

  21. 1.4.13

    26 Aug 2026

    Only updates a dependency:@langchain/langgraph-sdk 1.10.0

  22. 1.4.12

    19 Aug 2026
    • Update checkpoint integrations to require the patched checkpoint serializer release.

  23. 1.4.11

    19 Aug 2026
    • langgraph: Dedupe merged callback handlers by identity

      mergeCallbacks concatenated handlers and inheritableHandlers while
      deduping tags, so a handler inherited by both the ambient and the explicit
      config picked up an extra registration at every graph boundary. With tracing
      on, a nested streamMode: "messages" run delivered every token twice.

  24. 1.4.10

    14 Aug 2026
    • langgraph: Keep context values out of tracer-derived metadata

  25. 1.4.9

    3 Aug 2026
    • langgraph: Checkpoint Topic as a flat values list

      Match Python Topic checkpoints so Host JS graphs no longer put __pregel_tasks: [,] through the Python checkpointer. Keep reading legacy [seen, values] checkpoints for restore compatibility.

  26. 1.4.8

    15 Jul 2026
    • pregel: Wait for completed-superstep persistence with sync durability

  27. 1.4.7

    25 Jun 2026
    • langgraph: Drop unused zod-to-json-schema peer dependency

      Remove the vestigial zod-to-json-schema (and its peerDependenciesMeta/dev) declarations. JSON Schema generation now flows through @langchain/core's Zod v3/v4 interop (toJsonSchema), so the old zod-to-json-schema@^3.x peer (which pins zod@^3.24.1) is no longer needed and was the last source of install-time peer conflicts with Zod v4. Closes #1706.

  28. 1.4.6

    25 Jun 2026
    • langgraph: Emit valid UUIDs for exit-mode delta task_ids

      Exit-mode DeltaChannel writes used a step-prefixed synthetic task id that produced a 6-segment string Postgres rejects for checkpoint_writes.task_id uuid in LangGraph API. Embed the superstep in the first UUID group instead, matching langchain-ai/langgraph#8165.

  29. 1.4.5

    22 Jun 2026
    • sdk: Apply state update and goto alongside interrupt resume

      respond(decision, { update, goto }) now maps to LangGraph's
      Command(resume, update, goto), so a human-in-the-loop UI can commit a state
      update (e.g. push the interrupt card into state) in the same superstep as
      the resume — one checkpoint, no separate updateState write, no flicker.
      @langchain/langgraph-api forwards update/goto through input.respond,
      and @langchain/core message instances in update are serialized to dicts
      before transport, exactly like submit(). Bumps @langchain/protocol to
      ^0.0.18 for the Goto type.

      respond/respondAll also apply update optimistically (mirroring
      submit()): the pushed messages paint immediately, with stable ids minted so
      the resumed run's echo reconciles them in place. Without this the interrupt is
      cleared the instant respond() dispatches while the pushed card only reappears
      a server round-trip later — so the card would flicker in that gap. The
      optimistic state settles on the resumed run's terminal (pending → sent, or
      rolled back on a failure before any echo).

      User-initiated optimistic writes (submit() / respond() / respondAll()) now
      commit to the store synchronously, in the same tick as the triggering event,
      instead of being coalesced onto the next macrotask. This lets a framework render
      the pushed message in the same commit as any local UI state the caller flips
      alongside it (e.g. a HITL form swapping its inputs for the resolved card), so the
      card no longer blinks out for the one-macrotask window before the flush lands.
      High-frequency streaming writes keep their macrotask coalescing.

  30. 1.4.4

    17 Jun 2026
    • langgraph: Isolate concurrent singleton-agent invocations by thread

      ensureLangGraphConfig ignores the ambient AsyncLocalStorage configurable
      on root-level invokes that supply an invoke-time thread_id and have no nesting
      keys (ignoring graph-bound .withConfig() defaults). On a fresh top-level run
      the ambient configurable can belong to another concurrent invocation, so its
      keys — internal scratchpad/task-input as well as user keys like
      tenant_id/user_id — must not leak in; values the caller wants arrive through
      the explicit (bound + invoke-time) configs. Ambient nesting (__pregel_read__)
      and bound child graphs invoked from parent tasks are unaffected. This prevents
      cross-invocation leakage between concurrent invoke() calls on a shared compiled
      graph (e.g. BullMQ workers with concurrency > 1). Complements the config-merge
      fix that stopped shared graph-bound metadata/configurable objects from being
      mutated across invocations
      (#2040).

    • langgraph: Recognize JSON-erased Overwrite values across runtimes

      Overwrite already survives JSON serialization in JS because Overwrite.toJSON()
      emits the canonical { "__overwrite__": value } sentinel. _getOverwriteValue
      now additionally recognizes the discriminator form { "type": "__overwrite__", value } produced when a typed Overwrite from another runtime (e.g. a Python
      dataclass routed through the LangGraph API server) is serialized and its type is
      erased. This keeps Overwrite (and DeltaChannel) semantics intact across
      cross-runtime JSON boundaries. These delta-channel APIs remain Beta.

  31. 1.4.1

    11 Jun 2026
    • state: Validate Zod state updates from nodes

      Validate node return values and Command updates against Zod state schema
      constraints before applying them to graph state.

      Fixes #2519

    • ToolNode: Forward graph state to tools via runtime.state

      ToolNode now forwards its input to each tool through the second argument as runtime.state. When using ToolNode as a node in a LangGraph graph, this gives tools access to the current graph state for workflows that need tool-call support in LangGraph proper. Tools can type the second parameter as ToolRuntime<StateType> from @langchain/core/tools and read runtime.state directly. This works in every runtime, including web browsers, and removes the need for getCurrentTaskInput() (which relies on node:async_hooks/AsyncLocalStorage). getCurrentTaskInput(config) continues to work for backwards compatibility.

  32. 1.4.0

    10 Jun 2026
    • Add cooperative, between-superstep graph draining via RunControl.

      A new RunControl (exported from @langchain/langgraph) exposes
      requestDrain(reason) plus read-only drainRequested / drainReason. Pass it
      through the new control option on invoke / stream / streamEvents (and the
      functional API). It is surfaced on runtime.control, so nodes can read it or call
      requestDrain() themselves, and it is propagated into subgraphs.

      When a drain is requested, the Pregel loop checks the flag at the top of each
      superstep (after the previous step's writes are applied and checkpointed): if more
      tasks remain it saves the checkpoint and throws the new GraphDrained error (also
      under durability: "exit"), so the run can be resumed later from the same config.
      If the graph naturally finishes on that tick it returns normally and the caller can
      inspect control.drainRequested. A drain requested inside a subgraph bubbles up and
      stops the parent at its next boundary. Draining never cancels work that is already
      running — pair it with an AbortSignal if you need a hard upper bound.

    • Add DeltaChannel and the writes-history saver API (beta).

      DeltaChannel is a reducer channel that stores only a sentinel in checkpoint
      blobs instead of the full accumulated value, reconstructing state on read by
      replaying ancestor writes through a batch reducer. This avoids re-serializing
      the entire accumulated value at every step (e.g. long message histories).

      Reconstruction is wired through the Pregel read/execution paths (initialization,
      getState, updateState, local reads) and exit durability accumulates and
      anchors delta writes so threads remain reconstructible without forcing
      snapshots.

    • langgraph: Add node-level error handlers

      StateGraph.addNode(name, fn, { errorHandler }) now accepts a first-class
      node-level error handler. The handler runs ONLY after the failing node's
      retryPolicy is exhausted, so retry and handling stay decoupled. It receives a
      typed NodeError { node, error } and the typed node input state, can return a
      state update, and can route to a recovery branch via new Command({ goto })
      (saga / compensation flows).

      Failure provenance is checkpointed (via a reserved ERROR_SOURCE_NODE write) so
      handlers observe the same context after a checkpoint resume. Uncaught node
      errors without a handler still abort the run as before, and GraphBubbleUp
      errors (such as interrupt()) are never swallowed by a handler.

      StateGraph.setNodeDefaults({ errorHandler }) now also accepts a graph-wide
      default handler. It is materialized at compile() as a single shared handler
      and invoked for every regular node that does not set its own errorHandler. A
      per-node handler always takes precedence, the default never catches a failure
      raised by an error-handler node itself (handler failures fail the run), and the
      default is not inherited by subgraphs.

      Ports the Python feature from langchain-ai/langgraph#7233.

  33. 1.3.7

    8 Jun 2026
    • Add the @langchain/langgraph/stream entrypoint — a transport-agnostic backend toolkit for building custom servers on top of the v2 streaming protocol. Alongside the existing StreamChannel and convertToProtocolEvent, it exposes subscription primitives, typed against a minimal MatchableEvent shape so they work on both the core ProtocolEvent and the wire-level Event from @langchain/protocol:

  34. 1.3.6

    5 Jun 2026
    • langgraph: Forward named custom stream channels consistently

      Forward remote StreamChannel emissions as custom:<name> protocol events and normalize them back to custom-channel payloads in the API session. This aligns JavaScript stream-channel forwarding with the protocol subscription shape used by remote clients, so custom:<name> subscriptions receive extension channel data consistently.

  35. 1.3.5

    4 Jun 2026
    • core: Keep stream chunks as three-element tuples

      Emit lightweight checkpoint envelopes as separate
      [namespace, "checkpoints", envelope] chunks before paired values chunks.
      Public stream() always yields [namespace, mode, payload]; the v3
      protocol path surfaces envelopes via convertToProtocolEvent.

  36. 1.3.4

    2 Jun 2026
    • core: Prevent Zod schema defaults from overwriting checkpoint state in Command.update

  37. 1.3.3

    1 Jun 2026
    • Decouple ContextType generic from configurable in PregelOptions so that providing a custom context type no longer incorrectly narrows the configurable parameter.

    • langgraph: Pass context with stateful RemoteGraph runs

      Pop thread_id from run config.configurable and forward context to the SDK so checkpointed remote runs accept user context without a 400 from ambiguous parameters. Closes #1922.

    • Fix race condition in IterableReadableWritableStream.push() that caused ERR_INVALID_STATE errors when streaming with multiple parallel nodes and aborting the stream.

  38. 1.3.2

    19 May 2026
  39. 1.3.1

    18 May 2026
    • langgraph: Surface structuredResponse parse failures in createReactAgent

    • langgraph-core: Keep tool results out of v3 message streams

    • langgraph: Prefer configurable assistant and graph IDs for runtime server info

      Update runtime serverInfo construction to read assistant_id and graph_id from
      config.configurable first, with fallback to config.metadata for compatibility.
      Also expands execution_info tests to cover configurable sourcing, precedence,
      and metadata fallback behavior.

  40. 1.3.0

    5 May 2026
    • Add the in-process event streaming runtime behind streamEvents.

      LangGraph now exposes the core primitives for event-based streaming, including StreamChannel, StreamMux, GraphRunStream, SubgraphRunStream, native stream transformers, and protocol event conversion utilities. These APIs let graphs emit ordered protocol events, derive additional projections, expose custom stream channels, and bridge in-process runs to remote SDK clients.

      The runtime includes built-in transformers for messages, values, lifecycle events, and subgraph discovery. It also adds support for transformer registration during graph execution, forwarding remote StreamChannel output, subgraph-aware event routing, event log multiplexing, and checkpoint-aware values streams.

      This release also expands test coverage across Pregel streaming, event conversion, stream muxing, stream channels, run streams, lifecycle transformers, subgraph transformers, and type-level streaming behavior.

  41. 1.2.9

    16 Apr 2026
    • Propagate tracer metadata defaults from configurable

    • Export missing types for typescript 6.0 declaration file compatibility

  42. 1.2.8

    7 Apr 2026
    • Enhance runtime with executionInfo and serverInfo

  43. 1.2.7

    4 Apr 2026
    • sdk: Support for headless tools

  44. 1.2.6

    26 Mar 2026
    • Add browser support for interrupt, writer, and other Node-only exports

      Export interrupt, writer, pushMessage, getStore, getWriter, getConfig, getPreviousState, getCurrentTaskInput from web.ts and add a "browser" condition to the "." package export so browser bundlers resolve to web.js instead of pulling in node:async_hooks.

    • Revert abort signal change that was causing problematic errors

    • Clean up resolved checkpointer promises to reduce memory retention

  45. 1.2.5

    20 Mar 2026
    • core: Prevent AbortSignal listener leak in stream() and streamEvents()

      Pregel.stream() and streamEvents() called combineAbortSignals() but discarded the dispose function, leaking one abort listener on the caller's signal per invocation. Over many invocations this caused unbounded memory growth as each leaked listener retained references to its associated graph execution state.

    • Fix AnyValue.update() returning false instead of true when values are received, aligning with all other channel implementations.

  46. 1.2.4

    20 Mar 2026
    • sdk: Fetch subagent history

  47. 1.2.3

    17 Mar 2026
    • state: Merge jsonSchemaExtra in getInputJsonSchema()

  48. 1.2.2

    10 Mar 2026

    Only updates a dependency:@langchain/langgraph-sdk 1.7.0

  49. 1.2.1

    6 Mar 2026
    • Add explicit : symbol type annotations for cross-version compatibility

      TypeScript infers unique symbol type when Symbol.for() is used without an explicit type annotation, causing type incompatibility when multiple versions of the same package are present in a dependency tree. By adding explicit : symbol annotations, all declarations now use the general symbol type, making them compatible across versions while maintaining identical runtime behavior.

      Changes:

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.