Files
langgraphjs/libs/sdk-react
github-actions[bot] 1f11df2668 chore: version packages (#2364)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @langchain/angular@1.0.0

### Major Changes

- [#2314](https://github.com/langchain-ai/langgraphjs/pull/2314)
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)
Thanks [@christian-bromann](https://github.com/christian-bromann)! - Add
the Angular event streaming integration.

Angular applications can now build on the shared event streaming runtime
with
    `useStream`, `injectStream`, `StreamService`, `provideStream`,
`provideStreamDefaults`, `injectProjection`, and selector helpers for
messages,
values, tool calls, custom channels, extensions, media, message
metadata, and
submission queues. The integration supports thread switching, run
submission,
reattachment, interrupts, WebSocket and SSE/custom transports, headless
tools,
    subgraphs, subagents, and typed event projections.

    This release also adds Angular-specific media helpers, including
`injectMediaUrl` and selectors for audio, images, video, and files. The
package
now exports the shared stream, media, transport, headless-tool, and type
    inference types needed to compose strongly typed streaming UIs.

The documentation has been refreshed with guides for dependency
injection,
`injectStream`, selectors, transports, custom transports, interrupts,
submission queues, headless tools, subagents/subgraphs, type safety,
testing,
    and migration from the previous SDK surface.

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`d1e2fda`](https://github.com/langchain-ai/langgraphjs/commit/d1e2fda1b1165e122362780a62ab8d2ebff9f9b9)]:
    -   @langchain/langgraph-sdk@1.9.0

## @langchain/react@1.0.0

### Major Changes

- [#2314](https://github.com/langchain-ai/langgraphjs/pull/2314)
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)
Thanks [@christian-bromann](https://github.com/christian-bromann)! - Add
the React event streaming integration.

React applications can now use the shared event streaming runtime
through
`useStream`, `useProjection`, `useSuspenseStream`, `StreamProvider`, and
focused selector hooks for messages, values, tool calls, custom
channels,
extensions, media, message metadata, and submission queues. The new
integration
    supports thread-scoped runs, reattachment, interrupts, WebSocket and
SSE/custom transports, headless tools, subgraphs, subagents, typed
stream
    extensions, and strongly typed state/tool-call inference.

This release also adds media helpers for streaming UI experiences,
including
`useMediaURL`, `useAudioPlayer`, and `useVideoPlayer`, plus selectors
for
audio, images, video, and files. Shared transport, media, protocol
event,
message metadata, and discovery types are exported from the package so
React
components can compose richer streaming interfaces without deep imports.

    The package documentation and tests have been expanded around custom
transports, selectors, interrupts, multimodal streaming, suspense,
submission
queues, headless tools, subagents, type safety, and migration from the
previous
    streaming API.

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`d1e2fda`](https://github.com/langchain-ai/langgraphjs/commit/d1e2fda1b1165e122362780a62ab8d2ebff9f9b9)]:
    -   @langchain/langgraph-sdk@1.9.0

## @langchain/svelte@1.0.0

### Major Changes

- [#2314](https://github.com/langchain-ai/langgraphjs/pull/2314)
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)
Thanks [@christian-bromann](https://github.com/christian-bromann)! - Add
the Svelte event streaming integration.

Svelte applications can now use the shared event streaming runtime
through
`useStream`, `useProjection`, context helpers, and selector runes for
messages,
values, tool calls, custom channels, extensions, media, message
metadata, and
submission queues. The integration supports thread-scoped runs,
reattachment,
interrupts, WebSocket and SSE/custom transports, headless tools,
subgraphs,
subagents, typed stream extensions, and strongly typed state/tool-call
    inference.

This release also adds Svelte media helpers, including `useMediaURL`,
`useAudioPlayer`, and `useVideoPlayer`, plus selectors for audio,
images,
video, and files. Shared transport, media, protocol event, message
metadata,
and discovery types are exported from the package so Svelte components
can
    compose streaming interfaces without deep imports.

The package now includes focused documentation and tests for context,
custom
    transports, selectors, interrupts, hydration, submission queues,
subscriptions, headless tools, subagents, type safety, and migration
from the
    previous streaming API.

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`d1e2fda`](https://github.com/langchain-ai/langgraphjs/commit/d1e2fda1b1165e122362780a62ab8d2ebff9f9b9)]:
    -   @langchain/langgraph-sdk@1.9.0

## @langchain/vue@1.0.0

### Major Changes

- [#2314](https://github.com/langchain-ai/langgraphjs/pull/2314)
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)
Thanks [@christian-bromann](https://github.com/christian-bromann)! - Add
the Vue event streaming integration.

Vue applications can now use the shared event streaming runtime through
`useStream`, `useProjection`, `provideStream`, `useStreamContext`, and
selector composables for messages, values, tool calls, custom channels,
extensions, media, message metadata, and submission queues. The
integration
    supports thread-scoped runs, reattachment, interrupts, WebSocket and
SSE/custom transports, headless tools, subgraphs, subagents, typed
stream
    extensions, and strongly typed state/tool-call inference.

    This release also adds Vue media helpers, including `useMediaURL`,
`useAudioPlayer`, and `useVideoPlayer`, plus selectors for audio,
images,
video, and files. Shared transport, media, protocol event, message
metadata,
and discovery types are exported from the package so Vue components can
build
    rich streaming UIs without deep imports.

The package documentation and tests now cover API usage, custom
transports,
forking, interrupts, multimodal streaming, selectors, shared streams,
subagents, suspense, submission queues, transports, type safety, and
migration
    from the previous streaming API.

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`d1e2fda`](https://github.com/langchain-ai/langgraphjs/commit/d1e2fda1b1165e122362780a62ab8d2ebff9f9b9)]:
    -   @langchain/langgraph-sdk@1.9.0

## @langchain/langgraph-api@1.2.0

### Minor Changes

- [#2314](https://github.com/langchain-ai/langgraphjs/pull/2314)
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)
Thanks [@christian-bromann](https://github.com/christian-bromann)! - Add
the thread-scoped event streaming protocol used by the new SDK streaming
    clients.

This release adds protocol routes for WebSocket and SSE/HTTP streaming,
including thread-local command handling, filtered subscriptions, event
replay,
state inspection, checkpoint listing/forking, interrupt input, agent
tree
queries, and run start/resume commands. Stream events are normalized
into the
canonical protocol shape with ordered sequence IDs so clients can safely
dedupe, resume subscriptions, and coordinate multiple projections from
the same
    run.

The experimental embed server now supports the same protocol flow, so
embedded
graphs can serve the new SDK transports without standing up a separate
LangGraph API deployment. The server also gains protocol session tests
and
fixture graphs covering deep agents, interrupts, subgraphs, and SDK
transport
    behavior.

### Patch Changes

-   Updated dependencies \[]:
    -   @langchain/langgraph-ui@1.2.0

## @langchain/langgraph@1.3.0

### Minor Changes

- [#2314](https://github.com/langchain-ai/langgraphjs/pull/2314)
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)
Thanks [@christian-bromann](https://github.com/christian-bromann)! - 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.

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`d1e2fda`](https://github.com/langchain-ai/langgraphjs/commit/d1e2fda1b1165e122362780a62ab8d2ebff9f9b9)]:
    -   @langchain/langgraph-checkpoint@1.0.2
    -   @langchain/langgraph-sdk@1.9.0

## @langchain/langgraph-sdk@1.9.0

### Minor Changes

- [#2314](https://github.com/langchain-ai/langgraphjs/pull/2314)
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)
Thanks [@christian-bromann](https://github.com/christian-bromann)! - Add
the framework-agnostic event streaming SDK.

    The SDK now includes a thread-focused streaming client built around
`ThreadStream`, `SubscriptionHandle`, message assembly, media assembly,
typed
stream extensions, and pluggable protocol transports. Applications can
stream
over SSE or WebSocket, provide custom agent-server adapters, subscribe
to
values/messages/tools/custom/lifecycle/checkpoint channels, inspect and
fork
state, respond to interrupts, and replay or dedupe ordered event
streams.

This release also adds the reusable stream runtime used by the React,
Vue,
    Svelte, and Angular packages: `StreamController`, `StreamStore`,
`ChannelRegistry`, projection factories, subagent/subgraph discovery,
submission queue coordination, message metadata tracking, root message
projection, media projections, and helper types for agent/deep-agent
state and
    tool-call inference.

The client package has been reorganized into focused modules for
assistants,
threads, runs, store, protocol streaming, transports, media, messages,
and UI
helpers. New SDK documentation covers configuration, assistants,
threads, runs,
store, streaming, transports, extensions, interrupts, messages, media,
    subagents, and subgraphs.

### Patch Changes

- [#2363](https://github.com/langchain-ai/langgraphjs/pull/2363)
[`d1e2fda`](https://github.com/langchain-ai/langgraphjs/commit/d1e2fda1b1165e122362780a62ab8d2ebff9f9b9)
Thanks [@cwlbraa](https://github.com/cwlbraa)! - Add a `returnMinimal`
option to `threads.update`.

## @langchain/langgraph-checkpoint@1.0.2

### Patch Changes

- [#2314](https://github.com/langchain-ai/langgraphjs/pull/2314)
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
Improve `MemorySaver` diagnostics when checkpoint writes are missing a
      `thread_id`.

The in-memory checkpointer now explains why `configurable.thread_id` is
required and includes a concrete `graph.stream(..., { configurable: {
    thread_id } })` example in the error message. This makes the new
thread-oriented event streaming flows easier to debug when an
application
      forgets to provide durable thread configuration.

## @langchain/langgraph-cli@1.2.0

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)]:
    -   @langchain/langgraph-api@1.2.0

## @langchain/langgraph-ui@1.2.0



## @example/ai-elements@0.1.15

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)]:
    -   @langchain/langgraph@1.3.0
    -   @langchain/react@1.0.0

## @examples/assistant-ui-claude@0.1.15

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)]:
    -   @langchain/langgraph@1.3.0
    -   @langchain/react@1.0.0

## @examples/ui-angular@0.0.25

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`d1e2fda`](https://github.com/langchain-ai/langgraphjs/commit/d1e2fda1b1165e122362780a62ab8d2ebff9f9b9)]:
    -   @langchain/langgraph@1.3.0
    -   @langchain/langgraph-sdk@1.9.0
    -   @langchain/angular@1.0.0

## @examples/ui-multimodal@0.0.1

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)]:
    -   @langchain/langgraph@1.3.0
    -   @langchain/react@1.0.0

## @examples/ui-react@0.0.1

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb),
[`d1e2fda`](https://github.com/langchain-ai/langgraphjs/commit/d1e2fda1b1165e122362780a62ab8d2ebff9f9b9)]:
    -   @langchain/langgraph@1.3.0
    -   @langchain/langgraph-sdk@1.9.0
    -   @langchain/react@1.0.0

## langgraph@1.0.32

### Patch Changes

- Updated dependencies
\[[`085a07f`](https://github.com/langchain-ai/langgraphjs/commit/085a07f569b6d7d79728eb7eb6eb3a0c67fcdefb)]:
    -   @langchain/langgraph@1.3.0

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-05-05 00:41:45 -07:00
..
2026-05-05 00:41:45 -07:00
2026-05-05 00:41:45 -07:00

@langchain/react

React SDK for building AI-powered applications with Deep Agents, LangChain and LangGraph.

@langchain/react v1 ships a v2-native useStream hook together with a small family of companion selector hooks. The root hook gives you always-on access to thread state, messages, tool calls, and interrupts; the selector hooks open ref-counted subscriptions for the things that aren't needed on every view (per-subagent messages, media streams, submission queue, message metadata, raw channels, …).

Highlights

  • v2-native streaming protocol. Session-based transport with automatic re-attach on remount; no more reconnectOnMount / joinStream dance.
  • Selector-based subscriptions. Namespaced data (subagents, subgraphs, media) streams only when a component actually mounts the matching selector hook, and releases on unmount.
  • Always-on root projections. values, messages, toolCalls, and interrupts are live at the root with zero per-subscription cost.
  • Agent-brand type inference. useStream<typeof agent>() unwraps state, tool calls, and subagent state maps from an agent brand.
  • Discriminated options. The hosted Agent Server path and the custom-adapter path are two arms of a single typed union — mixing them is a compile-time error.
  • Multimodal media streams. Built-in assembly for audio, images, video, and files.
  • Suspense integration. useSuspenseStream hands the initial hydration phase to <Suspense> and non-streaming errors to Error Boundaries.

Installation

npm install @langchain/react @langchain/core

Peer dependencies: react (^18 || ^19), @langchain/core (^1.1.27).

Quick Start

import { useStream } from "@langchain/react";

function Chat() {
  const { messages, submit, isLoading } = useStream({
    assistantId: "agent",
    apiUrl: "http://localhost:2024",
  });

  return (
    <div>
      {messages.map((msg, i) => (
        <div key={msg.id ?? i}>{String(msg.content)}</div>
      ))}

      <button
        disabled={isLoading}
        onClick={() =>
          void submit({
            messages: [{ type: "human", content: "Hello!" }],
          })
        }
      >
        Send
      </button>
    </div>
  );
}

Mental model

@langchain/react v1 splits the surface into two layers:

  1. Root hook (useStream). Owns the thread lifecycle, the transport, and a handful of always-on projections (values, messages, toolCalls, interrupts, error, isLoading, discovery maps). Mount it once per thread.
  2. Companion selector hooks. Each one opens a ref-counted subscription when the first component mounts it and releases it when the last consumer unmounts. Use them for anything scoped to a namespace, a subagent / subgraph, a specific message, a specific extension channel, or a media stream.
import {
  useStream,
  useMessages,
  useToolCalls,
  useSubmissionQueue,
} from "@langchain/react";

function Chat() {
  const stream = useStream({ assistantId: "agent", apiUrl: "/api" });

  // Root: free reads, no new subscription.
  const messages = useMessages(stream); // same as stream.messages

  // Scoped: opens a namespaced subscription on mount.
  const queue = useSubmissionQueue(stream);
}

Documentation

Detailed guides live in ./docs. Start with the two files most apps need first:

  • useStream — options, return shape, submit(), stop(), respond(), hydrationPromise.
  • Companion selector hooksuseValues, useMessages, useToolCalls, useMessageMetadata, useChannel, useExtension, and friends.

Feature-specific guides:

Migrating from v0 to v1

The useStream import name is unchanged, but the return shape, option bag, and protocol semantics all shifted. Most chat apps migrate in well under an hour — the full migration guide with line-by-line diffs lives in ./docs/v1-migration.md.

Legacy type aliases (UseStream, UseSuspenseStream, UseStreamOptions, UseStreamTransport, QueueEntry, GetToolCallsType, SubagentStream, …) and the legacy FetchStreamTransport class are no longer re-exported from @langchain/react. Apps still on the legacy surface can import directly from @langchain/langgraph-sdk/ui during their migration.

Playground

For complete end-to-end examples with full agentic UIs, visit the LangChain UI Playground.

License

MIT