Files
langgraphjs/libs/sdk-react
github-actions[bot] 31261c3be5 chore: version packages (#2558)
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/langgraph-checkpoint-mongodb@1.4.0

### Minor Changes

- [#1928](https://github.com/langchain-ai/langgraphjs/pull/1928)
[`3d7fcea`](https://github.com/langchain-ai/langgraphjs/commit/3d7fcea7d7ea7f1203d24be9df607d5a8e8717bc)
Thanks [@Mihailoff](https://github.com/Mihailoff)! - Add TTL support for
automatic checkpoint expiration

    -   Add optional `ttl` parameter to MongoDBSaver (value in seconds)
    -   Add `setup()` method to create TTL indexes on collections
    -   Add `upserted_at` timestamp to documents when TTL is enabled
- Each write refreshes TTL (expires after inactivity, not creation)

### Patch Changes

- [#2556](https://github.com/langchain-ai/langgraphjs/pull/2556)
[`bee3c91`](https://github.com/langchain-ai/langgraphjs/commit/bee3c91d0adc315ebde0622d8c4b1fff041c1bfd)
Thanks [@mohamedkhaled4053](https://github.com/mohamedkhaled4053)! - Fix
`MongoDBSaver.putWrites` throwing `MongoServerError: Invalid
BulkOperation, Batch cannot be empty` when called with an empty `writes`
array. This is reached by human-in-the-loop / `interrupt()` flows, where
a task can complete producing zero channel writes and LangGraph calls
`putWrites(config, [], taskId)`. `putWrites` now no-ops on empty writes,
matching the behavior of the postgres and sqlite savers (which iterate
and naturally skip empty batches).

- [#2550](https://github.com/langchain-ai/langgraphjs/pull/2550)
[`2b8cc2f`](https://github.com/langchain-ai/langgraphjs/commit/2b8cc2f3fd5c9d3c33b56e013292daf5d936428e)
Thanks [@lazydiv](https://github.com/lazydiv)! -
feat(checkpoint-mongodb): add setup() to create required indexes

## @langchain/langgraph-api@1.4.0

### Minor Changes

- [#2559](https://github.com/langchain-ai/langgraphjs/pull/2559)
[`48cbdd2`](https://github.com/langchain-ai/langgraphjs/commit/48cbdd23fdf29277530f6aa05c397c9902e81206)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
feat(langgraph-cli): add `deploy` command for LangSmith Deployment

Port the Python CLI's `langgraph deploy` workflow to
`@langchain/langgraph-cli`, including local and remote build paths,
deployment lifecycle subcommands (`list`, `revisions list`, `delete`,
`logs`), and host-backend client utilities with tests.

### Patch Changes

- [#2557](https://github.com/langchain-ai/langgraphjs/pull/2557)
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(langgraph-api): preserve non-empty response_metadata on protocol-v2
state messages

The protocol-v2 state normalizer stripped `response_metadata` from
messages,
dropping data that HITL flows rely on — an interrupt's card is carried
on
    `AIMessage.response_metadata` (e.g. `{ cards: ... }`). Non-empty
    `response_metadata` is now retained so the card reaches the client.

- [#2557](https://github.com/langchain-ai/langgraphjs/pull/2557)
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(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.

- Updated dependencies
\[[`48cbdd2`](https://github.com/langchain-ai/langgraphjs/commit/48cbdd23fdf29277530f6aa05c397c9902e81206)]:
    -   @langchain/langgraph-ui@1.4.0

## @langchain/langgraph-cli@1.4.0

### Minor Changes

- [#2559](https://github.com/langchain-ai/langgraphjs/pull/2559)
[`48cbdd2`](https://github.com/langchain-ai/langgraphjs/commit/48cbdd23fdf29277530f6aa05c397c9902e81206)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
feat(langgraph-cli): add `deploy` command for LangSmith Deployment

Port the Python CLI's `langgraph deploy` workflow to
`@langchain/langgraph-cli`, including local and remote build paths,
deployment lifecycle subcommands (`list`, `revisions list`, `delete`,
`logs`), and host-backend client utilities with tests.

### Patch Changes

- Updated dependencies
\[[`48cbdd2`](https://github.com/langchain-ai/langgraphjs/commit/48cbdd23fdf29277530f6aa05c397c9902e81206),
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e),
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph-api@1.4.0

## @langchain/langgraph-ui@1.4.0

### Minor Changes

- [#2559](https://github.com/langchain-ai/langgraphjs/pull/2559)
[`48cbdd2`](https://github.com/langchain-ai/langgraphjs/commit/48cbdd23fdf29277530f6aa05c397c9902e81206)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
feat(langgraph-cli): add `deploy` command for LangSmith Deployment

Port the Python CLI's `langgraph deploy` workflow to
`@langchain/langgraph-cli`, including local and remote build paths,
deployment lifecycle subcommands (`list`, `revisions list`, `delete`,
`logs`), and host-backend client utilities with tests.

## @langchain/langgraph@1.4.5

### Patch Changes

- [#2557](https://github.com/langchain-ai/langgraphjs/pull/2557)
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(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.

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph-sdk@1.9.24

## @langchain/langgraph-sdk@1.9.24

### Patch Changes

- [#2557](https://github.com/langchain-ai/langgraphjs/pull/2557)
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(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.

## @langchain/angular@1.0.25

### Patch Changes

- [#2557](https://github.com/langchain-ai/langgraphjs/pull/2557)
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(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.

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph-sdk@1.9.24

## @langchain/react@1.0.25

### Patch Changes

- [#2557](https://github.com/langchain-ai/langgraphjs/pull/2557)
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(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.

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph-sdk@1.9.24

## @langchain/svelte@1.0.25

### Patch Changes

- [#2557](https://github.com/langchain-ai/langgraphjs/pull/2557)
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(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.

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph-sdk@1.9.24

## @langchain/vue@1.0.25

### Patch Changes

- [#2557](https://github.com/langchain-ai/langgraphjs/pull/2557)
[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(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.

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph-sdk@1.9.24

## @example/ai-elements@0.1.41

### Patch Changes

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/react@1.0.25
    -   @langchain/langgraph@1.4.5

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

### Patch Changes

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/react@1.0.25
    -   @langchain/langgraph@1.4.5

## @examples/ui-angular@0.0.51

### Patch Changes

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph-sdk@1.9.24
    -   @langchain/angular@1.0.25
    -   @langchain/langgraph@1.4.5

## @examples/ui-multimodal@0.0.27

### Patch Changes

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/react@1.0.25
    -   @langchain/langgraph@1.4.5

## @examples/ui-react@0.0.27

### Patch Changes

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph-sdk@1.9.24
    -   @langchain/react@1.0.25
    -   @langchain/langgraph@1.4.5

## langgraph@1.0.45

### Patch Changes

- Updated dependencies
\[[`b1e856d`](https://github.com/langchain-ai/langgraphjs/commit/b1e856d987ac16148dc0872d1fecf70e659ef28e)]:
    -   @langchain/langgraph@1.4.5

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-22 11:40:07 -07:00
..
2026-06-22 11:40:07 -07:00
2026-06-22 11:40:07 -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