Commit Graph

418 Commits

Author SHA1 Message Date
github-actions[bot] 39ce52f248 chore: version packages (#2436)
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-sdk@1.9.7

### Patch Changes

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

- [#2434](https://github.com/langchain-ai/langgraphjs/pull/2434)
[`6b188e8`](https://github.com/langchain-ai/langgraphjs/commit/6b188e80ab989fc8396e1926f729d93b786ca671)
Thanks [@hntrl](https://github.com/hntrl)! - fix(react): avoid eager
stream getter evaluation during object spread

Mark optional `useStream` accessors as non-enumerable so object
spread/rest destructuring does not accidentally read guarded fields like
`history` or opt into additional stream modes.

## @langchain/angular@1.0.7

### Patch Changes

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

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e),
[`6b188e8`](https://github.com/langchain-ai/langgraphjs/commit/6b188e80ab989fc8396e1926f729d93b786ca671)]:
    -   @langchain/langgraph-sdk@1.9.7

## @langchain/react@1.0.7

### Patch Changes

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

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e),
[`6b188e8`](https://github.com/langchain-ai/langgraphjs/commit/6b188e80ab989fc8396e1926f729d93b786ca671)]:
    -   @langchain/langgraph-sdk@1.9.7

## @langchain/svelte@1.0.7

### Patch Changes

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

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e),
[`6b188e8`](https://github.com/langchain-ai/langgraphjs/commit/6b188e80ab989fc8396e1926f729d93b786ca671)]:
    -   @langchain/langgraph-sdk@1.9.7

## @langchain/vue@1.0.7

### Patch Changes

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

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e),
[`6b188e8`](https://github.com/langchain-ai/langgraphjs/commit/6b188e80ab989fc8396e1926f729d93b786ca671)]:
    -   @langchain/langgraph-sdk@1.9.7

## @example/ai-elements@0.1.22

### Patch Changes

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e)]:
    -   @langchain/react@1.0.7

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

### Patch Changes

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e)]:
    -   @langchain/react@1.0.7

## @examples/ui-angular@0.0.32

### Patch Changes

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e),
[`6b188e8`](https://github.com/langchain-ai/langgraphjs/commit/6b188e80ab989fc8396e1926f729d93b786ca671)]:
    -   @langchain/langgraph-sdk@1.9.7
    -   @langchain/angular@1.0.7

## @examples/ui-multimodal@0.0.8

### Patch Changes

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e)]:
    -   @langchain/react@1.0.7

## @examples/ui-react@0.0.8

### Patch Changes

