Files
langgraphjs/libs/sdk-svelte
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/svelte

Svelte 5 SDK for Deep Agents, LangChain and LangGraph.

useStream binds a LangGraph agent into a Svelte 5 component. Reactive fields are exposed as getters on a stable handle (stream.messages, stream.isLoading, …) so templates and $derived expressions track updates automatically — no stores, no $ prefix, no destructuring.

Installation

npm install @langchain/svelte @langchain/core

Peer dependencies: svelte ^5.0.0, @langchain/core ^1.0.1

Quick start

<script lang="ts">
  import { useStream } from "@langchain/svelte";

  const stream = useStream({
    assistantId: "agent",
    apiUrl: "http://localhost:2024",
  });
</script>

{#each stream.messages as msg (msg.id)}
  <div>{msg.content}</div>
{/each}

<button
  disabled={stream.isLoading}
  onclick={() =>
    stream.submit({ messages: [{ type: "human", content: "Hello!" }] })}
>
  Send
</button>

Note: Access fields through the live stream handle. Destructuring (const { messages } = stream) freezes the values at that moment — use stream.messages in templates instead.

Highlights

  • v2-native streaming protocol. Session-based transport with automatic re-attach on remount; no more reconnectOnMount / joinStream dance.
  • Always-on root projections. values, messages, toolCalls, and interrupts are reactive at the root with zero extra subscription cost.
  • Selector composables for scoped data. Per-subagent / per-subgraph messages, tool calls, and media stream only when a component actually mounts the matching composable, and release on unmount.
  • Discriminated option bag. 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.
  • Reactive threadId. Pass threadId: () => active to drive in-place thread swaps without remounting.
  • Agent-brand type inference. useStream<typeof agent>() unwraps state, tool calls, and subagent state maps from an agent brand.
  • Multimodal media streams. Built-in assembly for audio, images, video, and files — plus opinionated playback helpers.
  • Headless tools. Register local tool implementations that auto-resolve server-emitted tool-call interrupts without a round-trip through the UI.

Documentation

In-depth guides live in docs/:

Migrating from v0

@langchain/svelte v1 targets the v2 streaming protocol. The useStream import stays the same, but the option bag, return shape, and how you subscribe to scoped data all change. Most chat apps migrate in well under an hour — the full guide with line-by-line diffs lives in docs/v1-migration.md.

Playground

For full end-to-end examples, see the LangChain UI Playground.

License

MIT