Files
langgraphjs/libs/sdk
github-actions[bot] 957cac4ea4 chore: version packages (#2526)
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@1.1.1

### Patch Changes

- [#2527](https://github.com/langchain-ai/langgraphjs/pull/2527)
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
chore(deps): remove uuid dependency in favor of embedded uuid in core

Replace direct `uuid` package imports with `@langchain/core/utils/uuid`
across
langgraph packages to deduplicate dependencies and align with
@langchain/core's
    embedded UUID utilities.

## @langchain/langgraph-checkpoint-redis@1.0.9

### Patch Changes

- [#2525](https://github.com/langchain-ai/langgraphjs/pull/2525)
[`829a32a`](https://github.com/langchain-ai/langgraphjs/commit/829a32a30cc22103b1cb0aba6a027b7ccdb68447)
Thanks [@lhlyu](https://github.com/lhlyu)! - Fix Redis checkpoint
pending write deserialization when a write document has no `value`
field. RedisJSON omits `undefined` values, so `loadPendingWrites` now
restores a missing `value` as `undefined` instead of passing it through
JSON parsing.

- [#2527](https://github.com/langchain-ai/langgraphjs/pull/2527)
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
chore(deps): remove uuid dependency in favor of embedded uuid in core

Replace direct `uuid` package imports with `@langchain/core/utils/uuid`
across
langgraph packages to deduplicate dependencies and align with
@langchain/core's
    embedded UUID utilities.

## @langchain/langgraph-api@1.3.1

### Patch Changes

- [#2527](https://github.com/langchain-ai/langgraphjs/pull/2527)
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
chore(deps): remove uuid dependency in favor of embedded uuid in core

Replace direct `uuid` package imports with `@langchain/core/utils/uuid`
across
langgraph packages to deduplicate dependencies and align with
@langchain/core's
    embedded UUID utilities.

- Updated dependencies
\[[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-ui@1.3.1

## @langchain/langgraph-cli@1.3.1

### Patch Changes

- [#2527](https://github.com/langchain-ai/langgraphjs/pull/2527)
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
chore(deps): remove uuid dependency in favor of embedded uuid in core

Replace direct `uuid` package imports with `@langchain/core/utils/uuid`
across
langgraph packages to deduplicate dependencies and align with
@langchain/core's
    embedded UUID utilities.

- Updated dependencies
\[[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-api@1.3.1

## @langchain/langgraph@1.4.2

### Patch Changes

- [#2527](https://github.com/langchain-ai/langgraphjs/pull/2527)
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
chore(deps): remove uuid dependency in favor of embedded uuid in core

Replace direct `uuid` package imports with `@langchain/core/utils/uuid`
across
langgraph packages to deduplicate dependencies and align with
@langchain/core's
    embedded UUID utilities.

- Updated dependencies
\[[`ba31f04`](https://github.com/langchain-ai/langgraphjs/commit/ba31f045d1d458a456c6f6441e8ee81d32c5c700),
[`e7e8035`](https://github.com/langchain-ai/langgraphjs/commit/e7e8035fadca5f0d4cbc55bbbb77e65878ab2952),
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-sdk@1.9.22
    -   @langchain/langgraph-checkpoint@1.1.1

## @langchain/langgraph-supervisor@1.1.1

### Patch Changes

- [#2527](https://github.com/langchain-ai/langgraphjs/pull/2527)
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
chore(deps): remove uuid dependency in favor of embedded uuid in core

Replace direct `uuid` package imports with `@langchain/core/utils/uuid`
across
langgraph packages to deduplicate dependencies and align with
@langchain/core's
    embedded UUID utilities.

## @langchain/langgraph-ui@1.3.1

### Patch Changes

- [#2527](https://github.com/langchain-ai/langgraphjs/pull/2527)
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
chore(deps): remove uuid dependency in favor of embedded uuid in core

Replace direct `uuid` package imports with `@langchain/core/utils/uuid`
across
langgraph packages to deduplicate dependencies and align with
@langchain/core's
    embedded UUID utilities.

## @langchain/langgraph-sdk@1.9.22

### Patch Changes

- [#2529](https://github.com/langchain-ai/langgraphjs/pull/2529)
[`ba31f04`](https://github.com/langchain-ai/langgraphjs/commit/ba31f045d1d458a456c6f6441e8ee81d32c5c700)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(sdk): reconnect SSE streams when heartbeat idle is detected

Detect half-open SSE connections by watching for server keep-alive
heartbeats (`: heartbeat`) and reconnecting with Last-Event-ID or
`since` when they stop. `"auto"` mode arms only after heartbeats are
observed, so long tool calls and HITL pauses do not false-fire on
heartbeat-emitting servers.

- [#2528](https://github.com/langchain-ai/langgraphjs/pull/2528)
[`e7e8035`](https://github.com/langchain-ai/langgraphjs/commit/e7e8035fadca5f0d4cbc55bbbb77e65878ab2952)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
Allow custom `AgentServerAdapter`s to be late-bound and re-bound to a
thread. Adapters can now implement an optional `setThreadId(threadId)`,
which `client.threads.stream(threadId, { transport })` calls when
binding the active thread — including the lazily-minted id from the
first `submit()` on a `threadId: null` controller. The built-in
`ProtocolSseTransportAdapter`, `ProtocolWebSocketTransportAdapter`, and
`HttpAgentServerAdapter` implement it: `threadId` is now optional at
construction, request URLs derive from the currently-bound thread, and
`paths` entries may be functions of the thread id (`(threadId) =>
string`). This lets a single custom transport back a lazy
thread-creation flow instead of being pinned to one thread at
construction.

- [#2527](https://github.com/langchain-ai/langgraphjs/pull/2527)
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
chore(deps): remove uuid dependency in favor of embedded uuid in core

Replace direct `uuid` package imports with `@langchain/core/utils/uuid`
across
langgraph packages to deduplicate dependencies and align with
@langchain/core's
    embedded UUID utilities.

## @langchain/angular@1.0.23

### Patch Changes

- Updated dependencies
\[[`ba31f04`](https://github.com/langchain-ai/langgraphjs/commit/ba31f045d1d458a456c6f6441e8ee81d32c5c700),
[`e7e8035`](https://github.com/langchain-ai/langgraphjs/commit/e7e8035fadca5f0d4cbc55bbbb77e65878ab2952),
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-sdk@1.9.22

## @langchain/react@1.0.23

### Patch Changes

- Updated dependencies
\[[`ba31f04`](https://github.com/langchain-ai/langgraphjs/commit/ba31f045d1d458a456c6f6441e8ee81d32c5c700),
[`e7e8035`](https://github.com/langchain-ai/langgraphjs/commit/e7e8035fadca5f0d4cbc55bbbb77e65878ab2952),
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-sdk@1.9.22

## @langchain/svelte@1.0.23

### Patch Changes

- Updated dependencies
\[[`ba31f04`](https://github.com/langchain-ai/langgraphjs/commit/ba31f045d1d458a456c6f6441e8ee81d32c5c700),
[`e7e8035`](https://github.com/langchain-ai/langgraphjs/commit/e7e8035fadca5f0d4cbc55bbbb77e65878ab2952),
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-sdk@1.9.22

## @langchain/vue@1.0.23

### Patch Changes

- Updated dependencies
\[[`ba31f04`](https://github.com/langchain-ai/langgraphjs/commit/ba31f045d1d458a456c6f6441e8ee81d32c5c700),
[`e7e8035`](https://github.com/langchain-ai/langgraphjs/commit/e7e8035fadca5f0d4cbc55bbbb77e65878ab2952),
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-sdk@1.9.22

## @example/ai-elements@0.1.38

### Patch Changes

- Updated dependencies
\[[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph@1.4.2
    -   @langchain/react@1.0.23

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

### Patch Changes

- Updated dependencies
\[[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph@1.4.2
    -   @langchain/react@1.0.23

## @examples/ui-angular@0.0.48

### Patch Changes

- Updated dependencies
\[[`ba31f04`](https://github.com/langchain-ai/langgraphjs/commit/ba31f045d1d458a456c6f6441e8ee81d32c5c700),
[`e7e8035`](https://github.com/langchain-ai/langgraphjs/commit/e7e8035fadca5f0d4cbc55bbbb77e65878ab2952),
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-sdk@1.9.22
    -   @langchain/langgraph@1.4.2
    -   @langchain/angular@1.0.23

## @examples/ui-multimodal@0.0.24

### Patch Changes

- Updated dependencies
\[[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph@1.4.2
    -   @langchain/react@1.0.23

## @examples/ui-react@0.0.24

### Patch Changes

- Updated dependencies
\[[`ba31f04`](https://github.com/langchain-ai/langgraphjs/commit/ba31f045d1d458a456c6f6441e8ee81d32c5c700),
[`e7e8035`](https://github.com/langchain-ai/langgraphjs/commit/e7e8035fadca5f0d4cbc55bbbb77e65878ab2952),
[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph-sdk@1.9.22
    -   @langchain/langgraph@1.4.2
    -   @langchain/react@1.0.23

## langgraph@1.0.42

### Patch Changes

- Updated dependencies
\[[`9e114e5`](https://github.com/langchain-ai/langgraphjs/commit/9e114e55d362a874878a817740de42fd62ae9db7)]:
    -   @langchain/langgraph@1.4.2

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-12 14:33:35 -07:00
..
2026-06-12 14:33:35 -07:00
2025-07-02 21:26:14 +02:00
2026-06-12 14:33:35 -07:00
2025-07-02 21:26:14 +02:00

@langchain/langgraph-sdk

The JavaScript / TypeScript SDK for talking to a LangGraph API server. Use it to create and manage assistants, threads, runs, cron schedules, and the KV store — and, most importantly, to stream graph executions in real time.

📚 Full documentation

Install

pnpm add @langchain/langgraph-sdk @langchain/core
# or: npm install @langchain/langgraph-sdk @langchain/core
# or: yarn add @langchain/langgraph-sdk @langchain/core

Quick start

import { Client } from "@langchain/langgraph-sdk";

const client = new Client({ apiUrl: "http://localhost:2024" });

// Open a thread-centric stream (the recommended way to stream).
const thread = client.threads.stream({ assistantId: "my-agent" });

await thread.run.start({
  input: { messages: [{ role: "user", content: "hello" }] },
});

for await (const message of thread.messages) {
  for await (const token of message.text) {
    process.stdout.write(token);
  }
}

console.log(await thread.output);
await thread.close();

With no apiUrl, the SDK points at http://localhost:2024 (the default langgraph dev URL).

What's in the SDK

Sub-client Purpose Docs
client.threads Create threads, manage state, and stream runs. Threads · Streaming
client.assistants CRUD for assistants (schemas, graphs, versions). Assistants
client.runs Trigger / join / cancel runs without streaming. Runs (legacy)
client.crons Schedule recurring runs. Crons
client.store Namespaced KV + semantic store. Store

Streaming

client.threads.stream(...) returns a ThreadStream with typed, lazy projections for every aspect of a run:

  • thread.messages / thread.toolCalls — assembled chat output.
  • thread.values / thread.output — graph state and final answer.
  • thread.interrupts / thread.interrupted — human-in-the-loop.
  • thread.subgraphs / thread.subagents — nested / deep-agent work.
  • thread.extensions.<name> — typed custom server projections.
  • thread.audio / thread.images / thread.video / thread.files — media.

Deprecated. The generator-based streaming APIs on client.runs.* (stream, joinStream) and client.threads.joinStream are preserved for backwards compatibility only. New code should use client.threads.stream(...). See Runs (legacy) for migration guidance.

Transports

Streaming defaults to Server-Sent Events (SSE) over HTTP. You can switch to WebSocket per-call or globally, or plug in a custom AgentServerAdapter:

const thread = client.threads.stream({
  assistantId: "my-agent",
  transport: "websocket",
});

See Transports for full details.

Framework adapters

If you're building a UI, use the framework-specific packages that wrap this SDK:

Use the SDK directly when you need low-level control, run it from a non-browser environment (Node.js server, edge workers, scripts), or integrate into a framework that does not yet have a first-party adapter.

Architecture

The client code is organized into sub-client modules under src/client/:

Path Module
client/assistants/ AssistantsClient
client/threads/ ThreadsClient (includes the v2 stream(...) primitive)
client/runs/ RunsClient (legacy streaming + CRUD)
client/crons/ CronsClient
client/store/ StoreClient
client/stream/ ThreadStream, assemblers, transports
client/base.ts BaseClient, shared config & helpers
client/index.ts Main Client class & re-exports

Change log

See CHANGELOG.md.