- Updated dependencies
\[[`cfc8d27`](https://github.com/langchain-ai/langgraphjs/commit/cfc8d274e4dc99cb73ebd9abc4f971622105f08e),
[`6b188e8`](https://github.com/langchain-ai/langgraphjs/commit/6b188e80ab989fc8396e1926f729d93b786ca671)]:
    -   @langchain/langgraph-sdk@1.9.7
    -   @langchain/react@1.0.7

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-26 14:09:43 -07:00
Hunter Lovell 6b188e80ab fix(sdk): avoid eager stream getter evaluation (#2434)
## Summary

fix(sdk): avoid eager stream getter evaluation during spread

This fixes a React `useStream` development-mode failure where passing
the stream handle through components that clone or rest-spread props
could accidentally read lazy getters. The guarded `history` getter still
throws when explicitly accessed with `fetchStateHistory: false`, but
object spread no longer trips that path or widens `streamMode` by
touching optional accessors.

## Changes

`@langchain/langgraph-sdk`

- Marks optional `useStream` accessors (`history`,
`experimental_branchTree`, `toolProgress`, `subagents`,
`activeSubagents`) as non-enumerable on the returned stream handle.
- Preserves explicit access behavior for those accessors, including the
existing `history` guard and stream mode opt-in for
`toolProgress`/`subagents`.
- Adds React hook regression coverage for object spread, explicit getter
access, and stream mode inference.
2026-05-26 14:07:07 -07:00
Christian Bromann cfc8d274e4 fix(sdk): unwrap Command tool outputs and hide scoped task tools (#2435)
## Summary

- Filter scoped deep-agent `task` dispatch events out of `sub.toolCalls`
so subagent tool streams only show real worker tools.
- Unwrap LangGraph `Command` payloads in `parseToolOutput` when they
carry an embedded `ToolMessage`, so `tc.output` resolves to the actual
tool result instead of raw graph state.
- Share the scoped-task filter between client subagent handles and
framework tool-call projections.
2026-05-26 14:05:16 -07:00
github-actions[bot] 9c9da48ae2 chore: version packages (#2433)
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-sdk@1.9.6

### Patch Changes

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

## @langchain/angular@1.0.6

### Patch Changes

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

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/langgraph-sdk@1.9.6

## @langchain/react@1.0.6

### Patch Changes

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

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/langgraph-sdk@1.9.6

## @langchain/svelte@1.0.6

### Patch Changes

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

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/langgraph-sdk@1.9.6

## @langchain/vue@1.0.6

### Patch Changes

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

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/langgraph-sdk@1.9.6

## @example/ai-elements@0.1.21

### Patch Changes

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/react@1.0.6

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

### Patch Changes

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/react@1.0.6

## @examples/ui-angular@0.0.31

### Patch Changes

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/langgraph-sdk@1.9.6
    -   @langchain/angular@1.0.6

## @examples/ui-multimodal@0.0.7

### Patch Changes

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/react@1.0.6

## @examples/ui-react@0.0.7

### Patch Changes

- Updated dependencies
\[[`f99941f`](https://github.com/langchain-ai/langgraphjs/commit/f99941f5fe8671ddcb6a78e93e5e05f4028d4af4)]:
    -   @langchain/langgraph-sdk@1.9.6
    -   @langchain/react@1.0.6

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-25 00:54:21 -07:00
Christian Bromann f99941f5fe fix(sdk): clear subgraph and subagent discovery on thread swap (#2430)
## Summary
- Add `reset()` to `SubgraphDiscovery` and `SubagentDiscovery` to clear
internal maps and committed store snapshots.
- Call both resets from `StreamController.#teardownThread()` alongside
existing per-thread resets (messages, tools, metadata).
- Add unit tests for discovery `reset()` and a controller test that
`hydrate(null)` clears subgraphs after lifecycle events.
2026-05-25 00:50:31 -07:00
github-actions[bot] 7788dceb85 chore: version packages (#2424)
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-redis@1.0.5

### Patch Changes

- [#2208](https://github.com/langchain-ai/langgraphjs/pull/2208)
[`ebeb145`](https://github.com/langchain-ai/langgraphjs/commit/ebeb1452d27fcca100cd63bdfd4a7f020949412c)
Thanks [@jackjin1997](https://github.com/jackjin1997)! - Fix
`deleteThread()` using wrong key pattern (`writes:` instead of
`checkpoint_write:`) and add missing cleanup of `write_keys_zset:`
entries.

## @langchain/langgraph-supervisor@1.0.3

### Patch Changes

- [#2317](https://github.com/langchain-ai/langgraphjs/pull/2317)
[`c088c76`](https://github.com/langchain-ai/langgraphjs/commit/c088c7659c18edf26091813ff384f48f5335bef6)
Thanks [@fish895623](https://github.com/fish895623)! - feat(supervisor):
widen agents type to accept createAgent graphs

## @langchain/langgraph-sdk@1.9.5

### Patch Changes

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

## @langchain/angular@1.0.5

### Patch Changes

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

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/langgraph-sdk@1.9.5

## @langchain/react@1.0.5

### Patch Changes

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

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/langgraph-sdk@1.9.5

## @langchain/svelte@1.0.5

### Patch Changes

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

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/langgraph-sdk@1.9.5

## @langchain/vue@1.0.5

### Patch Changes

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

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/langgraph-sdk@1.9.5

## @example/ai-elements@0.1.20

### Patch Changes

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/react@1.0.5

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

### Patch Changes

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/react@1.0.5

## @examples/ui-angular@0.0.30

### Patch Changes

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/langgraph-sdk@1.9.5
    -   @langchain/angular@1.0.5

## @examples/ui-multimodal@0.0.6

### Patch Changes

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/react@1.0.5

## @examples/ui-react@0.0.6

### Patch Changes

- Updated dependencies
\[[`3529e38`](https://github.com/langchain-ai/langgraphjs/commit/3529e3831a488134e7dfaefa4ed7fb1140cf8bb6)]:
    -   @langchain/langgraph-sdk@1.9.5
    -   @langchain/react@1.0.5

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-22 07:16:17 -07:00
배성훈 c088c7659c feat(supervisor): widen agents type to accept createAgent graphs (#2317)
## Summary

- Add a broader `CompiledStateGraph<any, any, string, any, any>` to the
`agents` union in `CreateSupervisorParams`
- Graphs produced by `createAgent` from `langchain` (via `.graph`) are
now accepted alongside existing `createReactAgent` graphs and
`RemoteGraph`
- The original `AnnotationRootT`-parameterized `CompiledStateGraph` type
is preserved for backward compatibility

## Motivation

The new `createAgent` API in the `langchain` package returns a
`ReactAgent` whose `.graph` property is a `CompiledStateGraph` with a
different state schema (`BuiltInState`) than the
`MessagesAnnotation`-based state from `createReactAgent`. Since
`createReactAgent` is deprecated in favor of `createAgent`,
`createSupervisor` needs to accept both graph types.

At runtime this already works — `makeCallAgent` types its `agent`
parameter as `any` and only accesses `.name`, `.invoke()`, and
optionally `.description`. The type constraint on the `agents` parameter
was simply too narrow for the new API.

## Changes

### `@langchain/langgraph-supervisor` (`libs/langgraph-supervisor`)

- Updated `CreateSupervisorParams.agents` type to include
`CompiledStateGraph<any, any, string, any, any>` in the union alongside
the existing strictly-typed `CompiledStateGraph` and `RemoteGraph`

## Test plan

- [x] `pnpm build` passes for `@langchain/langgraph-supervisor`
- [x] Consuming project using `createAgent` + `createSupervisor`
compiles without errors
- [x] Existing supervisor tests still pass

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-05-22 06:58:38 -07:00
Jackjin ebeb1452d2 fix(langgraph-checkpoint-redis): fix deleteThread using wrong key pattern for writes (#2208)
## Summary

Fixes #2207

- Fix `deleteThread()` using incorrect `writes:` prefix instead of
`checkpoint_write:` for write key deletion
- Add missing cleanup of `write_keys_zset:` entries, matching the
correct implementation in `ShallowRedisSaver`

The bug was found by comparing `RedisSaver.deleteThread()` with
`ShallowRedisSaver.deleteThread()` in `shallow.ts`, which correctly uses
`checkpoint_write:` prefix and also cleans up zset keys.

## AI Disclosure

This bug was identified through code review with AI assistance. The fix
aligns the standard `RedisSaver` implementation with the existing
correct `ShallowRedisSaver` implementation.

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-05-22 06:57:22 -07:00
Christian Bromann 3529e3831a fix(sdk): align AssembledToolCall typing with pre-v1 expectations (#2421)
## Summary
- Split tool-call handles by consumer:
- **Client SDK** (`ThreadStream.toolCalls`, subgraph/subagent
projections): `ClientAssembledToolCall` with a promise-only `output`
(resolves on success, rejects on error). Still exported as
`AssembledToolCall` from `@langchain/langgraph-sdk/client` for script
usage.
- **Framework SDKs** (`stream.toolCalls`, `useToolCalls`,
`injectToolCalls`): `AssembledToolCall` with plain reactive fields —
`output: T | null`, `status`, and `error` — updated in place as events
arrive so React/Vue/Svelte/Angular can render from snapshots without
`await`, effects, or Suspense around promises.
- Add generic `AssembledToolCall<TName, TInput, TOutput>` plus
`id`/`args` aliases; point `InferToolCalls` at assembled streaming
handles and add `AssembledToolCallFromTool` (exported as
`ToolCallFromTool` from `@langchain/react`, `@langchain/vue`,
`@langchain/svelte`, and `@langchain/angular`).
- Rework `ToolCallAssembler` around a mutable internal handle and
`toClientAssembledToolCall()` for client projections; framework stores
the reactive handle directly.
- Remove redundant `InferAssembledToolCalls` and deprecated `StateOf`;
wire typed `toolCalls` / selector generics across all four framework
packages.
- Expand and align `createAgent`, `createDeepAgent`, and `langgraph`
type tests across React, Vue, Svelte, and Angular; update examples,
protocol-v2 integration tests, and Vue migration docs.
2026-05-22 06:38:06 -07:00
github-actions[bot] 4a7d9a7c5d chore: version packages (#2416)
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@1.3.2

### Patch Changes

- [#2415](https://github.com/langchain-ai/langgraphjs/pull/2415)
[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
Move `@langchain/core` from a runtime dependency back to a required peer
dependency so installing the SDK alone no longer pulls in
`@langchain/core` (and `js-tiktoken`, etc.). Consumers that use
streaming or message coercion must install `@langchain/core` explicitly
or via `@langchain/langgraph`.

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph-sdk@1.9.4

## @langchain/langgraph-sdk@1.9.4

### Patch Changes

- [#2415](https://github.com/langchain-ai/langgraphjs/pull/2415)
[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
Move `@langchain/core` from a runtime dependency back to a required peer
dependency so installing the SDK alone no longer pulls in
`@langchain/core` (and `js-tiktoken`, etc.). Consumers that use
streaming or message coercion must install `@langchain/core` explicitly
or via `@langchain/langgraph`.

## @langchain/angular@1.0.4

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph-sdk@1.9.4

## @langchain/react@1.0.4

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph-sdk@1.9.4

## @langchain/svelte@1.0.4

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph-sdk@1.9.4

## @langchain/vue@1.0.4

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph-sdk@1.9.4

## @example/ai-elements@0.1.19

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph@1.3.2
    -   @langchain/react@1.0.4

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

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph@1.3.2
    -   @langchain/react@1.0.4

## @examples/ui-angular@0.0.29

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph-sdk@1.9.4
    -   @langchain/langgraph@1.3.2
    -   @langchain/angular@1.0.4

## @examples/ui-multimodal@0.0.5

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph@1.3.2
    -   @langchain/react@1.0.4

## @examples/ui-react@0.0.5

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph-sdk@1.9.4
    -   @langchain/langgraph@1.3.2
    -   @langchain/react@1.0.4

## langgraph@1.0.34

### Patch Changes

- Updated dependencies
\[[`9d3c9dd`](https://github.com/langchain-ai/langgraphjs/commit/9d3c9dd3182059f9eca9fd9b14d8f7466b4338c4)]:
    -   @langchain/langgraph@1.3.2

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-19 00:02:58 -07:00
Christian Bromann b893dc5468 fix: add @langchain/langgraph to changeset 2026-05-19 08:58:21 +02:00
Christian Bromann 9d3c9dd318 fix(core): move @langchain/core back into being a peer dep (#2415)
`@langchain/langgraph-sdk@1.9.0` promoted `@langchain/core` from a dev
dependency to a **runtime dependency**, which caused install-size
metrics for `@langchain/langgraph` to jump from ~6 MB to ~40 MB for
consumers who did not already have core installed (or who use
`--legacy-peer-deps`). That happened because core pulls in heavy
transitive deps such as `js-tiktoken` (~21 MB) and `zod` (~6 MB), even
though `@langchain/langgraph` already lists core as a peer.

This PR moves `@langchain/core` back to a **required peer dependency**
on the SDK, matching `@langchain/langgraph` and the pre-1.9.0 SDK
layout. Runtime behavior is unchanged for typical LangGraph apps that
already install core; SDK-only installs no longer force core into the
tree.

Also switches `LangChainTracer` in `types.ts` to a type-only import so
the tracer subpath is not pulled as a value import.
2026-05-18 23:48:19 -07:00
github-actions[bot] 1b5ce0fca0 chore: version packages (#2405)
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.3.1

### Patch Changes

- [#2397](https://github.com/langchain-ai/langgraphjs/pull/2397)
[`284226c`](https://github.com/langchain-ai/langgraphjs/commit/284226c7ca164b3c81fe2d9e32b10f1fc6b99a3c)
Thanks [@hntrl](https://github.com/hntrl)! - fix(checkpoint-mongodb):
validate configurable checkpoint identifiers before queries

Add runtime validation for `thread_id`, `checkpoint_ns`, and
`checkpoint_id` in
`MongoDBSaver` methods that read and write checkpoints. This prevents
object-based
operator payloads from being passed into MongoDB query filters and
ensures invalid
    configurable values fail fast with explicit errors.

## @langchain/langgraph-api@1.2.2

### Patch Changes

- [#2396](https://github.com/langchain-ai/langgraphjs/pull/2396)
[`9b20df0`](https://github.com/langchain-ai/langgraphjs/commit/9b20df081a82b79efca3dfd2c128243889b11eb8)
Thanks [@hntrl](https://github.com/hntrl)! - fix(langgraph-cli): accept
hyphenated prerelease tags in `api_version` values.

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

## @langchain/langgraph-cli@1.2.2

### Patch Changes

- [#2389](https://github.com/langchain-ai/langgraphjs/pull/2389)
[`40bcdab`](https://github.com/langchain-ai/langgraphjs/commit/40bcdab38fa495028d8eba68062e48079dbe9208)
Thanks [@jdrogers940](https://github.com/jdrogers940)! - Adding support
for pre-release versions in api_version.

- [#2396](https://github.com/langchain-ai/langgraphjs/pull/2396)
[`9b20df0`](https://github.com/langchain-ai/langgraphjs/commit/9b20df081a82b79efca3dfd2c128243889b11eb8)
Thanks [@hntrl](https://github.com/hntrl)! - fix(langgraph-cli): accept
hyphenated prerelease tags in `api_version` values.

- Updated dependencies
\[[`9b20df0`](https://github.com/langchain-ai/langgraphjs/commit/9b20df081a82b79efca3dfd2c128243889b11eb8)]:
    -   @langchain/langgraph-api@1.2.2

## @langchain/langgraph@1.3.1

### Patch Changes

- [#2339](https://github.com/langchain-ai/langgraphjs/pull/2339)
[`2b88da4`](https://github.com/langchain-ai/langgraphjs/commit/2b88da497b2c6f8fbf8f4d901578a198824eb32f)
Thanks [@vigneshpatel14](https://github.com/vigneshpatel14)! -
fix(langgraph): surface structuredResponse parse failures in
createReactAgent

- [#2406](https://github.com/langchain-ai/langgraphjs/pull/2406)
[`e54ae90`](https://github.com/langchain-ai/langgraphjs/commit/e54ae901e119ccf81653b90d5a0db2485027a5a9)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(langgraph-core): keep tool results out of v3 message streams

- [#2376](https://github.com/langchain-ai/langgraphjs/pull/2376)
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)
Thanks [@hntrl](https://github.com/hntrl)! - fix(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.

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`01dd046`](https://github.com/langchain-ai/langgraphjs/commit/01dd0462ed300dee5a9a51f229e6c401315f070c),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3

## @langchain/langgraph-sdk@1.9.3

### Patch Changes

- [#2387](https://github.com/langchain-ai/langgraphjs/pull/2387)
[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - Coalesce
`RootMessageProjection` store writes through a single `setTimeout(0)`
flush so long `messages`-channel replays (on refresh, mid-run join, or
rapid subagent streaming) no longer drain as a per-event microtask chain
that trips React's `Maximum update depth exceeded` guard. Replaces the
previous `MessageChannel`-based batching, which deferred initial-submit
events past the first render and left the UI looking frozen until
refresh.

- [#2372](https://github.com/langchain-ai/langgraphjs/pull/2372)
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7)
Thanks [@ahmed-z0](https://github.com/ahmed-z0)! - Fix subagent message
routing to prefer the stream event namespace over checkpoint metadata
when filtering subagent messages.

- [#2384](https://github.com/langchain-ai/langgraphjs/pull/2384)
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - batch
RootMessageProjection store writes through a macrotask

- [#2388](https://github.com/langchain-ai/langgraphjs/pull/2388)
[`01dd046`](https://github.com/langchain-ai/langgraphjs/commit/01dd0462ed300dee5a9a51f229e6c401315f070c)
Thanks [@hntrl](https://github.com/hntrl)! - fix(sdk): retry connection
failures before throwing ConnectionError

- [#2381](https://github.com/langchain-ai/langgraphjs/pull/2381)
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - fix(sdk):
forward config + metadata on respondInput for resume submits

- [#2379](https://github.com/langchain-ai/langgraphjs/pull/2379)
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - filter
SSE-replayed input.requested events through a hydrated interrupt
allowlist

- [#2390](https://github.com/langchain-ai/langgraphjs/pull/2390)
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - Bind
deepagents subagent discovery to the execution namespace via taskInput
so `useMessages(stream, subagent)` resolves the streaming scope instead
of the trigger tool-call namespace.

## @langchain/angular@1.0.3

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`01dd046`](https://github.com/langchain-ai/langgraphjs/commit/01dd0462ed300dee5a9a51f229e6c401315f070c),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3

## @langchain/react@1.0.3

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`01dd046`](https://github.com/langchain-ai/langgraphjs/commit/01dd0462ed300dee5a9a51f229e6c401315f070c),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3

## @langchain/svelte@1.0.3

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`01dd046`](https://github.com/langchain-ai/langgraphjs/commit/01dd0462ed300dee5a9a51f229e6c401315f070c),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3

## @langchain/vue@1.0.3

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`01dd046`](https://github.com/langchain-ai/langgraphjs/commit/01dd0462ed300dee5a9a51f229e6c401315f070c),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3

## @langchain/langgraph-cua@1.0.2



## @langchain/langgraph-supervisor@1.0.2



## @langchain/langgraph-swarm@1.0.2



## @langchain/langgraph-ui@1.2.2



## @example/ai-elements@0.1.18

### Patch Changes

- Updated dependencies
\[[`2b88da4`](https://github.com/langchain-ai/langgraphjs/commit/2b88da497b2c6f8fbf8f4d901578a198824eb32f),
[`e54ae90`](https://github.com/langchain-ai/langgraphjs/commit/e54ae901e119ccf81653b90d5a0db2485027a5a9),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1
    -   @langchain/react@1.0.3

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

### Patch Changes

- Updated dependencies
\[[`2b88da4`](https://github.com/langchain-ai/langgraphjs/commit/2b88da497b2c6f8fbf8f4d901578a198824eb32f),
[`e54ae90`](https://github.com/langchain-ai/langgraphjs/commit/e54ae901e119ccf81653b90d5a0db2485027a5a9),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1
    -   @langchain/react@1.0.3

## @examples/ui-angular@0.0.28

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`2b88da4`](https://github.com/langchain-ai/langgraphjs/commit/2b88da497b2c6f8fbf8f4d901578a198824eb32f),
[`e54ae90`](https://github.com/langchain-ai/langgraphjs/commit/e54ae901e119ccf81653b90d5a0db2485027a5a9),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`01dd046`](https://github.com/langchain-ai/langgraphjs/commit/01dd0462ed300dee5a9a51f229e6c401315f070c),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3
    -   @langchain/langgraph@1.3.1
    -   @langchain/angular@1.0.3

## @examples/ui-multimodal@0.0.4

### Patch Changes

- Updated dependencies
\[[`2b88da4`](https://github.com/langchain-ai/langgraphjs/commit/2b88da497b2c6f8fbf8f4d901578a198824eb32f),
[`e54ae90`](https://github.com/langchain-ai/langgraphjs/commit/e54ae901e119ccf81653b90d5a0db2485027a5a9),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1
    -   @langchain/react@1.0.3

## @examples/ui-react@0.0.4

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`2b88da4`](https://github.com/langchain-ai/langgraphjs/commit/2b88da497b2c6f8fbf8f4d901578a198824eb32f),
[`e54ae90`](https://github.com/langchain-ai/langgraphjs/commit/e54ae901e119ccf81653b90d5a0db2485027a5a9),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`01dd046`](https://github.com/langchain-ai/langgraphjs/commit/01dd0462ed300dee5a9a51f229e6c401315f070c),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3
    -   @langchain/langgraph@1.3.1
    -   @langchain/react@1.0.3

## langgraph@1.0.33

### Patch Changes

- Updated dependencies
\[[`2b88da4`](https://github.com/langchain-ai/langgraphjs/commit/2b88da497b2c6f8fbf8f4d901578a198824eb32f),
[`e54ae90`](https://github.com/langchain-ai/langgraphjs/commit/e54ae901e119ccf81653b90d5a0db2485027a5a9),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1

## docs@null

# docs

## null

## null

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-05-18 22:47:09 +00:00
Hunter Lovell 284226c7ca fix(langgraph-checkpoint-mongodb): validate configurable checkpoint IDs (#2397)
## Summary

Fixes #2351

This change hardens `@langchain/langgraph-checkpoint-mongodb` against
object-based configurable input in checkpoint identifiers. It adds
runtime validation for `thread_id`, `checkpoint_ns`, and `checkpoint_id`
before any MongoDB query/write path uses these values, so operator-like
payloads are rejected early with explicit errors.

## Changes

### `@langchain/langgraph-checkpoint-mongodb`

- Added a shared `getStringConfigValue` runtime validator in
[`libs/checkpoint-mongodb/src/checkpoint.ts`](libs/checkpoint-mongodb/src/checkpoint.ts).
- Applied validation to `getTuple`, `list`, `put`, `putWrites`, and
`deleteThread`.
- Preserved existing behavior where `getTuple` returns `undefined` when
`thread_id` is missing, while now rejecting non-string values.
- Added regression tests in
[`libs/checkpoint-mongodb/src/tests/checkpoints.test.ts`](libs/checkpoint-mongodb/src/tests/checkpoints.test.ts)
for object/operator payloads across the affected methods.
- Added a patch changeset for `@langchain/langgraph-checkpoint-mongodb`.

Co-authored-by: Itay <9601971+etairl@users.noreply.github.com>
2026-05-18 14:47:00 -07:00
Hunter Lovell c6c0a58c3a chore: exit rc (#2414) 2026-05-18 14:14:00 -07:00
Christian Bromann e54ae901e1 fix(core): keep tool results out of v3 message streams (#2406)
## Summary
- Prevent v3 `run.messages` from surfacing `ToolMessage` outputs as
assistant text.
- Skip tool-role message lifecycles in the messages transformer while
preserving tool messages in state snapshots.
- Add regression coverage for tool-result message leakage.

fixes https://github.com/langchain-ai/deepagentsjs/issues/534
2026-05-18 13:06:22 -07:00
Hunter Lovell 01dd0462ed fix(sdk): retry connection failures before throwing ConnectionError (#2388)
## Summary

This change updates SDK retry behavior so connection-related failures
are retried instead of immediately aborting inside `onFailedAttempt`.
When retries are exhausted, the final surfaced error is still coalesced
to a `ConnectionError` with the existing LangGraph-specific guidance.
A focused unit test was added to lock in this behavior.

## Changes

### @langchain/langgraph-sdk

- Updated `AsyncCaller` connection-error handling to only throw
`ConnectionError` on the final failed attempt (`retriesLeft === 0`),
while allowing retries on earlier attempts.
- Added a regression test covering retry count plus final
`ConnectionError` coalescing for connection-refused/fetch-failed style
errors.
- Added a patch changeset for `@langchain/langgraph-sdk` documenting the
retry/coalescing fix.
2026-05-18 10:27:49 -07:00
Vignesh 2b88da497b fix(langgraph): surface structuredResponse parse failures in createReactAgent (#2339)
Closes  Issue #2338

## Problem
When `createReactAgent` is called with `responseFormat`, the
`generate_structured_response` node calls
`model.withStructuredOutput(schema).invoke(...)`. Some parsers return
`null`/`undefined` (instead of throwing) when the LLM produces JSON that
is
syntactically valid but does not satisfy the schema (e.g. a missing
required field). The result was unconditionally assigned to the
`structuredResponse` channel, so the agent silently resolved with
`structuredResponse: undefined` — no error, no warning, no log.

## Fix
Detect the `null`/`undefined` case in `generate_structured_response` and
throw a descriptive error stating that the structured-output parser
returned null/undefined and the model output did not satisfy the schema.
This converts the silent failure into an explicit, debuggable error.

The error does not include the raw model completion. The existing call
shape (`withStructuredOutput(schema, options).invoke(...)`) returns only
the parsed value. Switching to `{ includeRaw: true }` would surface the
completion but (a) overrides any caller-supplied `includeRaw` in the
existing options object and (b) relies on every chat-model
implementation
honoring `includeRaw` consistently, so it's left as a possible
follow-up.

## Test
Added `Throws when structured output parser returns null` in
`libs/langgraph-core/src/tests/prebuilt.test.ts`. It spies on
`withStructuredOutput` to return `null` (simulating the silent failure)
and asserts the agent rejects with the new error message. The test runs
inside the existing `describe.each([["v1"], ["v2"]])` block, so both
agent versions are covered.

---------

Co-authored-by: Voddam Vignesh <vignesh.voddam@gep.com>
Co-authored-by: Christian Bromann <git@bromann.dev>
2026-05-16 02:06:46 -07:00
github-actions[bot] 22c4541b53 chore: version packages (rc) (#2385)
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @langchain/langgraph-api@1.2.2-rc.0

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3-rc.0
    -   @langchain/langgraph@1.3.1-rc.0
    -   @langchain/langgraph-ui@1.2.2-rc.0

## @langchain/langgraph-cli@1.2.2-rc.0

### Patch Changes

- [#2389](https://github.com/langchain-ai/langgraphjs/pull/2389)
[`40bcdab`](https://github.com/langchain-ai/langgraphjs/commit/40bcdab38fa495028d8eba68062e48079dbe9208)
Thanks [@jdrogers940](https://github.com/jdrogers940)! - Adding support
for pre-release versions in api_version.

-   Updated dependencies \[]:
    -   @langchain/langgraph-api@1.2.2-rc.0

## @langchain/langgraph@1.3.1-rc.0

### Patch Changes

- [#2376](https://github.com/langchain-ai/langgraphjs/pull/2376)
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)
Thanks [@hntrl](https://github.com/hntrl)! - fix(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.

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3-rc.0

## @langchain/langgraph-cua@1.0.2-rc.0

### Patch Changes

- Updated dependencies
\[[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1-rc.0

## @langchain/langgraph-supervisor@1.0.2-rc.0

### Patch Changes

- Updated dependencies
\[[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1-rc.0

## @langchain/langgraph-swarm@1.0.2-rc.0

### Patch Changes

- Updated dependencies
\[[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1-rc.0

## @langchain/langgraph-sdk@1.9.3-rc.0

### Patch Changes

- [#2387](https://github.com/langchain-ai/langgraphjs/pull/2387)
[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - Coalesce
`RootMessageProjection` store writes through a single `setTimeout(0)`
flush so long `messages`-channel replays (on refresh, mid-run join, or
rapid subagent streaming) no longer drain as a per-event microtask chain
that trips React's `Maximum update depth exceeded` guard. Replaces the
previous `MessageChannel`-based batching, which deferred initial-submit
events past the first render and left the UI looking frozen until
refresh.

- [#2372](https://github.com/langchain-ai/langgraphjs/pull/2372)
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7)
Thanks [@ahmed-z0](https://github.com/ahmed-z0)! - Fix subagent message
routing to prefer the stream event namespace over checkpoint metadata
when filtering subagent messages.

- [#2384](https://github.com/langchain-ai/langgraphjs/pull/2384)
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - batch
RootMessageProjection store writes through a macrotask

- [#2381](https://github.com/langchain-ai/langgraphjs/pull/2381)
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - fix(sdk):
forward config + metadata on respondInput for resume submits

- [#2379](https://github.com/langchain-ai/langgraphjs/pull/2379)
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - filter
SSE-replayed input.requested events through a hydrated interrupt
allowlist

- [#2390](https://github.com/langchain-ai/langgraphjs/pull/2390)
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)
Thanks [@nick-hollon-lc](https://github.com/nick-hollon-lc)! - Bind
deepagents subagent discovery to the execution namespace via taskInput
so `useMessages(stream, subagent)` resolves the streaming scope instead
of the trigger tool-call namespace.

## @langchain/angular@1.0.3-rc.0

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3-rc.0

## @langchain/react@1.0.3-rc.0

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3-rc.0

## @langchain/svelte@1.0.3-rc.0

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3-rc.0

## @langchain/vue@1.0.3-rc.0

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3-rc.0

## @langchain/langgraph-ui@1.2.2-rc.0



## @example/ai-elements@0.1.18-rc.0

### Patch Changes

- Updated dependencies
\[[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1-rc.0
    -   @langchain/react@1.0.3-rc.0

## @examples/assistant-ui-claude@0.1.18-rc.0

### Patch Changes

- Updated dependencies
\[[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1-rc.0
    -   @langchain/react@1.0.3-rc.0

## @examples/ui-angular@0.0.28-rc.0

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3-rc.0
    -   @langchain/langgraph@1.3.1-rc.0
    -   @langchain/angular@1.0.3-rc.0

## @examples/ui-multimodal@0.0.4-rc.0

### Patch Changes

- Updated dependencies
\[[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1-rc.0
    -   @langchain/react@1.0.3-rc.0

## @examples/ui-react@0.0.4-rc.0

### Patch Changes

- Updated dependencies
\[[`44746b1`](https://github.com/langchain-ai/langgraphjs/commit/44746b1a3b5b49737542b120b9e45d6f94181113),
[`4cc6491`](https://github.com/langchain-ai/langgraphjs/commit/4cc6491844f21ed0fc737eaef8498133daa877f7),
[`ae8af2d`](https://github.com/langchain-ai/langgraphjs/commit/ae8af2d75aef9a7bbd930d221d1ce03e7fbb90ad),
[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280),
[`2ad1aa4`](https://github.com/langchain-ai/langgraphjs/commit/2ad1aa48c6a3f45340b4833e6de555fdc7348d15),
[`75e651b`](https://github.com/langchain-ai/langgraphjs/commit/75e651b9cff1a1e39ad6513b8a5e9b565b9ad7fe),
[`f1d651a`](https://github.com/langchain-ai/langgraphjs/commit/f1d651ae14ca178f4a915ac853ba9b439cd55ba3)]:
    -   @langchain/langgraph-sdk@1.9.3-rc.0
    -   @langchain/langgraph@1.3.1-rc.0
    -   @langchain/react@1.0.3-rc.0

## langgraph@1.0.33-rc.0

### Patch Changes

- Updated dependencies
\[[`4fd1e9f`](https://github.com/langchain-ai/langgraphjs/commit/4fd1e9f5720361a86a386a286ad8fcc824643280)]:
    -   @langchain/langgraph@1.3.1-rc.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-16 06:37:11 +00:00
Hunter Lovell 9b20df081a fix(langgraph-cli): allow hyphenated prerelease api_version (#2396) 2026-05-15 20:13:50 -07:00
Nick Hollon f1d651ae14 fix(sdk): bind subagent namespace to execution scope via taskInput (#2390)
## Summary

When the SDK consumes a deepagents run over protocol-v2, the parent's
`task` tool call registers a subagent under `tools:<tool_call_id>` (e.g.
`tools:toolu_*`), but the subagent's pregel execution emits its
`values`/`messages`/`lifecycle` events at a **sibling** namespace
`tools:<pregel-uuid>` — not nested, no shared segment.
`SubagentDiscovery` tracked the trigger namespace, so
`useMessages(stream, subagent)` filtered the wrong scope and consumers
saw empty subagent cards while content streamed server-side.

The wire carries no first-class link between the two namespaces — the
lifecycle event's `trigger_call_id` is the Pregel UUID, not the
Anthropic `tool_call_id`.

## Approach

The server seeds the subagent's first state with
`HumanMessage(content=description)`, so an exact-equality match against
`taskInput` is deterministic. Adds:

- `#toolCallIdByTaskInput: Map<string, string[]>` — FIFO queue keyed by
taskInput, populated when a `task` tool call is registered.
- `#bindNamespaceByTaskInput` — on the first `values` event at a
`tools:<id>` namespace, look up the first HumanMessage text, shift the
matching `tool_call_id`, and seed `#taskIdByObservedNamespace`.
`#recordObservedWorkNamespace` promotes the namespace as before.

The queue handles parallel dispatches that share a description. Pregel
preserves dispatch order across executions, so FIFO pop attributes them
correctly.

## Known cliff edges (all silent — card stays empty)

- Wrapper middleware mutates the seeded HumanMessage before it reaches
the subagent.
- The HumanMessage uses multimodal content blocks instead of a string.
- A custom \`CompiledSubAgent\` state doesn't include a HumanMessage.

The upstream fix that eliminates the whole class is for langgraph's
\`_TasksLifecycleBase\` (or deepagents) to enrich the subagent's
lifecycle payload with \`cause: { tool_call_id }\`. That would replace
this bridge with a flat lookup.
2026-05-15 13:28:18 -07:00
Nick Hollon 44746b1a3b fix(sdk): coalesce RootMessageProjection writes via setTimeout(0) (#2387)
## Summary

Reworks `RootMessageProjection` batching to fix two regressions at once.

The freeze that #2384 originally addressed: on refresh, mid-run join, or
a rapidly-streaming subagent, many `messages`-channel events drain
through the controller's `for await` pump as a microtask chain.
Per-event `store.setState` calls fire `useSyncExternalStore`
notifications per event, and after ~50 React's `nestedUpdateCount` guard
trips with "Maximum update depth exceeded", permanently freezing the UI
on the first few messages.

The new regression #2384 introduced: its `MessageChannel`-based
scheduler deferred the first event of every streaming burst past React's
initial render. Initial submit looked frozen — no user message, no AI
response — until refresh.

This change keeps the coalescing (so the freeze stays fixed) but swaps
the scheduler to `setTimeout(0)` with a `#flushScheduled` idempotency
guard:

- `handleMessage` / `applyValues` compute new `messages` / `values`
synchronously and stage them in `#pendingMessages` / `#pendingValues`.
`#indexById` and `#valuesMessageIds` mutate synchronously so subsequent
same-tick calls see up-to-date positions.
- One `setTimeout(0)` flush per tick commits the staged values to the
store in a single `setState`. Bursts collapse to one notification;
streaming events separated by network latency each flush on their own
boundary.
- `reset()` drops pending writes so thread swaps can't bleed staged
state.

No test-only flush flag on the projection — the existing tests gained
`await drainFlush()` between mutations and assertions.

### New regression coverage

A `scheduling` describe block guards both contracts:

- streamed event commits within one macrotask (would fail on a
deferral-chain scheduler — initial-submit freeze)
- values snapshot commits within one macrotask (would fail on hydrate
freeze)
- 200-delta synchronous burst → fewer than 10 store notifications (would
fail on per-event `setState` — long-replay freeze)
- 50 sequential `applyValues` calls → fewer than 10 store notifications
(would fail on hydrate per-event freeze)

Both coalesce tests fail on a sync projection; both single-event tests
fail on a multi-macrotask deferral chain.

## Release Note

None
2026-05-15 13:27:47 -07:00
Josh Rogers 40bcdab38f fix: support pre-release versions in api_version (#2389)
<!--
Thank you for contributing to LangGraph.js! Your PR will appear in our
next release under the title you set above. Please make sure it
highlights your valuable contribution.

To help streamline the review process, please make sure you read our
contribution guidelines:
https://github.com/langchain-ai/langgraphjs/blob/main/CONTRIBUTING.md

Replace this block with a description of the change, the issue it fixes
(if applicable), and relevant context.

Finally, we'd love to show appreciation for your contribution - if you'd
like us to shout you out on Twitter, please also include your handle
below!
-->

<!-- Remove if not applicable -->

Fixing api_version in langgraph.json to support PEP compatible versions
(e.g. `0.9.0rc1`). Today we support JS compatible versions (e.g.
`0.9.0-rc1` but langgraph-api is a python package so the versioning
doesn't make sense and runs into issues with the image names.
2026-05-14 08:38:48 -07:00
Nick Hollon 75e651b9cf fix(sdk): filter SSE-replayed input.requested events through a hydrated interrupt allowlist (#2379)
SSE replay of past \`input.requested\` events was re-adding historically
requested (and since-resolved) interrupts to the UI on every page
navigation back to the thread. The protocol has no \`input.responded\`
event, so the SDK has no signal to distinguish replay from live for an
idle thread — it would add anything replayed to
\`rootStore.interrupts\`.

Adds \`StreamController.#hydratedActiveInterruptIds\`: a \`Set\`
populated
during \`hydrate()\` from \`client.threads.getState()\`'s
\`tasks[].interrupts\`. Used as a strict allowlist when processing
replayed \`input.requested\` events. \`null\` outside the hydrate window
so genuinely-new live interrupts on an active run aren't filtered;
cleared at the start of \`submit()\` for the same reason.

Also drops the unused \`subagents\` constructor param from
\`RootMessageProjection\` — it was only ever read to forward events to a
discovery instance that the controller already feeds directly, so the
param had no behavioral effect. Included here because the matching
call-site change lives in \`controller.ts\`.

## Release Note

None

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-05-12 13:30:33 -07:00
Nick Hollon 2ad1aa48c6 fix(sdk): subscription plumbing — dedicated SSE streams, run.start ordering, WS pre-register (#2381)
Three subscription-lifecycle correctness fixes; all share
\`client/stream/index.ts\` and are thematically the same surface.

### 1. \`subscribeDedicated\` + dedicated SSE event stream for narrow
projections

Selector hook consumers (\`useMessages\`, \`useToolCalls\`) scoped to a
subagent namespace would otherwise widen the shared content pump's
\`(channels, namespaces)\` union and pull every channel for every active
namespace onto the wire just to satisfy a single narrow consumer. SSE
transports get a fresh \`openEventStream\`; WS falls back to the shared
command stream (no union-widening cost on WS since all events flow on
one connection).

### 2. \`run.start\` lifecycle ordering

The lifecycle watcher and the values projection both open subscriptions
on \`/threads/{id}/stream/events\`; if either lands before \`run.start\`
commits the thread server-side, the server emits a
\`404: Thread not found\` protocol error and the client waits forever
for terminal events. Reorder so \`run.start\` awaits first, then
watchers attach. Also adds \`config\` + \`metadata\` to \`respondInput\`
signature so resume submits can carry per-run configuration overrides
(the v2 server already forwards both).

### 3. Pre-register subscription under a placeholder id before sending
\`subscription.subscribe\`

The WebSocket server replays buffered events through
\`install_subscription_with_replay\` before returning the success
response that carries the \`subscription_id\` — without
pre-registration,
those replayed events arrive at \`#handleIncoming\` while no matching
subscription is registered and never reach the iterator. UI symptom:
\`useMessages\` renders empty after click-to-expand on WebSocket.

## Release Note

None

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-05-12 13:02:17 -07:00
Hunter Lovell 318881e663 chore: enter rc changeset versions (#2386) 2026-05-12 13:00:23 -07:00
ahmed-z0 4cc6491844 fix(sdk): route subagent messages by stream event namespace (#2372)
## Summary

Fix `StreamManager` subagent message routing so `messages|...` stream
events prefer the SSE event namespace when it identifies a subagent,
falling back to `metadata.langgraph_checkpoint_ns` /
`metadata.checkpoint_ns` only when there is no subagent event namespace.

This prevents subagent message chunks from being buffered under the
wrong namespace when the event name and message metadata disagree.

## Motivation

When streaming DeepAgent subgraphs from a deployed LangGraph server, the
stream can contain events shaped like:

```text
event: messages|tools:<stream-task-id>
data: [{...}, { checkpoint_ns: "tools:<metadata-task-id>" }]
```

`updates|tools:<stream-task-id>` and `values|tools:<stream-task-id>`
establish the visible subagent using the event namespace, but the
`messages` handler currently derives the subagent id from metadata. If
the metadata namespace differs, the subagent's internal AI/tool messages
are queued under a namespace that never maps to the visible subagent, so
`getSubagentsByMessage(...)` returns the subagent without its tool-call
history.

The stream event namespace is already parsed and passed to other
subagent event handlers, so message events should use it when available.

## Tests

```bash
pnpm --filter @langchain/langgraph-sdk test -- src/ui/manager.test.ts
```

Result: 37 files passed, 512 tests passed, no type errors.
2026-05-12 12:58:09 -07:00
Nick Hollon ae8af2d75a fix(sdk): batch RootMessageProjection store writes through a macrotask (#2384)
Mirrors the \`MessageChannel\`-batching pattern that the
namespace-scoped messages projection (\`projections/messages.ts\`)
already uses, applied to the root namespace.

When a long thread replays through the \`messages\` channel — on
refresh, on resume of an in-flight run, or on a rapidly-streaming
subagent — dozens of \`messages\`-channel events can land within a
single SSE parse. They drain through the \`for await\` pump as a long
microtask chain, and calling \`store.setState\` per event fires
\`useSyncExternalStore\` notifications per event. After ~50 React's
\`nestedUpdateCount\` guard trips with "Maximum update depth exceeded"
and the UI freezes, permanently stuck at the first few messages.

\`handleMessage\` and \`applyValues\` now compute their new
\`messages\`/\`values\` synchronously (and keep mutating \`#indexById\`
and \`#valuesMessageIds\` in line so subsequent calls in the same tick
see up-to-date positions) but stage the result in
\`#pendingMessages\`/\`#pendingValues\`. A single
\`MessageChannel\`-backed \`#flushPending\` copies the staged values
onto the store in one \`setState\` call per tick.

Adds a test-only \`flushImmediately\` constructor flag so tests that
assert against the store immediately after each call don't need to
await a tick. Production wiring leaves it false.

## Release Note

None

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-05-12 12:52:41 -07:00
Hunter Lovell 4fd1e9f572 fix(langgraph): source serverInfo ids from configurable first (#2376)
## Summary

Runtime now prefers `assistant_id` and `graph_id` from
`config.configurable`, which aligns with server-provided config, while
preserving metadata fallback for compatibility.

## Changes

### `@langchain/langgraph`
- Updated `libs/langgraph-core/src/pregel/index.ts` `_buildServerInfo`
to resolve `assistant_id` and `graph_id` from `config.configurable`
first, then fall back to `config.metadata`.
- Kept `langgraph_auth_user` sourcing unchanged from
`config.configurable`.
- Expanded `libs/langgraph-core/src/tests/execution_info.test.ts` to
cover:
  - configurable-based ID sourcing,
  - configurable-over-metadata precedence,
  - metadata fallback behavior,
  - existing auth-user serverInfo behavior with configurable IDs.
2026-05-12 11:59:28 -07:00
github-actions[bot] f5b22a6f19 chore: version packages (#2373)
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-sdk@1.9.2

### Patch Changes

- [#2370](https://github.com/langchain-ai/langgraphjs/pull/2370)
[`4c6875c`](https://github.com/langchain-ai/langgraphjs/commit/4c6875c1e3dd32857d526925865c389e4e9c10c2)
Thanks [@open-swe](https://github.com/apps/open-swe)! - feat(sdk):
support metadata filter for crons search/count

- [#2377](https://github.com/langchain-ai/langgraphjs/pull/2377)
[`a5089cd`](https://github.com/langchain-ai/langgraphjs/commit/a5089cda1d9db1e4b50c17cdd12a770a67279905)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(sdk): preserve AI content blocks during message projection

## @langchain/angular@1.0.2

### Patch Changes

- Updated dependencies
\[[`4c6875c`](https://github.com/langchain-ai/langgraphjs/commit/4c6875c1e3dd32857d526925865c389e4e9c10c2),
[`a5089cd`](https://github.com/langchain-ai/langgraphjs/commit/a5089cda1d9db1e4b50c17cdd12a770a67279905)]:
    -   @langchain/langgraph-sdk@1.9.2

## @langchain/react@1.0.2

### Patch Changes

- Updated dependencies
\[[`4c6875c`](https://github.com/langchain-ai/langgraphjs/commit/4c6875c1e3dd32857d526925865c389e4e9c10c2),
[`a5089cd`](https://github.com/langchain-ai/langgraphjs/commit/a5089cda1d9db1e4b50c17cdd12a770a67279905)]:
    -   @langchain/langgraph-sdk@1.9.2

## @langchain/svelte@1.0.2

### Patch Changes

- Updated dependencies
\[[`4c6875c`](https://github.com/langchain-ai/langgraphjs/commit/4c6875c1e3dd32857d526925865c389e4e9c10c2),
[`a5089cd`](https://github.com/langchain-ai/langgraphjs/commit/a5089cda1d9db1e4b50c17cdd12a770a67279905)]:
    -   @langchain/langgraph-sdk@1.9.2

## @langchain/vue@1.0.2

### Patch Changes

- Updated dependencies
\[[`4c6875c`](https://github.com/langchain-ai/langgraphjs/commit/4c6875c1e3dd32857d526925865c389e4e9c10c2),
[`a5089cd`](https://github.com/langchain-ai/langgraphjs/commit/a5089cda1d9db1e4b50c17cdd12a770a67279905)]:
    -   @langchain/langgraph-sdk@1.9.2

## @example/ai-elements@0.1.17

### Patch Changes

-   Updated dependencies \[]:
    -   @langchain/react@1.0.2

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

### Patch Changes

-   Updated dependencies \[]:
    -   @langchain/react@1.0.2

## @examples/ui-angular@0.0.27

### Patch Changes

- Updated dependencies
\[[`4c6875c`](https://github.com/langchain-ai/langgraphjs/commit/4c6875c1e3dd32857d526925865c389e4e9c10c2),
[`a5089cd`](https://github.com/langchain-ai/langgraphjs/commit/a5089cda1d9db1e4b50c17cdd12a770a67279905)]:
    -   @langchain/langgraph-sdk@1.9.2
    -   @langchain/angular@1.0.2

## @examples/ui-multimodal@0.0.3

### Patch Changes

-   Updated dependencies \[]:
    -   @langchain/react@1.0.2

## @examples/ui-react@0.0.3

### Patch Changes

- Updated dependencies
\[[`4c6875c`](https://github.com/langchain-ai/langgraphjs/commit/4c6875c1e3dd32857d526925865c389e4e9c10c2),
[`a5089cd`](https://github.com/langchain-ai/langgraphjs/commit/a5089cda1d9db1e4b50c17cdd12a770a67279905)]:
    -   @langchain/langgraph-sdk@1.9.2
    -   @langchain/react@1.0.2

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-11 03:26:06 -07:00
Christian Bromann a5089cda1d fix(sdk): preserve AI content blocks during message projection (#2377)
While testing out more streaming examples, discovered some minor bugs
around reasoning. This patch:

- Preserve structured AI message content blocks when converting
assembled stream messages, so reasoning blocks are not collapsed into
plain text.
- Update message reconciliation to prefer finalized `values.messages`
tool-call args when they contain meaningful data missing from the
streamed message.
- Add coverage for mixed reasoning/text content blocks using the
reasoning token stream fixture.
2026-05-11 03:19:51 -07:00
open-swe[bot] 4c6875c1e3 feat(sdk): support metadata filter for crons search/count (#2370)
## Description
Mirror the langgraph-api change in
https://github.com/langchain-ai/langgraph-api/pull/3400 by accepting an
optional `metadata` filter on `crons.search` and `crons.count` in the JS
SDK. Matches the existing pattern used for assistants/threads search.

## Release Note
JS SDK: `crons.search` and `crons.count` now accept an optional
`metadata` filter that is forwarded to the server.

## Test Plan
- [ ] New unit tests in `libs/sdk/src/client/crons/index.test.ts` verify
metadata is forwarded for both `search` and `count`, and omitted when
not provided.

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-05-08 14:22:11 -04:00
github-actions[bot] 69a7c01313 chore: version packages (#2367)
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-api@1.2.1

### Patch Changes

- [#2366](https://github.com/langchain-ai/langgraphjs/pull/2366)
[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(sdk): update endpoints

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

## @langchain/langgraph-cli@1.2.1

### Patch Changes

- Updated dependencies
\[[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)]:
    -   @langchain/langgraph-api@1.2.1

## @langchain/langgraph-sdk@1.9.1

### Patch Changes

- [#2366](https://github.com/langchain-ai/langgraphjs/pull/2366)
[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(sdk): update endpoints

## @langchain/angular@1.0.1

### Patch Changes

- Updated dependencies
\[[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)]:
    -   @langchain/langgraph-sdk@1.9.1

## @langchain/react@1.0.1

### Patch Changes

- Updated dependencies
\[[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)]:
    -   @langchain/langgraph-sdk@1.9.1

## @langchain/svelte@1.0.1

### Patch Changes

- Updated dependencies
\[[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)]:
    -   @langchain/langgraph-sdk@1.9.1

## @langchain/vue@1.0.1

### Patch Changes

- Updated dependencies
\[[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)]:
    -   @langchain/langgraph-sdk@1.9.1

## @langchain/langgraph-ui@1.2.1



## @example/ai-elements@0.1.16

### Patch Changes

-   Updated dependencies \[]:
    -   @langchain/react@1.0.1

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

### Patch Changes

-   Updated dependencies \[]:
    -   @langchain/react@1.0.1

## @examples/ui-angular@0.0.26

### Patch Changes

- Updated dependencies
\[[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)]:
    -   @langchain/langgraph-sdk@1.9.1
    -   @langchain/angular@1.0.1

## @examples/ui-multimodal@0.0.2

### Patch Changes

-   Updated dependencies \[]:
    -   @langchain/react@1.0.1

## @examples/ui-react@0.0.2

### Patch Changes

- Updated dependencies
\[[`2bb66bf`](https://github.com/langchain-ai/langgraphjs/commit/2bb66bf816a8b18b2968ed885ef2df15f684cb4e)]:
    -   @langchain/langgraph-sdk@1.9.1
    -   @langchain/react@1.0.1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-05 01:58:31 -07:00
Christian Bromann 2bb66bf816 fix(sdk): update endpoints (#2366)
Aligning with latest Python changes updating endpoints to be:

POST /threads/{thread_id}/stream/events — SSE event stream
POST /threads/{thread_id}/commands — JSON command
WS /threads/{thread_id}/stream/events

for new streaming features.
2026-05-05 01:54:42 -07:00
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
Christian Bromann 085a07f569 feat(core): event based streaming (#2314)
All stream v2 changes consolidated.

---------

Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-05-05 00:13:12 -07:00
Connor Braa d1e2fda1b1 feat(sdk): add returnMinimal to threads update (#2363)
Adds a first-class `returnMinimal` option to JS SDK `threads.update`.
When enabled, the SDK sends `Prefer: return=minimal` and resolves with
`undefined` for the 204 response. Includes a patch changeset and focused
fetch test coverage.
2026-05-04 15:46:03 -07:00
github-actions[bot] 740ce21852 chore: version packages (#2362)
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@0.4.7

### Patch Changes

- [#2354](https://github.com/langchain-ai/langgraphjs/pull/2354)
[`733d28e`](https://github.com/langchain-ai/langgraphjs/commit/733d28ea637135876375fa005a8d8a5605a692e6)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(sdk): pin framework SDKs to langgraph-sdk version

## @langchain/react@0.3.5

### Patch Changes

- [#2354](https://github.com/langchain-ai/langgraphjs/pull/2354)
[`733d28e`](https://github.com/langchain-ai/langgraphjs/commit/733d28ea637135876375fa005a8d8a5605a692e6)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(sdk): pin framework SDKs to langgraph-sdk version

## @langchain/svelte@0.4.7

### Patch Changes

- [#2354](https://github.com/langchain-ai/langgraphjs/pull/2354)
[`733d28e`](https://github.com/langchain-ai/langgraphjs/commit/733d28ea637135876375fa005a8d8a5605a692e6)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(sdk): pin framework SDKs to langgraph-sdk version

## @langchain/vue@0.4.7

### Patch Changes

- [#2354](https://github.com/langchain-ai/langgraphjs/pull/2354)
[`733d28e`](https://github.com/langchain-ai/langgraphjs/commit/733d28ea637135876375fa005a8d8a5605a692e6)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(sdk): pin framework SDKs to langgraph-sdk version

## @example/ai-elements@0.1.14

### Patch Changes

- Updated dependencies
\[[`733d28e`](https://github.com/langchain-ai/langgraphjs/commit/733d28ea637135876375fa005a8d8a5605a692e6)]:
    -   @langchain/react@0.3.5

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

### Patch Changes

- Updated dependencies
\[[`733d28e`](https://github.com/langchain-ai/langgraphjs/commit/733d28ea637135876375fa005a8d8a5605a692e6)]:
    -   @langchain/react@0.3.5

## @examples/ui-angular@0.0.24

### Patch Changes

- Updated dependencies
\[[`733d28e`](https://github.com/langchain-ai/langgraphjs/commit/733d28ea637135876375fa005a8d8a5605a692e6)]:
    -   @langchain/angular@0.4.7

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-01 17:30:18 -07:00
Christian Bromann 733d28ea63 fix(sdk): pin framework SDKs to langgraph-sdk version (#2354)
As a safe guard for the upcoming major release of the framework SDK
packages we pin the 0.x packages to whatever the latest langgraph-sdk
was at the time.
2026-05-01 16:58:06 -07:00
github-actions[bot] 1b66d654dd chore: version packages (#2347)
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-sdk@1.8.10

### Patch Changes

- [#2340](https://github.com/langchain-ai/langgraphjs/pull/2340)
[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)
Thanks [@cwlbraa](https://github.com/cwlbraa)! - Respect
`fetchStateHistory` when restoring subagent history.

## @langchain/angular@0.4.6

### Patch Changes

- [#2340](https://github.com/langchain-ai/langgraphjs/pull/2340)
[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)
Thanks [@cwlbraa](https://github.com/cwlbraa)! - Respect
`fetchStateHistory` when restoring subagent history.

- Updated dependencies
\[[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)]:
    -   @langchain/langgraph-sdk@1.8.10

## @langchain/react@0.3.4

### Patch Changes

- [#2340](https://github.com/langchain-ai/langgraphjs/pull/2340)
[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)
Thanks [@cwlbraa](https://github.com/cwlbraa)! - Respect
`fetchStateHistory` when restoring subagent history.

- Updated dependencies
\[[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)]:
    -   @langchain/langgraph-sdk@1.8.10

## @langchain/svelte@0.4.6

### Patch Changes

- [#2340](https://github.com/langchain-ai/langgraphjs/pull/2340)
[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)
Thanks [@cwlbraa](https://github.com/cwlbraa)! - Respect
`fetchStateHistory` when restoring subagent history.

- Updated dependencies
\[[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)]:
    -   @langchain/langgraph-sdk@1.8.10

## @langchain/vue@0.4.6

### Patch Changes

- [#2340](https://github.com/langchain-ai/langgraphjs/pull/2340)
[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)
Thanks [@cwlbraa](https://github.com/cwlbraa)! - Respect
`fetchStateHistory` when restoring subagent history.

- Updated dependencies
\[[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)]:
    -   @langchain/langgraph-sdk@1.8.10

## @example/ai-elements@0.1.13

### Patch Changes

- Updated dependencies
\[[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)]:
    -   @langchain/react@0.3.4

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

### Patch Changes

- Updated dependencies
\[[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)]:
    -   @langchain/react@0.3.4

## @examples/ui-angular@0.0.23

### Patch Changes

- Updated dependencies
\[[`6bab458`](https://github.com/langchain-ai/langgraphjs/commit/6bab458d4a03ce2d7b2708488b92226899eb94d4)]:
    -   @langchain/langgraph-sdk@1.8.10
    -   @langchain/angular@0.4.6

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-29 09:34:18 -07:00
Connor Braa 6bab458d4a fix(sdk): respect fetchStateHistory for subagent history (#2340)
## Summary

- skip eager subagent history restoration when `fetchStateHistory` is
`false`
- reuse numeric `fetchStateHistory` limits for subagent namespace
discovery
- add orchestrator regression coverage for both cases

## Context

- Slack thread:
https://langchain.slack.com/archives/C09BAECNA14/p1776755205756119
- [Agent Builder
trace](https://langchain-us.datadoghq.com/apm/entity/service%3Aagent_builder_prod?dependencyMap.showNetworkMetrics=false&fromUser=false&graphType=flamegraph&groupMapByOperation=null&historicalData=true&panels=qson%3A%28data%3A%28activePanelKey%3Atrace%2Cresource%3A%28resourceName%3APOST%2520%252Fthreads%252F%257Bthread_id%257D%252Fhistory%2CresourceID%3A2bfaa153eac24153%2CoperationName%3Astarlette.request%29%2Ctrace%3A%28traceID%3A69ef784f000000001773743cf39a72b5%2CspanID%3A8969752200629810217%2ChasSearchOrFacetActions%3A%21f%29%29%2Cversion%3A%210%29&resources=qson%3A%28data%3A%28visible%3A%21t%2Chits%3A%28selected%3Arate%2CgroupBy%3A%5Bresource_name%5D%29%2Cerrors%3A%28selected%3Atotal%2CgroupBy%3A%5Bresource_name%5D%29%2Clatency%3A%28selected%3Ap95%2CgroupBy%3A%5Bresource_name%5D%29%2CtopN%3Aall%29%2Cversion%3A%211%29&shouldShowLegend=true&spanID=8969752200629810217&spanKind=server&spanViewType=logs&summary=qson%3A%28data%3A%28visible%3A%21t%2Cchanges%3A%28%29%2Cerrors%3A%28selected%3Acount%2CgroupBy%3A%5B%5D%29%2Chits%3A%28selected%3Arate%2CgroupBy%3A%5B%5D%29%2Clatency%3A%28selected%3Alatency%2Cslot%3A%28agg%3A95%29%2Cdistribution%3A%28isLogScale%3A%21f%29%2CshowTraceOutliers%3A%21t%2CgroupBy%3A%5B%5D%2Coperation%3Astarlette.request%29%2Csublayer%3A%28slot%3A%28layers%3AserviceAndInferred%29%2Cselected%3Apercentage%29%2ClagMetrics%3A%28selectedMetric%3A%21s%2CselectedGroupBy%3A%21s%29%29%2Cversion%3A%211%29&timeHint=1777301587169&trace=AwAAAZ3PbgThpE93_wAAABhBWjNQYmdkWUFBQ2ZVVkFJVExwS3lYTVgAAAAkMTE5ZGNmODctODg4Ny00ZTY5LThlN2MtNGEzOWU2ZTE3ZjY0AAUrsg&traceID=69ef784f000000001773743cf39a72b5&traceQuery=&start=1777062982891&end=1777322182891&paused=false)

## Test Plan

- `corepack pnpm exec vitest run src/ui/orchestrator.test.ts
--typecheck.enabled=false` from `libs/sdk`
- `corepack pnpm run lint -- libs/sdk-react/src/stream.lgp.tsx
libs/sdk/src/react/stream.lgp.tsx libs/sdk/src/ui/orchestrator.ts
libs/sdk/src/ui/manager.ts libs/sdk/src/ui/orchestrator.test.ts`
- `corepack pnpm run format:check -- libs/sdk-react/src/stream.lgp.tsx
libs/sdk/src/react/stream.lgp.tsx libs/sdk/src/ui/orchestrator.ts
libs/sdk/src/ui/manager.ts libs/sdk/src/ui/orchestrator.test.ts
.changeset/tame-subagent-history.md`
2026-04-29 08:53:30 -07:00
github-actions[bot] 0120a78d58 chore: version packages (#2343)
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.3.0

### Minor Changes

- [#2326](https://github.com/langchain-ai/langgraphjs/pull/2326)
[`36916ed`](https://github.com/langchain-ai/langgraphjs/commit/36916ed86e63eb07249a68ecf0508e3b986ba587)
Thanks [@tadjik1](https://github.com/tadjik1)! - feat: add MongoDBStore
for long-term memory

New `MongoDBStore` class for persisting data across threads and sessions
— user preferences, learned facts, agent memory, and more.

- Store and retrieve JSON documents organized by hierarchical namespaces
    -   Search with field-based filtering and comparison operators
- Vector similarity search with manual embedding (bring your own
embedding model) or auto embedding (MongoDB generates embeddings via
Voyage AI)
    -   Automatic document expiration via configurable TTL

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-04-28 16:37:19 -07:00
Sergey Zelenov 36916ed86e feat(langgraph-checkpoint-mongodb): add MongoDBStore for long-term memory with manual and auto embedding (#2326)
## Summary

Adds `MongoDBStore` - a `BaseStore` implementation backed by MongoDB for
long-term cross-thread memory. While the existing `MongoDBSaver`
persists graph execution state within a single thread (checkpoints),
`MongoDBStore` enables agents to store and retrieve data across threads
and sessions - user preferences, learned facts, agent instructions, and
more.

Fixes [NODE-7497](https://jira.mongodb.org/browse/NODE-7497)

Built on top of the initial implementation by @PavelSafronov and
@RaschidJFR (PR #2320). Their work provided the foundation for the
store, auto embedding integration, and Docker test setup.

## Review notes

This PR is organized into two self-contained commits that can be
reviewed independently:

1. **[`add MongoDBStore with core CRUD and field-based
search`](https://github.com/langchain-ai/langgraphjs/commit/1415f7f6c7df0338644444feffa14f8123e2f0a8)**
- the store itself with all non-embedding functionality, namespace
prefix matching, matchConditions, tests
2. **[`add manual and auto embedding
support`](https://github.com/langchain-ai/langgraphjs/pull/2326/changes/7bc2ecd80840b1bd291d7dfcdc012a704b614040)**
- adds vector search on top of the first commit, including IndexConfig,
embedding logic in put/search, vector search index creation, tests

## What's included

### Core store (commit 1)
- `MongoDBStore` extending `BaseStore` with Put, Get, Delete, Search,
and ListNamespaces operations
- Hierarchical namespace organization with unique `(namespace, key)`
index
- Field-based search with comparison operators (`$eq`, `$ne`, `$gt`,
`$gte`, `$lt`, `$lte`)
- Namespace prefix matching in search using dot-notation array indexing
- ListNamespaces with `matchConditions` support (prefix, suffix, and
wildcard filtering)
- TTL support via MongoDB TTL index with optional refresh-on-read
- Factory method `fromConnString` for convenient setup
- Refactors existing `MongoDBSaver` into separate `checkpoint.ts` file

### Embedding support (commit 2)
Two modes for vector similarity search via MongoDB `$vectorSearch`, both
requiring `indexConfig`:

**Manual embedding** - app provides an `EmbeddingsInterface`:
  - Store computes vectors on put via `embedDocuments()`
- Search computes query vector via `embedQuery()` and uses `queryVector`
in `$vectorSearch`

**Auto embedding** - no `EmbeddingsInterface` needed:
  - Store writes plain text to the embedding field
- MongoDB generates embeddings server-side via Voyage AI (requires
`model` in `indexConfig`)
  - Search sends query text via `query.text` in `$vectorSearch`
  - Requires MongoDB 8.2+ with auto embedding support

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-04-28 14:48:27 -07:00
github-actions[bot] aba243a403 chore: version packages (#2313)
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@1.2.9

### Patch Changes

- [#2315](https://github.com/langchain-ai/langgraphjs/pull/2315)
[`9102d52`](https://github.com/langchain-ai/langgraphjs/commit/9102d526c858a4cdbe9b47dcdd062b93da93e49f)
Thanks [@hntrl](https://github.com/hntrl)! - propagate tracer metadata
defaults from configurable

- [#2311](https://github.com/langchain-ai/langgraphjs/pull/2311)
[`b7c196b`](https://github.com/langchain-ai/langgraphjs/commit/b7c196b2142fb888dfcd9ceb1dfb4365d803c8b6)
Thanks [@open-swe](https://github.com/apps/open-swe)! - fix: export
missing types for typescript 6.0 declaration file compatibility

- Updated dependencies
\[[`458d66b`](https://github.com/langchain-ai/langgraphjs/commit/458d66bf665468854abb8133594d4d4f966054ed)]:
    -   @langchain/langgraph-sdk@1.8.9

## @langchain/langgraph-sdk@1.8.9

### Patch Changes

- [#2302](https://github.com/langchain-ai/langgraphjs/pull/2302)
[`458d66b`](https://github.com/langchain-ai/langgraphjs/commit/458d66bf665468854abb8133594d4d4f966054ed)
Thanks [@AdrianSajjan](https://github.com/AdrianSajjan)! - fix(sdk):
preserve messages on interrupt values events

    Add a regression test for interrupt-only `values` payloads to ensure
previously streamed messages are not overwritten when `__interrupt__` is
emitted.

## @example/ai-elements@0.1.12

### Patch Changes

- Updated dependencies
\[[`9102d52`](https://github.com/langchain-ai/langgraphjs/commit/9102d526c858a4cdbe9b47dcdd062b93da93e49f),
[`b7c196b`](https://github.com/langchain-ai/langgraphjs/commit/b7c196b2142fb888dfcd9ceb1dfb4365d803c8b6)]:
    -   @langchain/langgraph@1.2.9

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

### Patch Changes

- Updated dependencies
\[[`9102d52`](https://github.com/langchain-ai/langgraphjs/commit/9102d526c858a4cdbe9b47dcdd062b93da93e49f),
[`b7c196b`](https://github.com/langchain-ai/langgraphjs/commit/b7c196b2142fb888dfcd9ceb1dfb4365d803c8b6)]:
    -   @langchain/langgraph@1.2.9

## @examples/ui-angular@0.0.22

### Patch Changes

- Updated dependencies
\[[`458d66b`](https://github.com/langchain-ai/langgraphjs/commit/458d66bf665468854abb8133594d4d4f966054ed),
[`9102d52`](https://github.com/langchain-ai/langgraphjs/commit/9102d526c858a4cdbe9b47dcdd062b93da93e49f),
[`b7c196b`](https://github.com/langchain-ai/langgraphjs/commit/b7c196b2142fb888dfcd9ceb1dfb4365d803c8b6)]:
    -   @langchain/langgraph-sdk@1.8.9
    -   @langchain/langgraph@1.2.9

## langgraph@1.0.31

### Patch Changes

- Updated dependencies
\[[`9102d52`](https://github.com/langchain-ai/langgraphjs/commit/9102d526c858a4cdbe9b47dcdd062b93da93e49f),
[`b7c196b`](https://github.com/langchain-ai/langgraphjs/commit/b7c196b2142fb888dfcd9ceb1dfb4365d803c8b6)]:
    -   @langchain/langgraph@1.2.9

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-04-16 07:07:37 +00:00
Hunter Lovell 9102d526c8 fix(langgraph): propagate tracer metadata defaults from configurable (#2315)
## Summary

This updates Pregel callback manager initialization to pass
`tracerInheritableMetadata` defaults derived from `config.configurable`,
and narrows `ensureLangGraphConfig` metadata mirroring to the
allowlisted LangGraph identifiers used in stream/runtime metadata.

## Changes

### `@langchain/langgraph` (`libs/langgraph-core`)

- Updated Pregel callback manager setup to configure core callbacks with
`tracerInheritableMetadata` based on configurable primitive values,
excluding internal and secret-like keys.
- Hoisted tracing default logic into `_getTracingMetadataDefaults` and
`_excludeAsMetadata` for parity with the Python implementation shape.
- Restricted `ensureLangGraphConfig` configurable-to-metadata
propagation to the identifier allowlist:
  - `thread_id`
  - `checkpoint_id`
  - `checkpoint_ns`
  - `task_id`
  - `run_id`
  - `assistant_id`
  - `graph_id`
- Updated config tests to assert the narrowed metadata propagation
behavior.
2026-04-15 18:48:41 -07:00
Adrian Sajjan 458d66bf66 Prevent values from getting overrwritten on interrupt event (#2302)
Issue:

In multi-agent sustem with handoffs like this example:
https://docs.langchain.com/oss/python/langchain/multi-agent/handoffs#multiple-agent-subgraphs,
if we trigger an interrupt from an agent within a swarm workflow, the
interrupt is propagated and sent twice, the last interrupt contains
values from the main graphs state, which is always going to be behind
the state of the agent from where interrupt is triggered. So,
temporarily, the message data becomes empty, it gets refilled when
interrupt is resumed

Fixes:

Do not update values when interrupt is recieved, just update the
interrupt in the state with the latest __interrupt data.

---------

Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-04-14 12:54:08 -07:00
open-swe[bot] b7c196b214 fix: export missing types for typescript 6.0 declaration file compatibility (#2311)
## Description
TypeScript 6.0 requires that any type emitted to a declaration file is
reachable via the package's `exports` field. Several types used in
`StateGraph`'s public API (class extends clause, constructor overloads,
method signatures) were not exported from the package entrypoints,
causing TS6 consumers to fail when exporting `StateGraph` instances from
their own packages.

Adds exports for: `ToStateDefinition`, `StateGraphNodeSpec`, `NodeSpec`,
`AddNodeOptions`, `StateGraphAddNodeOptions`,
`StateGraphArgsWithStateSchema`, `StateGraphArgsWithInputOutputSchemas`,
`CachePolicy`, `AnyStateSchema`, `StateSchemaFieldToChannel`,
`StateSchemaFieldsToStateDefinition`.

## Test Plan
- [ ] Verify a TS6 project can export a `StateGraph` instance without
declaration file errors
- [ ] Build passes with `pnpm build`

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Christian Bromann <git@bromann.dev>
2026-04-13 10:28:29 -07:00
github-actions[bot] 9e9807523f chore: version packages (#2294)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-04-07 08:14:22 -07:00
open-swe[bot] e42c2c8836 feat: enhance runtime with executionInfo and serverInfo (#2275)
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-04-05 21:15:56 -07:00
github-actions[bot] 2a5b85bf55 chore: version packages (#2293)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-05 18:28:15 -07:00