Packages

@langchain/react

1.3.0 · 17 Nov 2026MIT154.8k / weekRepositoryHomepagenpmAtom feed

Your version

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

  1. 1.3.0

    17 Nov 2026
    • useStream accepts stateKeys, the values keys your UI reads. Opening a thread then sends select on GET /threads/{thread_id}/state for those keys, the messages key, and the top-level fields the hook reads itself, so the server can skip the rest of the state. stream.values contains only those keys plus the messages key, after loading and while a run streams, including on a server that ignores select. A custom adapter's getState receives { select }, and HttpAgentServerAdapter forwards it. Without stateKeys, nothing changes.

  2. 1.2.11 – 1.2.144 releases that only update dependencies@langchain/langgraph-sdk 1.16.0Show each
  3. 1.2.10

    4 Nov 2026
    • Effects replayed by StrictMode, Fast Refresh or <Activity> no longer run a pending headless tool twice in useStream; the hook now forgets which tool calls it ran only when the threadId option changes.

  4. 1.2.1 – 1.2.99 releases that only update dependencies@langchain/langgraph-sdk 1.12.9Show each
  5. 1.2.0

    25 Sep 2026
    • useStream's "enqueue" multitask strategy can now be backed by real, durable server-side runs instead of an in-memory client-only queue.

      Pass queue: "server" to opt in; it defaults to "local", so existing usage is unaffected. "server" requires the backend behind apiUrl to implement the Runs REST endpoints (POST/GET /threads/{thread_id}/runs, POST /threads/{thread_id}/runs/{run_id}/cancel), not just streaming/commands. Queued submissions then persist across reloads and are visible to other sessions, and cancelQueued/clearQueue cancel them server-side too.

      Not supported with a custom AgentServerAdapter transport — queue only applies to the built-in transport.

  6. 1.1.1 – 1.1.22 releases that only update dependencies@langchain/langgraph-sdk 1.11.2Show each
  7. 1.1.0

    12 Sep 2026
    • Expose connection lifecycle callbacks for built-in streaming transports.

      onConnected runs after the initial SSE or WebSocket connection becomes usable and after every successful reconnect. Its payload distinguishes an initial connection from a reconnected connection and includes the reconnect attempt number.

      onReconnect now also receives the scheduled delayMs, allowing applications to display accurate retry state before the next connection attempt. React, Vue, Svelte, and Angular stream hooks forward both callbacks.

  8. 1.0.35

    4 Sep 2026
    • sdk: Keep stream.interrupts truthful after sequential multi-interrupt resume

  9. 1.0.31 – 1.0.333 releases that only update dependencies@langchain/langgraph-sdk 1.10.0Show each
  10. 1.0.30

    11 Aug 2026
    • sdk: Resolve respond() namespace from interrupt id

      When callers pass { interruptId } without namespace, look the
      namespace up on thread.interrupts instead of defaulting to root.

  11. 1.0.28 – 1.0.292 releases that only update dependencies@langchain/langgraph-sdk 1.9.28Show each
  12. 1.0.27

    15 Jul 2026
    • sdk: Keep SSE reconnect enabled with custom fetch

      Auth/proxy fetch shims previously forced maxReconnectAttempts: 0, so HITL waits that lost /stream/events (e.g. ERR_QUIC_PROTOCOL_ERROR) never recovered and left respond()/submit() spinning. Fail-fast test mocks should pass maxReconnectAttempts: 0 explicitly. Also plumbs reconnect options through framework useStream bindings.

  13. 1.0.26

    25 Jun 2026

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

  14. 1.0.25

    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.

  15. 1.0.23 – 1.0.242 releases that only update dependencies@langchain/langgraph-sdk 1.9.23Show each
  16. 1.0.22

    11 Jun 2026
    • stream: Add per-event side-effect selector

      Add useChannelEffect (React/Svelte/Vue) / injectChannelEffect (Angular), a side-effect counterpart to useChannel that invokes an onEvent callback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the old onLangChainEvent / onCustomEvent callbacks for analytics and logging. Backed by a new framework-agnostic acquireChannelEffect helper in @langchain/langgraph-sdk/stream that shares a ref-counted subscription with matching useChannel consumers.

  17. 1.0.21

    10 Jun 2026
    • Make AnyStream a true supertype so selector hooks need no cast

      A concrete useStream<typeof agent>() handle was not assignable to
      AnyStream because generic-computed covariant members (toolCalls,
      values) don't widen under any — InferToolCalls<any> resolves to
      AssembledToolCall<…, never>, narrower than a concrete handle. Override
      those members with their widest forms (preserving each framework's
      reactivity wrapper — plain arrays for React/Svelte, ShallowRef for Vue,
      Signal for Angular) so the message/tool/value selector hooks accept a
      fully-typed stream without an as AnyStream cast.

  18. 1.0.20

    9 Jun 2026
    • sdk: Hydrate custom HttpAgentServerAdapter via transport getState

      StreamController now prefers adapter getState() before client.threads.getState,
      HttpAgentServerAdapter implements GET /threads/:id/state, and useStream inherits
      apiUrl from the transport so hydration no longer defaults to localhost:8123.

  19. 1.0.19

    8 Jun 2026

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

  20. 1.0.18

    6 Jun 2026
    • sdk: Resume useChannel subscriptions across serial runs

      Enable resumeOnPause on the channel projection so useChannel keeps
      accumulating events across prompts on the same thread. Clarify selector
      docs and JSDoc: useChannel for the full event stream, useExtension
      for the latest payload.

  21. 1.0.17

    5 Jun 2026
    • sdk: Revive automatic optimistic submit echo

      Echo submit() input into values / messages immediately with client-side
      id minting and id-based reconciliation as the server streams back. Expose
      per-message optimisticStatus via message metadata (pending → sent /
      failed), shallow-merge non-message keys with rollback when no values
      arrive, and add an optimistic: false hook opt-out. Plumb through React,
      Vue, Svelte, and Angular with browser e2e coverage.

    • sdk: Reconcile subagents and subgraphs on thread reconnect

      Seed deep-agent subagent cards from checkpoint messages and subgraph hosts from a single bounded getHistory read during hydrate(), so parallel fan-out discovery reappears immediately on refresh instead of waiting for SSE replay. Subagent execution namespaces are promoted through the existing guarded discovery state machine (bulk at hydrate, lazily per opened card via the selector layer). The getHistory cost is O(1) in requests regardless of fan-out width.

  22. 1.0.13 – 1.0.164 releases that only update dependencies@langchain/langgraph-sdk 1.9.16Show each
  23. 1.0.12

    2 Jun 2026
    • sdk: Route headless tool resumes through respond on v1 stream

      useStream was calling submit(null, { command }) for headless-tool resumes,
      which dispatches run.start without delivering the tool result. Add
      applyHeadlessToolResumeCommand to route payloads through respond /
      respondAll, and tighten headless-tool browser tests to assert end-to-end
      resume and graph completion.

  24. 1.0.11

    1 Jun 2026

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

  25. 1.0.10

    29 May 2026
    • protocol-v2: Add respondAll() and run config/metadata on interrupt resume

      The stream controller (and the React/Angular/Svelte/Vue wrappers) gain a
      respondAll(responsesById, options) method to resume several interrupts
      pending at the same checkpoint in a single command — required for runs that
      pause on multiple interrupts at once (e.g. parallel tool-authorization
      prompts), which sequential respond() calls cannot handle.

      respond() now takes an options object ({ interruptId?, namespace?, config?, metadata? }) so a resumed run can carry the same run-level config
      (model, user context, …) and metadata (trigger source, test flags, …) a
      fresh submit() would. The protocol-v2 reference servers read the new
      responses batch and config / metadata fields leniently and fold them
      onto the run that services the input.respond command.

  26. 1.0.9

    27 May 2026

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

  27. 1.0.8

    27 May 2026
    • sdk: Cancel runs on stop by default and add disconnect()

      stream.stop() now calls client.runs.cancel for the active run before disconnecting the client (default { cancel: true }). Join/rejoin UIs can call stream.disconnect() or stop({ cancel: false }) to leave the agent running server-side.

      This fills a missing gap we found when migrating to v1.

  28. 1.0.7

    26 May 2026
    • sdk: Unwrap Command tool outputs and hide scoped task tools

      Filter wrapper task dispatch events from subagent-scoped tool-call
      projections and parse embedded ToolMessage results from LangGraph
      Command payloads on tool-finished.

  29. 1.0.6

    25 May 2026
    • sdk: Clear subgraph and subagent discovery on thread swap

      Reset discovery stores in StreamController.#teardownThread() so starting a
      new thread does not leave stale subgraph cards or subagent entries from the
      previous run.

  30. 1.0.5

    22 May 2026
    • stream: Align AssembledToolCall typing with pre-v1 expectations

      Make InferToolCalls resolve to generic AssembledToolCall unions, expose
      sync status/error for reactive bindings, and align type tests across
      React, Vue, Svelte, and Angular SDK packages.

  31. 1.0.4

    19 May 2026

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

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.