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>
## 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>
## Security Alert Patch (medium-tier follow-up)
Follow-up to #2329, which patched the critical+high tier. This PR
resolves the remaining **6 medium-severity Dependabot alerts** via
`pnpm.overrides` plus one published-path constraint bump. All fixes are
patch/minor bumps within the current major — no breaking changes.
### Packages Updated
| Package | Old Constraint | New Constraint | Strategy | Scope | CVEs
Resolved |
|---------|---------------|----------------|----------|-------|---------------|
| `axios` | `>=1.13.5` (override) | `>=1.15.0` (override); resolved
1.13.6 → **1.15.1** | C (override) | dev-only (via `@langchain/scripts`
devDep) | CVE-2025-62718 (SSRF via NO_PROXY bypass), CVE-2026-40175
(cloud metadata exfiltration) |
| `dompurify` | (transitive, resolved 3.3.3) | `>=3.4.0` (new override);
resolved **3.4.0** | C (override) | dev-only (private
`@example/ai-elements` via mermaid) | GHSA-39q2-94rc-95cp (ADD_TAGS
bypasses FORBID_TAGS) |
| `follow-redirects` | (transitive, resolved 1.15.11) | `>=1.16.0` (new
override); resolved **1.16.0** | C (override) | dev-only (via
`@langchain/scripts` devDep) | GHSA-r4q5-vmmm-2653 (auth header leak on
cross-domain redirect) |
| `langsmith` (published path) | `langsmith: >=0.3.33 <1.0.0` in
`libs/langgraph-api/package.json` | `>=0.5.19 <1.0.0` | **A (manifest
bump)** | **published** — direct dep of `@langchain/langgraph-api` |
CVE-2026-40190 (prototype pollution), GHSA-rr7j-v2q5-chgv (streaming
redaction bypass) |
| `langsmith` (dev chains) | (transitive 0.4.12, 0.5.16 resolved via
`@langchain/classic`, `langchain@1.3.0`) | `langsmith@<0.5.19: >=0.5.19
<1` (new override) | C (override) | dev-only | same as above (flushes
vulnerable transitive copies) |
*Strategy C overrides follow the existing repo pattern — axios, qs,
undici, minimatch, brace-expansion, protobufjs, basic-ftp, vite, and
defu are already overridden the same way.*
### Published-path rationale
`@langchain/langgraph-api` exercises `langsmith` at runtime for tracing
and streaming, which touches the affected internal code paths (lodash
`set()` prototype-pollution guard, token-event redaction). Therefore the
fix is Strategy A (raise the published lower bound) rather than
A-lockfile — this protects end users who pin `@langchain/langgraph-api`.
The lockfile already resolved `langsmith@0.5.20` before this change, so
installs are unchanged at HEAD; the bump is a downstream-safety
constraint tightening.
### Deferred (not fixed in this PR)
- **`protobufjs@6.11.5`** (CRITICAL, CVE-2026-41242) — reached via
`@xenova/transformers@2.17.2` in `libs/langgraph-core` devDeps +
examples. `@xenova/transformers` is abandoned; the successor is
`@huggingface/transformers@3`. Forcing a 6.x → 7.x override would cross
a breaking API boundary. **Upstream issue — requires a manual migration,
tracked separately.** (See #2329 body for full context.)
- **`elliptic@6.6.1`** (LOW, GHSA-848j-6mx2-7j84) —
`first_patched_version` is `null`; upstream has not released a fix.
Defer until a patched version ships.
### CVE Details
- **CVE-2025-62718** / GHSA-3p68-rc4w-qgx5 — Axios NO_PROXY Hostname
Normalization Bypass Leads to SSRF —
https://github.com/advisories/GHSA-3p68-rc4w-qgx5
- **CVE-2026-40175** / GHSA-fvcv-3m26-pcqx — Axios Unrestricted Cloud
Metadata Exfiltration via Header Injection Chain —
https://github.com/advisories/GHSA-fvcv-3m26-pcqx
- **GHSA-39q2-94rc-95cp** — DOMPurify `ADD_TAGS` bypasses `FORBID_TAGS`
via short-circuit evaluation —
https://github.com/advisories/GHSA-39q2-94rc-95cp
- **GHSA-r4q5-vmmm-2653** — follow-redirects leaks custom authentication
headers to cross-domain redirect targets —
https://github.com/advisories/GHSA-r4q5-vmmm-2653
- **CVE-2026-40190** / GHSA-fw9q-39r9-c252 — LangSmith prototype
pollution via incomplete `__proto__` guard in internal lodash `set()` —
https://github.com/advisories/GHSA-fw9q-39r9-c252
- **GHSA-rr7j-v2q5-chgv** — LangSmith streaming token events bypass
output redaction — https://github.com/advisories/GHSA-rr7j-v2q5-chgv
### Linear Tickets
Linear ticket lookup returned no matches for the resolved CVEs/GHSAs. No
ticket IDs included in the title.
### Verification
- [x] Lockfile regenerated via `pnpm install --lockfile-only`
- [x] `pnpm lint` (oxlint) — 0 warnings, 0 errors
- [x] `pnpm format:check` (oxfmt) — clean
- [x] `pnpm audit --prod` — **No known vulnerabilities found**
- [x] `pnpm typecheck` on `libs/langgraph-api` — clean
- [x] No staged secrets (`gitleaks git --staged`)
🤖 Submitted by langster-patch
Co-authored-by: John Kennedy <jkennedyvz@users.noreply.github.com>
## Security Alert Patch
Resolves **7 Dependabot security alerts** in the critical + high
severity tier via `pnpm.overrides` in the root `package.json`. All fixes
are patch/minor bumps within the current major — no breaking changes.
### Packages Updated
| Package | Old Constraint | New Constraint | Strategy | Scope | CVEs
Resolved |
|---------|---------------|----------------|----------|-------|---------------|
| `protobufjs` | (transitive, resolved 7.5.4) | `>=7.5.5 <8` | C
(override) | dev-only (testcontainers chain + `@xenova/transformers`
devDeps) | CVE-2026-41242 |
| `basic-ftp` | (transitive, resolved 5.2.0) | `>=5.3.0 <6` | C
(override) | effectively dev-only (reached only via `@vitest/browser` —
an optional peerDep of vitest — through webdriverio→proxy-agent) |
GHSA-rp42-5vxx-qpwr, GHSA-6v7q-wjvx-w8wg, CVE-2026-39983 |
| `vite` (7.x only) | (transitive via vitest peer, resolved 7.3.1) |
`>=7.3.2` | C (override, scoped to vite@7) | effectively dev-only (vite
is a peerDependency of vitest — end users supply their own vite) |
CVE-2026-39363, CVE-2026-39364 |
| `defu` | (transitive, resolved 6.1.4) | `>=6.1.5 <7` | C (override) |
dev-only (`internal/build` via tsdown) | CVE-2026-35209 |
*Strategy C (pnpm.overrides) follows the existing pattern in this repo —
axios, qs, undici, minimatch, brace-expansion, etc. are already
overridden the same way.*
### Side-effect Fixes
Bumping `vite@7` to 7.3.2 also resolves one **medium** alert that wasn't
in the primary batch:
- CVE-2026-39365 / GHSA-4w7w-66w2-5vf9 — vite Path Traversal in
Optimized Deps `.map` Handling
### Upstream / Design Issues (NOT fixed in this PR)
- **`protobufjs@6.11.x`** persists in the dependency graph via
`@xenova/transformers@2.17.2` (`libs/langgraph-core` devDep + 9 example
apps). `@xenova/transformers` is abandoned and rebranded as
`@huggingface/transformers@3`; a migration would be a separate manual
dev-only upgrade. The 6.x line is in devDependencies only and does not
ship to published package consumers. Dependabot may continue to flag the
6.x range because the advisory's `vulnerable_range` is `< 7.5.5`.
- **Published-path caveat for `basic-ftp` and `vite`:** Both transit
through `@langchain/langgraph-checkpoint-validation`'s
`dependencies.vitest`. However, `vite` is declared as a
**peerDependency** of vitest (end users supply their own), and
`basic-ftp` reaches end users only through `@vitest/browser` — an
**optional peerDependency** that users must explicitly opt into.
Overrides in this PR protect local dev and CI; end users of
`@langchain/langgraph-checkpoint-validation` are not exposed unless they
independently install and configure the browser-testing chain.
### Deferred (medium + low tier)
Per security-alert-patch policy, only the highest active severity tier
was patched in this PR. The following remain open and would be addressed
in a follow-up batch:
- 6 medium: axios ×2 (SSRF + cloud-metadata exfil — existing `axios:
>=1.13.5` override doesn't cover 1.15.0), dompurify, langsmith ×2,
follow-redirects
- 1 low: elliptic (no `first_patched_version` published — upstream has
not released a fix)
### Verification
- [x] Lockfile regenerated via `pnpm install --lockfile-only`
- [x] `pnpm lint` (oxlint) — 0 warnings, 0 errors
- [x] `pnpm format:check` (oxfmt) — clean
- [x] `pnpm audit --prod` — 0 critical, 0 high remaining (3 moderates =
the deferred medium alerts)
- [x] No staged secrets (gitleaks)
### Linear Tickets
Linear ticket lookup skipped — CLI not authenticated in this
environment. No ticket IDs included in title.
🤖 Submitted by langster-patch
Co-authored-by: John Kennedy <jkennedyvz@users.noreply.github.com>
Bumps [langsmith](https://github.com/langchain-ai/langsmith-sdk) from
0.5.19 to 0.5.20.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/langchain-ai/langsmith-sdk/commits">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraphjs/network/alerts).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## 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.
Bumps [langsmith](https://github.com/langchain-ai/langsmith-sdk) from
0.5.18 to 0.5.19.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/langchain-ai/langsmith-sdk/commits">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraphjs/network/alerts).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Summary
Adds pull request title linting to enforce Conventional Commit style
titles in this repository.
## Changes
- Add .github/workflows/pr_lint.yml
- Reject empty scopes in PR titles (for example, fix(): ...)
- Validate title format via amannn/action-semantic-pull-request
- Allow langgraphjs package/area scopes and ignore label override
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>
## 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>
Bumps [langsmith](https://github.com/langchain-ai/langsmith-sdk) from
0.5.16 to 0.5.18.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/langchain-ai/langsmith-sdk/commits">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraphjs/network/alerts).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>