Commit Graph

153 Commits

Author SHA1 Message Date
github-actions[bot] c231aed3ee chore: version packages (#525)
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/quickjs@0.4.0

### Minor Changes

- [#531](https://github.com/langchain-ai/deepagentsjs/pull/531)
[`a76b7df`](https://github.com/langchain-ai/deepagentsjs/commit/a76b7df62310e7f2dd49bb1ea5f1b3ee6c8590b6)
Thanks [@colifran](https://github.com/colifran)! - chore(quickjs):
update `REPLMiddleware` to be named `CodeInterpreterMiddleware`

### Patch Changes

- [#524](https://github.com/langchain-ai/deepagentsjs/pull/524)
[`2cbd524`](https://github.com/langchain-ai/deepagentsjs/commit/2cbd5245a43fb1ba97fa532c1942a8903e090cfa)
Thanks [@colifran](https://github.com/colifran)! - fix(quickjs):
individual repl sessions use individual wasm module causing inefficient
memory usage

## deepagents-acp@0.1.11

### Patch Changes

- Updated dependencies
\[[`f164f99`](https://github.com/langchain-ai/deepagentsjs/commit/f164f992e06a157573612fb2640232f44d9daa18)]:
    -   deepagents@1.10.1

## deepagents@1.10.1

### Patch Changes

- [#479](https://github.com/langchain-ai/deepagentsjs/pull/479)
[`f164f99`](https://github.com/langchain-ai/deepagentsjs/commit/f164f992e06a157573612fb2640232f44d9daa18)
Thanks [@ramon-langchain](https://github.com/ramon-langchain)! -
feat(deepagents): add snapshot/start/stop lifecycle to LangSmithSandbox

## @deepagents/evals@0.0.10

### Patch Changes

- Updated dependencies
\[[`f164f99`](https://github.com/langchain-ai/deepagentsjs/commit/f164f992e06a157573612fb2640232f44d9daa18)]:
    -   deepagents@1.10.1

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Colin Francis <colin.francis@langchain.dev>
2026-05-11 14:32:28 -07:00
Hunter Lovell 8a6de8e7ee fix(deepagents): align LangSmith sandbox create options with SDK (#528)
## Summary

This fixes a CI-breaking type mismatch in the LangSmith sandbox backend
introduced by the snapshot lifecycle update. `LangSmithSandbox.create()`
was using a `snapshotId` flow that did not match the current `langsmith`
SDK typings, which surfaced as unhandled Vitest typecheck errors in CI.
2026-05-08 12:12:46 -07:00
Ramon Nogueira f164f992e0 feat(deepagents): add snapshot/start/stop lifecycle to LangSmithSandbox (#479)
## Summary

Expose the new LangSmith sandbox snapshot and lifecycle APIs (landed in
`langsmith@0.5.20`) through the `LangSmithSandbox` wrapper.

- New methods on `LangSmithSandbox`: `start()`, `stop()`,
`captureSnapshot()`
- `LangSmithSandbox.create()` now accepts `snapshotId` (preferred) or
`templateName` (deprecated); throws if neither is provided
- Re-export upstream types as `LangSmithSnapshot`,
`LangSmithCaptureSnapshotOptions`, `LangSmithStartSandboxOptions`
- Bump `langsmith` peer dep to `>=0.5.20`
- Update the example to boot from `LANGSMITH_SANDBOX_SNAPSHOT_ID`

## Test plan

- [x] Unit tests: added coverage for `start()`, `stop()`,
`captureSnapshot()`; 41/41 pass
- [x] Type-check clean
- [x] Dev smoke test against `dev.api.smith.langchain.com` — create from
snapshot, execute, stop, start, execute after restart all working

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Ramon Nogueira <270434257+ramon-langchain@users.noreply.github.com>
Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-05-08 18:36:11 +00:00
github-actions[bot] 6da7007e52 chore: version packages (#521)
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
## deepagents@1.10.0

### Minor Changes

- [#458](https://github.com/langchain-ai/deepagentsjs/pull/458)
[`b1e1b7b`](https://github.com/langchain-ai/deepagentsjs/commit/b1e1b7bd3bcc3bd5b03dd461e72559ed69c77e22)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
feat(deepagents): new events streaming

## @langchain/quickjs@0.3.0

### Minor Changes

- [#520](https://github.com/langchain-ai/deepagentsjs/pull/520)
[`2548954`](https://github.com/langchain-ai/deepagentsjs/commit/254895457fce2de7df4547ebcf825d60868bacce)
Thanks [@colifran](https://github.com/colifran)! - chore(quickjs):
rename to REPLMiddleware and adjust defaults

## deepagents-acp@0.1.10

### Patch Changes

- Updated dependencies
\[[`b1e1b7b`](https://github.com/langchain-ai/deepagentsjs/commit/b1e1b7bd3bcc3bd5b03dd461e72559ed69c77e22)]:
    -   deepagents@1.10.0

## @deepagents/evals@0.0.9

### Patch Changes

- Updated dependencies
\[[`b1e1b7b`](https://github.com/langchain-ai/deepagentsjs/commit/b1e1b7bd3bcc3bd5b03dd461e72559ed69c77e22)]:
    -   deepagents@1.10.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-05 16:00:39 -07:00
Christian Bromann b1e1b7bd3b feat(deepagents): support new streaming features (currently experimental in LG.js) (#458)
This patch adopts the new streaming primitives we have implemented in
LangGraph.js for Deep Agent.

LangGraph.js PR: https://github.com/langchain-ai/langgraphjs/pull/2312
LangChain.js PR: https://github.com/langchain-ai/langchainjs/pull/10697
2026-05-05 15:59:20 -07:00
github-actions[bot] 9a8ff1941a chore: version packages (#444)
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
## deepagents-acp@0.1.9

### Patch Changes

- [#501](https://github.com/langchain-ai/deepagentsjs/pull/501)
[`5b0eaea`](https://github.com/langchain-ai/deepagentsjs/commit/5b0eaea7b20461414983b71ba08d26d078b49214)
Thanks [@sukhmanghotraa](https://github.com/sukhmanghotraa)! - fix: bump
@langchain/core to ^1.1.42 across all workspace packages

- Updated dependencies
\[[`5b0eaea`](https://github.com/langchain-ai/deepagentsjs/commit/5b0eaea7b20461414983b71ba08d26d078b49214),
[`e90171a`](https://github.com/langchain-ai/deepagentsjs/commit/e90171abe4bcc76767246be470a7b17b94692f41),
[`8fd575f`](https://github.com/langchain-ai/deepagentsjs/commit/8fd575f06ca27cb0bef1a649aa34124a2c04ddd3),
[`3657941`](https://github.com/langchain-ai/deepagentsjs/commit/3657941ea36b21b9b512c1eb68a250ae79124383),
[`998d772`](https://github.com/langchain-ai/deepagentsjs/commit/998d772a07acc76fcc0d419e65b3c74a64d9ac52),
[`55f3bd8`](https://github.com/langchain-ai/deepagentsjs/commit/55f3bd8d74cac22d124fd6d1b11538dc2c2c2aec),
[`79e20e1`](https://github.com/langchain-ai/deepagentsjs/commit/79e20e18082a19b65094b953cd857908a7525801),
[`2442d7d`](https://github.com/langchain-ai/deepagentsjs/commit/2442d7d080c8a1008197eda526de52400303dd72),
[`43cd121`](https://github.com/langchain-ai/deepagentsjs/commit/43cd121133562abf0dee76c6db01f2bde0eb3fd3),
[`2994444`](https://github.com/langchain-ai/deepagentsjs/commit/2994444f32a6c0503defa6157652e742361abb00)]:
    -   deepagents@1.9.1

## deepagents@1.9.1

### Patch Changes

- [#501](https://github.com/langchain-ai/deepagentsjs/pull/501)
[`5b0eaea`](https://github.com/langchain-ai/deepagentsjs/commit/5b0eaea7b20461414983b71ba08d26d078b49214)
Thanks [@sukhmanghotraa](https://github.com/sukhmanghotraa)! - fix: bump
@langchain/core to ^1.1.42 across all workspace packages

- [#442](https://github.com/langchain-ai/deepagentsjs/pull/442)
[`e90171a`](https://github.com/langchain-ai/deepagentsjs/commit/e90171abe4bcc76767246be470a7b17b94692f41)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(deepagents): closer align store backend with Python

- [#496](https://github.com/langchain-ai/deepagentsjs/pull/496)
[`8fd575f`](https://github.com/langchain-ai/deepagentsjs/commit/8fd575f06ca27cb0bef1a649aa34124a2c04ddd3)
Thanks [@colifran](https://github.com/colifran)! - feat(deepagents):
implement functional skills for quickjs middleware

- [#448](https://github.com/langchain-ai/deepagentsjs/pull/448)
[`3657941`](https://github.com/langchain-ai/deepagentsjs/commit/3657941ea36b21b9b512c1eb68a250ae79124383)
Thanks [@ItayCoCo](https://github.com/ItayCoCo)! - fix: follow symlinks
in sandbox find commands by adding -L flag to find invocations in
buildLsCommand, buildFindCommand, and buildGrepCommand

- [#486](https://github.com/langchain-ai/deepagentsjs/pull/486)
[`998d772`](https://github.com/langchain-ai/deepagentsjs/commit/998d772a07acc76fcc0d419e65b3c74a64d9ac52)
Thanks [@colifran](https://github.com/colifran)! - feat(quickjs): remove
built-in VFS globals, add PTC instance injection and StateBackend
read-your-writes

- [#470](https://github.com/langchain-ai/deepagentsjs/pull/470)
[`55f3bd8`](https://github.com/langchain-ai/deepagentsjs/commit/55f3bd8d74cac22d124fd6d1b11538dc2c2c2aec)
Thanks [@jacoblee93](https://github.com/jacoblee93)! - Adds agent type
metadata prop to configurable

- [#451](https://github.com/langchain-ai/deepagentsjs/pull/451)
[`79e20e1`](https://github.com/langchain-ai/deepagentsjs/commit/79e20e18082a19b65094b953cd857908a7525801)
Thanks [@JadenKim-dev](https://github.com/JadenKim-dev)! - remove
unconditional @langchain/anthropic import

- [#465](https://github.com/langchain-ai/deepagentsjs/pull/465)
[`2442d7d`](https://github.com/langchain-ai/deepagentsjs/commit/2442d7d080c8a1008197eda526de52400303dd72)
Thanks [@hntrl](https://github.com/hntrl)! - fix(deepagents): route
summarization through active request model

- [#492](https://github.com/langchain-ai/deepagentsjs/pull/492)
[`43cd121`](https://github.com/langchain-ai/deepagentsjs/commit/43cd121133562abf0dee76c6db01f2bde0eb3fd3)
Thanks [@colifran](https://github.com/colifran)! - implement file system
permissions for fs middleware tools

- [#459](https://github.com/langchain-ai/deepagentsjs/pull/459)
[`2994444`](https://github.com/langchain-ai/deepagentsjs/commit/2994444f32a6c0503defa6157652e742361abb00)
Thanks [@open-swe](https://github.com/apps/open-swe)! - fix(deepagents):
skill loading should default to 1000 lines

## @langchain/quickjs@0.2.6

### Patch Changes

- [#501](https://github.com/langchain-ai/deepagentsjs/pull/501)
[`5b0eaea`](https://github.com/langchain-ai/deepagentsjs/commit/5b0eaea7b20461414983b71ba08d26d078b49214)
Thanks [@sukhmanghotraa](https://github.com/sukhmanghotraa)! - fix: bump
@langchain/core to ^1.1.42 across all workspace packages

- [#496](https://github.com/langchain-ai/deepagentsjs/pull/496)
[`8fd575f`](https://github.com/langchain-ai/deepagentsjs/commit/8fd575f06ca27cb0bef1a649aa34124a2c04ddd3)
Thanks [@colifran](https://github.com/colifran)! - feat(deepagents):
implement functional skills for quickjs middleware

- [#486](https://github.com/langchain-ai/deepagentsjs/pull/486)
[`998d772`](https://github.com/langchain-ai/deepagentsjs/commit/998d772a07acc76fcc0d419e65b3c74a64d9ac52)
Thanks [@colifran](https://github.com/colifran)! - feat(quickjs): remove
built-in VFS globals, add PTC instance injection and StateBackend
read-your-writes

- [#498](https://github.com/langchain-ai/deepagentsjs/pull/498)
[`192bbd7`](https://github.com/langchain-ai/deepagentsjs/commit/192bbd7109817a826aa6bd982e16b54b5a5c8cb5)
Thanks [@colifran](https://github.com/colifran)! - fix(quickjs): bound
console buffering at capture time

- [#497](https://github.com/langchain-ai/deepagentsjs/pull/497)
[`79dcf9a`](https://github.com/langchain-ai/deepagentsjs/commit/79dcf9ae4567fcce71ea7e529f332baf6a3d6dcd)
Thanks [@colifran](https://github.com/colifran)! - feat(quickjs): add
maxPtcCallsbudget for ptc calls

- [#492](https://github.com/langchain-ai/deepagentsjs/pull/492)
[`43cd121`](https://github.com/langchain-ai/deepagentsjs/commit/43cd121133562abf0dee76c6db01f2bde0eb3fd3)
Thanks [@colifran](https://github.com/colifran)! - implement file system
permissions for fs middleware tools

- [#494](https://github.com/langchain-ai/deepagentsjs/pull/494)
[`e64c7e3`](https://github.com/langchain-ai/deepagentsjs/commit/e64c7e31a7e62929d5d2a9048ad7df3315a546cd)
Thanks [@colifran](https://github.com/colifran)! - feat(quickjs):
implement delete session in after agent hook to clean up completed repl
sessions

- [#499](https://github.com/langchain-ai/deepagentsjs/pull/499)
[`352e487`](https://github.com/langchain-ai/deepagentsjs/commit/352e4876679fb708d9690ffeab82363ba02677dc)
Thanks [@hntrl](https://github.com/hntrl)! - fix(quickjs): add
ls_code_input_language metadata to js_eval tool

## @deepagents/evals@0.0.8

### Patch Changes

- Updated dependencies
\[[`5b0eaea`](https://github.com/langchain-ai/deepagentsjs/commit/5b0eaea7b20461414983b71ba08d26d078b49214),
[`e90171a`](https://github.com/langchain-ai/deepagentsjs/commit/e90171abe4bcc76767246be470a7b17b94692f41),
[`8fd575f`](https://github.com/langchain-ai/deepagentsjs/commit/8fd575f06ca27cb0bef1a649aa34124a2c04ddd3),
[`3657941`](https://github.com/langchain-ai/deepagentsjs/commit/3657941ea36b21b9b512c1eb68a250ae79124383),
[`998d772`](https://github.com/langchain-ai/deepagentsjs/commit/998d772a07acc76fcc0d419e65b3c74a64d9ac52),
[`55f3bd8`](https://github.com/langchain-ai/deepagentsjs/commit/55f3bd8d74cac22d124fd6d1b11538dc2c2c2aec),
[`79e20e1`](https://github.com/langchain-ai/deepagentsjs/commit/79e20e18082a19b65094b953cd857908a7525801),
[`2442d7d`](https://github.com/langchain-ai/deepagentsjs/commit/2442d7d080c8a1008197eda526de52400303dd72),
[`43cd121`](https://github.com/langchain-ai/deepagentsjs/commit/43cd121133562abf0dee76c6db01f2bde0eb3fd3),
[`2994444`](https://github.com/langchain-ai/deepagentsjs/commit/2994444f32a6c0503defa6157652e742361abb00)]:
    -   deepagents@1.9.1

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-05-04 09:43:36 -07:00
sukh 5b0eaea7b2 fix: bump @langchain/core to ^1.1.42 across all workspace packages (#501)
## Problem

When using `@langchain/google` as a model provider in the examples
workspace, the server crashes immediately with:

1. Runtime crash on startup:

    ```bash
    ERR_PACKAGE_PATH_NOT_EXPORTED: Package subpath './utils/uuid' is not
    defined by "exports" in @langchain/core/package.json
    ```

`@langchain/google` imports `@langchain/core/utils/uuid`, a subpath
added in `@langchain/core@1.1.42`. Both the examples workspace and
`libs/deepagents` were pinned to `^1.1.40` which does not export this
path.

 2. TypeScript type error after fixing the runtime crash:
 
    ```bash
Type 'ChatGoogle' is not assignable to type 'BaseLanguageModel<any,
BaseLanguageModelCallOptions>'
    ```
Even after bumping `@langchain/core` in `examples/` only, pnpm kept two
separate copies in its store - `1.1.40` for `deepagents` and `1.1.42`
for `@langchain/google`. TypeScript treats them as structurally
incompatible types because the type import paths differ.

## Fix

- Bump `@langchain/core` from `^1.1.40` → `^1.1.42` in all
`../package.json` files

## Testing

```bash
cd examples/research
pnpm dlx @langchain/langgraph-cli dev
# -> No ERR_PACKAGE_PATH_NOT_EXPORTED and agent starts correctly

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-05-01 15:41:53 -07:00
Colin Francis 8fd575f06c feat(deepagents): implement functional skills for quickjs middleware (#496)
### Summary

Adds functional skill modules to the QuickJS REPL. Skills can now ship
JS/TS entrypoints via a module: frontmatter key on SKILL.md, which the
model dynamically imports at eval time with await
import("@/skills/<name>").

When skillsBackend is passed to createQuickJSMiddleware, the middleware
reads skillsMetadata from the current task state before each eval, scans
the source for skill references, and pushes the metadata + backend into
the session. The session wires a QuickJS module loader that lazily
fetches skill files from the backend, strips TypeScript syntax, and
caches the result for the lifetime of the session. Skills that are
referenced but not available on the agent short-circuit with a clear
error before evaluation starts.

On the deepagents side, SkillMetadata gains an optional module field
(validated and normalized from frontmatter), and formatSkillsList now
advertises importable skills in the system prompt with an await
import(...) hint.

```ts
const backend = new FilesystemBackend({ rootDir: "/project", virtualMode: true });

const agent = createDeepAgent({
  model: "claude-sonnet-4-6",
  backend,
  skills: ["/skills/"],
  middleware: [
    createQuickJSMiddleware({ skillsBackend: backend }),
  ],
});
```

### Tests

- Unit tests cover module path validation, TS syntax stripping, skill
loading (single/multi-file, error cases, bundle size cap), skill
reference scanning, module loader resolution and caching, and system
prompt formatting
- Ran an E2E eval that exercised the full pipeline from SKILL.md parse
through dynamic import and function call in the REPL, with a LangSmith
trace

### Benchmarks

#### memory: console_log concurrent
- Total time: 15820ms

| name | hz | min | max | mean | p75 | p99 | p995 | p999 | rme | samples
|

|--------------------------|---------|--------|--------|--------|--------|--------|--------|--------|--------|---------|
| 1 concurrent sessions | 145.91 | 1.8263 | 27.7702| 6.8536 | 9.1753 |
21.1492| 25.0420| 27.7702| ±5.30% | 730 |
| 8 concurrent sessions | 39.1773 | 15.5854| 61.5015| 25.5250| 27.8461|
49.0536| 61.5015| 61.5015| ±3.58% | 196 |
| 32 concurrent sessions | 13.9753 | 48.5504| 110.40 | 71.5547| 76.6394|
110.40 | 110.40 | 110.40 | ±3.72% | 70 |

---

#### memory: ptc_tools concurrent
- Total time: 16755ms

| name | hz | min | max | mean | p75 | p99 | p995 | p999 | rme | samples
|

|--------------------------|---------|--------|--------|--------|--------|--------|--------|--------|--------|---------|
| 1 concurrent sessions | 86.9205 | 4.1809 | 32.1833| 11.5048| 15.3222|
25.2676| 28.2697| 32.1833| ±4.76% | 435 |
| 8 concurrent sessions | 21.8310 | 33.5598| 69.0041| 45.8065| 50.8740|
60.2001| 69.0041| 69.0041| ±2.77% | 110 |
| 32 concurrent sessions | 7.0269 | 137.88 | 148.90 | 142.31 | 144.05 |
148.90 | 148.90 | 148.90 | ±0.70% | 36 |

---

#### throughput: single thread many iterations
- Total time: 31656ms

| name | hz | min | max | mean | p75 | p99 | p995 | p999 | rme | samples
|

|-------------------------------------------|--------|--------|--------|--------|--------|--------|--------|--------|--------|---------|
| 200 sequential evals (ptc + console.log) | 3.5897 | 240.92 | 347.19 |
278.58 | 289.81 | 341.02 | 347.19 | 347.19 | ±1.44% | 108 |
2026-04-30 13:13:40 -07:00
open-swe[bot] 48fd2843d9 fix: update x handle in readme (#495)
## Description
Updates the Deep Agents README badge to point to the current JavaScript
X handle while preserving the existing visible Follow text casing.

## Test Plan
- [ ] Verify the README X badge links to @langchain_js

_Opened collaboratively by Mason Daugherty and open-swe._

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Mason Daugherty <61371264+mdrxy@users.noreply.github.com>
2026-04-29 14:04:13 -04:00
Colin Francis 998d772a07 feat(quickjs): remove built-in VFS globals, add PTC instance injection and StateBackend read-your-writes (#486)
### Summary
- Removed built-in readFile/writeFile globals from the QuickJS REPL.
File I/O is now exclusively through PTC tools, keeping the REPL a pure
JS sandbox with no implicit side effects
- ptc now accepts StructuredToolInterface instances directly alongside
tool name strings. Custom tools can be injected into the REPL without
being registered on the agent
- StateBackend now provides read-your-writes semantics within a single
js_eval superstep by reading via __pregel_read with fresh=true. Pregel
already tracks pending sends in task.writes; asking for a fresh read
applies them through the reducer, removing the need for a manual write
buffer
- Removed ptc: boolean shorthand from QuickJSMiddlewareOptions; use the
array or object forms instead

### Tests
- Added 12 unit tests to state.test.ts covering write-then-read, chained
edits, ls/grep/glob/readRaw visibility, upload/download, duplicate write
error, edit-nonexistent, and superstep boundary behavior
(commitSends/clearPending)
- Expanded middleware.test.ts with PTC instance injection coverage
- Verified end-to-end with createDeepAgent + createQuickJSMiddleware
across 7 scenarios (write-read, write-edit-read, write-ls, write-grep,
write-glob, cross-eval, upload-download); traces confirmed in LangSmith

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-04-28 14:23:08 -07:00
Colin Francis 43cd121133 feat(deepagents): implement file system permissions for fs middleware tools (#492)
### Summary

- Adds a FilesystemPermission class and a permissions parameter to
createDeepAgent and SubAgent that controls which filesystem operations
each agent is allowed to perform
- Rules are evaluated first-match-wins with a permissive default; mode:
"deny" blocks the operation before any backend call
- Permissions are closed over at tool-creation time — no runtime config
threading, no ToolPolicy in langchain-core
- ls, glob, and grep enforce permissions in two passes: the base path
check throws early; results are post-filtered to strip entries the
caller can't read
- Subagents receive the parent agent's permissions by default; setting
permissions on a SubAgent is a full replacement, not a merge
- FilesystemPermission, FilesystemPermissionOptions,
FilesystemOperation, and PermissionMode are exported from the top-level
package entry point

### Tests

- permissions/types.test.ts — FilesystemPermission construction,
validation (rejects relative paths, .., ~), defaults
- permissions/enforce.test.ts — validatePath, globMatch (wildcards,
brace expansion, dotfiles), decidePathAccess (first-match-wins,
operation mismatch, multiple ops/paths)
- middleware/fs.permissions.test.ts — each fs tool (read, write, edit,
ls, glob, grep) with allow/deny rules and mock backends; verifies
backend is never called on a denied path; verifies execute is unaffected
- permissions/agent.permissions.test.ts —
CreateDeepAgentParams.permissions type and default; wiring to
createFilesystemMiddleware
- middleware/subagents.permissions.test.ts — SubAgent.permissions type;
?? resolution (inherit vs override vs own deny);
createFilesystemMiddleware behavior for each resolved-permissions case

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-04-28 14:13:00 -07:00
sukh 883581cda6 fix(deepagents): handle Windows absolute paths in tsdown external filter (#489)
## Fix: `ERR_MODULE_NOT_FOUND` on Windows when building `deepagents`

### Problem

Building `libs/deepagents` on Windows produces a `dist/index.js` that
imports
local modules with `.ts` extensions instead of bundling them:

```js
import { createDeepAgent } from "./agent.ts";
import { ConfigurationError } from "./errors.ts";
```

This causes an immediate crash at runtime for any consumer of the
library:

```
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
  'C:\...\deepagentsjs\libs\deepagents\dist\agent.ts'
  imported from C:\...\deepagentsjs\libs\deepagents\dist\index.js
  ```

  **Root Cause**
The `external` filter in `libs/deepagents/tsdown.config.ts:` used a regex intended to match
only npm package names (which don't start with `.` or `/`):

```js
const external = [/^[^./]/];
```
On Unix absolute paths start with `/` so the regex correctly excludes them. On Windows absolute paths start with a drive letter (e.g. C:\...), which also doesn't start with `.` or `/` - so rolldown matches them as external, excludes them from the bundle, and leaves raw `.ts` references in the output.

**Fix**
Replace the regex with a function that explicitly excludes Windows-style
absolute paths:
```js
const external = (id: string) =>
!id.startsWith(".") && !id.startsWith("/") &&
!/^[A-Za-z]:[\\/]/.test(id);
```

After this change `pnpm -w run build` in `libs/deepagents` produces a fully
bundled `[dist/index.js]` with no `.ts` imports and examples run correctly on Windows.

Notes

- `deps.neverBundle` (the tsdown-recommended replacement for `[external]` is not yet functional in tsdown 0.21.7 / rolldown 1.0.0-rc.12 and causes a build error. This fix is the correct workaround until that API stabilises.

---------

Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-04-27 13:57:05 -07:00
John Kennedy 6eb421ff9e fix(deps): patch 6 security alerts across 4 packages (1 critical, 5 medium) (#478)
## Security Alert Patch

Resolves 6 open Dependabot security alerts (**1 critical, 5 medium**).

### Packages Updated

| Package | Old → New | Strategy | Scope | CVEs Resolved |
|---------|-----------|----------|-------|---------------|
| `protobufjs` | 7.5.4 → 7.5.5 | C (pnpm override) — parent ranges
already accept 7.5.5 | transitive (via modal, @grpc/proto-loader,
@opentelemetry/otlp-transformer) | **CVE-2026-41242** (critical) |
| `axios` | 1.13.6 → 1.15.1 | C (pnpm override) — @daytonaio/sdk
`^1.13.5` already accepts 1.15.x | transitive (via @daytonaio/sdk,
@daytonaio/api-client, @daytonaio/toolbox-api-client) | CVE-2025-62718,
CVE-2026-40175 |
| `follow-redirects` | 1.15.11 → 1.16.0 | C (pnpm override) — axios
`^1.15.11` already accepts 1.16.0 | transitive (via axios) |
GHSA-r4q5-vmmm-2653 |
| `langsmith` | floor raised to 0.5.19 | A (direct bump) —
`libs/deepagents` peerDep, `internal/eval-harness` dep | direct,
published | CVE-2026-40190, GHSA-rr7j-v2q5-chgv |

### Why pnpm.overrides for transitives

The three transitive bumps (protobufjs, axios, follow-redirects) use
pnpm.overrides because the parent packages' version ranges **already
allow the patched versions** — this is a lockfile refresh, not a
published-constraint change. End users installing `@langchain/daytona`
or `@langchain/modal` resolve their own lockfile and naturally get the
patched transitive versions; the overrides here just bring our lockfile
up to date.

For `langsmith`, the vulnerable 0.5.15 was pinned in
`libs/deepagents/peerDependencies` with floor `>=0.5.15`. Raising to
`>=0.5.19` closes the window for downstream consumers with stale
lockfiles.

### CVE Details

| ID | Package | Severity | Summary |
|----|---------|----------|---------|
| CVE-2026-41242 / GHSA-xq3m-2v4x-88gg | protobufjs | critical |
Arbitrary code execution in protobufjs |
| CVE-2025-62718 / GHSA-3p68-rc4w-qgx5 | axios | medium | NO_PROXY
hostname normalization bypass leading to SSRF |
| CVE-2026-40175 / GHSA-fvcv-3m26-pcqx | axios | medium | Unrestricted
cloud metadata exfiltration via header injection chain |
| GHSA-r4q5-vmmm-2653 | follow-redirects | medium | Leaks custom
authentication headers to cross-domain redirect targets |
| CVE-2026-40190 / GHSA-fw9q-39r9-c252 | langsmith | medium | Prototype
pollution via incomplete `__proto__` guard in internal lodash `set()` |
| GHSA-rr7j-v2q5-chgv | langsmith | medium | Streaming token events
bypass output redaction |

### Linear Tickets

No matching Linear tickets found (CLI unauthenticated in this
environment).

### Verification

- [x] `pnpm install --lockfile-only` clean — new lockfile contains
axios@1.15.1, protobufjs@7.5.5, follow-redirects@1.16.0,
langsmith@0.5.20 & 0.5.21 (vulnerable 0.5.15 fully removed)
- [x] `pnpm format:check` passes (313 files)
- [x] `pnpm lint` (oxlint) passes (0 warnings, 0 errors)
- [x] `pnpm test:unit` — 829/830 unit tests pass; the 1 failure and 6
unhandled errors are **pre-existing** on `main` (tied to recent
`ls_agent_type` feature #470 and broken
`@langchain/sandbox-standard-tests` module resolution), unrelated to
this patch
- [x] `pnpm typecheck` failure in `libs/standard-tests` is pre-existing
on `main`, unrelated to this patch
- [x] No major-version bumps; minimum-safe versions used throughout

🤖 Submitted by langster-patch
2026-04-21 14:39:29 -07:00
Jacob Lee 55f3bd8d74 feat(deepagents): Adds agent type metadata prop to configurable (#470)
Will be useful for trace display features

Python: https://github.com/langchain-ai/deepagents/pull/2788

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-04-17 22:03:59 -07:00
Hunter Lovell 2442d7d080 fix(deepagents): align summarization with active request model (#465)
## Summary

Fixes #398

Align deepagents summarization with the active request-time model path
instead of relying on a separate middleware-specific model resolution
path. This keeps summarization behavior consistent with the main agent
model selection flow and avoids divergence in provider/model handling
during middleware execution. The update also simplifies runtime behavior
by removing unnecessary explicit config threading for summary calls.

## Changes

### `deepagents` middleware/model routing

- Updated summarization middleware to prefer `request.model` as the
resolved model used for profile-derived limits and summary generation.
- Kept fallback model resolution support for cases where a request model
is not present.
- Removed explicit runtime config plumb-through in summary invocation,
relying on LangChain runnable context propagation.

### `deepagents` agent wiring

- Updated `createDeepAgent` built-in and subagent middleware wiring to
construct summarization middleware without explicitly passing a separate
model option, so summarization follows the active request model path.

### `deepagents` tests

- Added/updated summarization tests to cover request-model-based
summarization behavior and ensure middleware behavior remains stable
with the new routing path.
- Simplified test request construction to keep request-model assumptions
explicit.
2026-04-14 17:43:56 -07:00
ItayCoCo 3657941ea3 fix: follow symlinks in sandbox find commands (#448)
## Summary

- Add `-L` flag to `find` in `buildLsCommand`, `buildFindCommand`, and
`buildGrepCommand` so that symlinks are followed
- Fixes #447

## Problem

`BaseSandbox` helper functions use `find` without `-L`, which means
symbolic links are not dereferenced. On Modal (and potentially other
providers), volumes are mounted as symlinks, so the `ls`, `glob`, and
`grep` sandbox tools all return empty results when pointed at symlinked
paths.

## Fix

The `-L` flag tells `find` to follow symbolic links. This is a one-line
change in each of the three helper functions:

```diff
- find ${quotedPath} -maxdepth 1 ...
+ find -L ${quotedPath} -maxdepth 1 ...
```

This matches user expectations — filesystem exploration tools should
transparently follow symlinks, just like `ls` and `find -L` do in a
normal shell.

## Test plan

- [ ] Verify `ls` tool returns files when the target path is a symlink
- [ ] Verify `glob` tool traverses symlinked directories
- [ ] Verify `grep` tool searches inside symlinked directories
- [ ] Confirm no regression on non-symlinked paths (behavior is
identical when no symlinks are present)

---------

Co-authored-by: Itay Cohen <itaycohen@Itays-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 15:36:01 -07:00
open-swe[bot] 2994444f32 fix: skill loading should default to 1000 lines (#459)
## Description
Ports the skill loading fix from the Python SDK
(langchain-ai/deepagents#2721) to JS. The system prompt now instructs
agents to pass `limit=1000` when reading skill files via `read_file`,
since the default of 100 lines is too small for most skill files.

## Test Plan
- [ ] Verify skill loading prompt includes `limit=1000` instruction

_Opened collaboratively by Sydney Runkle and open-swe._

---------

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 <40191806+hntrl@users.noreply.github.com>
2026-04-14 15:15:10 -07:00
Hunter Lovell a8d9949a45 docs(deepagents): simplify README (#456)
## Changes

### `libs/deepagents`

- Rewrote `README.md` from an exhaustive reference style to a minimal
structure:
  - concise overview and "What's included"
  - short install + quickstart example
  - brief customization example
- LangGraph-native note, value proposition bullets, docs/resources, and
security section
- Updated top docs anchor link to JavaScript Deep Agents docs.
- Changed `<picture>` fallback `<img>` source from `logo-dark.svg` to
`logo-light.svg` for better npm/default rendering.
- Removed duplicated deep-dive sections and verbose option-by-option
content in favor of docs links.
2026-04-13 23:36:52 -07:00
Youngho Kim 79e20e1808 fix(deepagents): remove unconditional @langchain/anthropic import (#451)
## Summary

Fixes #443

- Removed static `import { ChatAnthropic } from "@langchain/anthropic"`
at module level
- Changed default `model` parameter from `new
ChatAnthropic("claude-sonnet-4-6")` to the string `"claude-sonnet-4-6"`

## Problem

`deepagents@1.9.0` unconditionally imported `@langchain/anthropic` at
the top of `agent.ts`. Bundlers follow static imports regardless of
which model the user actually uses, causing builds to fail for users who
only use other providers (e.g. `ChatOpenAI`) and don't have
`@langchain/anthropic` installed.

## Solution

`createAgent` from `langchain` natively accepts a model name string
(`string | AgentLanguageModelLike`), so no `ChatAnthropic` instantiation
is needed at the library level. With a string default, bundlers have no
static reference to `@langchain/anthropic` and can tree-shake it
entirely.

Users who want Anthropic models can either:
- Pass `new ChatAnthropic(...)` explicitly (requires
`@langchain/anthropic` in their own `package.json`)
- Rely on the `"claude-sonnet-4-6"` string default (also requires
`@langchain/anthropic` at runtime, but no longer breaks builds for
non-Anthropic users)

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-04-13 21:46:24 -07:00
Hunter Lovell 4376d51710 chore: mark langsmith sandboxes as experimental (#446) 2026-04-09 15:04:53 -07:00
Christian Bromann 3c03e2f864 fix(deepagents): minor store adjustments (#445)
Another minor fix to not run into the wrong overload.
2026-04-09 11:44:29 -07:00
Christian Bromann e90171abe4 fix(deepagents): closer align store backend with Python (#442)
Aligned `StoreBackend` in `libs/deepagents/src/backends/store.ts` more
closely with the Python version while keeping the current TS behavior
working:

- `namespace` now supports either a static `string[]` or a dynamic
factory, so callers can derive store namespaces from runtime
state/config instead of hardcoding them.
- Legacy namespace fallback now checks config metadata for
`assistant_id` / `assistantId` first, then falls back to the existing
injected `assistantId`, and finally to `["filesystem"]`.
- Added exported types for the new namespace factory context in
`libs/deepagents/src/backends/index.ts` and
`libs/deepagents/src/index.ts`.
2026-04-09 09:05:33 -07:00
github-actions[bot] 02c1c7fa38 chore: version packages (#433)
* chore: version packages

* cr

---------

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:48:53 -07:00
Hunter Lovell 89ee206ba6 chore: upgrade langgraph + langchain (#434) 2026-04-07 08:41:32 -07:00
github-actions[bot] 287776254f chore: version packages (alpha) (#429)
* chore: version packages (alpha)

* cr

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-04-06 11:31:46 -07:00
Hunter Lovell 6830c24981 chore: patch package versions (#430) 2026-04-05 22:30:34 -07:00
Youngho Kim dc030a5238 fix: add default value to grep tool glob schema for strict mode compatibility (#422)
* fix: add default value to grep tool glob schema for strict mode compatibility

The grep tool's `glob` field was defined with `.optional().nullable()` but
without `.default()`, causing it to be excluded from the JSON schema
`required` array. This violates OpenAI's strict mode requirement that all
properties must be listed in `required`.

Fixes #401

* Fix grep tool glob schema for strict mode

Added a default value to the grep tool glob schema to ensure compatibility with strict mode.

* Update .changeset/lucky-candles-reply.md

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-04-03 20:22:33 -07:00
Maahir Sachdev 39dd5faabc lint 2026-04-02 11:57:08 -07:00
Maahir Sachdev 95e0ea88f2 add in quick test 2026-04-02 10:58:17 -07:00
Colin Francis 815bc0fac4 fix: deprecate backend factories (#419)
* add zero-arg constructor to StateBackend

* add zero-arg constructor to StoreBackend

* updates tests, examples, docstrings

* tests

* changeset

* lint

* lockfile

* clean up
2026-04-02 00:14:05 -07:00
dependabot[bot] 67d7423c82 build(deps-dev): bump typescript from 5.9.3 to 6.0.2 (#409)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.3...v6.0.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 21:29:10 -07:00
Hunter Lovell ca5cc0acfb chore: merge alpha into main (#404)
* Revert "revert: "feat(deepagents): support multimodal files for backends (#298)" (#352)" (#353)

This reverts commit 03ea1c9729.

* revert: "revert: "feat(sdk): add async subagent middleware for remote LangGraph servers  (#323)" (#351)" (#354)

* Revert "revert: "feat(sdk): add async subagent middleware for remote LangGraph servers  (#323)" (#351)"

This reverts commit 367e43a5ed.

* use any backend protocol

* Reapply "chore(deepagents): refactor backend method names - `lsInfo` -> `ls`, …" (#349) (#356)

This reverts commit 573479d743.

* Reapply "chore(sdk): unify sync subagents and async subagents into a single pr…" (#348) (#355)

This reverts commit 96dc34ccb6.

* chore: align alpha with main (#358)

* fix(deepagents): remove orphaned ToolMessages for Gemini compatibility (#335)

* fix(deepagents): remove orphaned ToolMessages for Gemini compatibility

* Fix ToolMessages for Gemini compatibility

---------

Co-authored-by: Christian Bromann <git@bromann.dev>

* fix(deepagents): throw on built-in tool collision (#330)

* add error

* Create big-horses-fail.md

* add config error class

* cr

---------

Co-authored-by: Christian Bromann <git@bromann.dev>

* fix(deepagents): use `crypto.randomUUID()` instead of uuid (#336)

* fix(deepagents): use crypto.randomUUID() instead of uuid

* update pnpm-lock

* Create grumpy-weeks-wave.md

* Update libs/deepagents/src/middleware/fs.int.test.ts

* feat(deepagent): add LangSmithSandbox (#324)

* feat(deepagent): add LangSmithSandbox

* Change deepagents version from patch to minor

* format

* fix tests

* format

* make it a patch

* cr

* cr

* fix

* cr

* chore: version packages (#321)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* regen lockfile

* fix langsmith tests so that they use backend protocol v2 methods

* format

---------

Co-authored-by: pawel-twardziak <pawel.twardziak.dev@gmail.com>
Co-authored-by: Christian Bromann <git@bromann.dev>
Co-authored-by: Maahir Sachdev <maahir.sachdev@langchain.dev>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(deepagents): add completion notifier middleware for async subagents (#334)

Port of langchain-ai/deepagents#2119 to TypeScript. Adds a
createCompletionNotifierMiddleware that async subagents can use to
proactively notify their supervisor when they complete or error,
closing the gap where the supervisor only learns about completion
when someone calls check_async_task.

- New createCompletionNotifierMiddleware with afterAgent and
  wrapModelCall hooks
- Uses @langchain/langgraph-sdk Client to send runs.create() to the
  supervisor's thread
- Reads parent_thread_id from subagent state (injected by
  start_async_task)
- Derives task_id from runtime.configurable.thread_id
- Silently no-ops if parent context is missing
- Guards against duplicate notifications
- 22 unit tests covering all hooks, edge cases, and error paths

fix(deepagents): make url required in completion notifier (no ASGI in JS)

JS does not have ASGI transport like Python, so the url parameter
must be provided explicitly. Removed all ASGI references from docs
and the localhost fallback default.

fix(deepagents): throw on built-in tool collision (#330)

* add error

* Create big-horses-fail.md

* add config error class

* cr

---------

Co-authored-by: Christian Bromann <git@bromann.dev>

fix(deepagents): use `crypto.randomUUID()` instead of uuid (#336)

* fix(deepagents): use crypto.randomUUID() instead of uuid

* update pnpm-lock

* Create grumpy-weeks-wave.md

* Update libs/deepagents/src/middleware/fs.int.test.ts

feat(deepagent): add LangSmithSandbox (#324)

* feat(deepagent): add LangSmithSandbox

* Change deepagents version from patch to minor

* format

* fix tests

* format

* make it a patch

* cr

* cr

* fix

* cr

regen lockfile

linting

linting

add missing url property

chore: version packages (#321)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

changeset

regen lockfil

* chore: enter alpha pre-release

* chore: target alpha for releases

* chore: version packages (alpha) (#359)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deepagents): extend supported backend file types (#363)

* extend supported file types

* Create strong-tigers-share.md

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>

* chore(deepagents): implement async subagents + use stream example (#360)

* async subagents + use stream example

* fix lockfile

* format

* linting

* readme and linting

* format

* proactively send responses when subagents complete

* better examples

* feat(deepagents): rename completion notifier to completion callback and align with Python (#361)

* feat(deepagents): rename completion notifier to completion callback and align with Python PR

- Rename completion_notifier.ts -> completion_callback.ts to match Python's
  completion_callback.py naming
- Rename exports: createCompletionNotifierMiddleware -> createCompletionCallbackMiddleware,
  CompletionNotifierOptions -> CompletionCallbackOptions
- Rename state key: parent_thread_id -> callbackThreadId, option: parentGraphId -> callbackGraphId
- Make url optional (Python allows omitting for ASGI transport)
- Match Python's strict error behavior: throw on empty messages, non-AIMessage types,
  and missing callbackThreadId
- Add truncation suffix with task_id hint for long messages
- Use generic error message in wrapModelCall (don't leak error details)
- Remove duplicate notification guard (Python notifies on every error)
- Add extractCallbackContext to async_subagents.ts: injects callbackThreadId
  into subagent input state when launching via start_async_task
- Add tests for extractCallbackContext and callback context injection

* cr

* Rename completion notifier to completion callback

Renamed completion notifier to completion callback for consistency with Python.

* fix(sdk): `AsyncTask` `updatedAt` field doesn't update on task status changes (#400)

* update updatedAt field to change on any task update

* added changeset

* chore: set up self hosted async subagent example (#399)

* self hosted async subagent example

* with postgres

* formatting

* eslint disable no console

* fix dockerfile and readme

* Update examples/async-subagent-server/server.ts

Co-authored-by: Christian Bromann <git@bromann.dev>

---------

Co-authored-by: Christian Bromann <git@bromann.dev>

* chore(sdk): update async subagent middleware for agent protocol (#394)

* update async subagent middleware for agent protocol

* add changeset

* Update libs/deepagents/src/middleware/async_subagents.ts

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>

* Update libs/deepagents/src/middleware/async_subagents.ts

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>

* Update libs/deepagents/src/middleware/async_subagents.ts

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>

* differentiate agent protocol

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>

* chore(repo): migrate linting and formatting to oxc tooling (#391)

* chore(repo): migrate linting and formatting to oxc tooling

* cr

* cr

* chore(lint): clean up console disables for oxlint

* cr

* Apply suggestions from code review

Co-authored-by: Christian Bromann <git@bromann.dev>

---------

Co-authored-by: Christian Bromann <git@bromann.dev>

* refactor(deepagents): clean up createDeepAgent middleware wiring (#392)

* refactor(deepagents): clean up createDeepAgent middleware wiring

* fix(deepagents): avoid duplicate HITL middleware on subagents

* add comments, remove iife

* Create ten-masks-flow.md

* fix(deepagents): align prompt templates with runtime behavior (#393)

* fix(deepagents): align prompt templates with runtime behavior

* chore: add changeset for prompt alignment fixes

* cr

* cr

* fix store backend and tests

* lint

* fix rests and resolveBackend

* lint

* fix failing tests

* revert adapt resolve backend

* fix resolve backend

* better variable name

* fix backend factory to return a maybe promise

* mark resolve backend as internal

* format

---------

Co-authored-by: Colin Francis <131073567+colifran@users.noreply.github.com>
Co-authored-by: pawel-twardziak <pawel.twardziak.dev@gmail.com>
Co-authored-by: Christian Bromann <git@bromann.dev>
Co-authored-by: Maahir Sachdev <maahir.sachdev@langchain.dev>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Colin Francis <colin.francis@langchain.dev>
2026-04-01 17:10:16 -07:00
github-actions[bot] a7c503bb97 chore: version packages (#396)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-30 21:38:24 -07:00
Christian Bromann 92b26577b8 fix(deepagents): bump langchain deps (#395)
* fix(deepagents): bump langchain deps

* formay

* Update changeset by removing deprecated packages

Removed several packages from the changeset.

* fix build
2026-03-30 21:24:30 -07:00
github-actions[bot] 02321d6fb1 chore: version packages (#388)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-30 13:13:32 -07:00
Christian Bromann 9301a9efcc fix(deepagents): update langchain packages (#390)
* fix(deepagents): update langchain packages

* Create warm-parents-prove.md

* format
2026-03-30 12:59:24 -07:00
Christian Bromann 2de4302003 fix(deepagents): evict large HumanMessages to filesystem (#357)
* feat(sdk): evict large HumanMessages to filesystem

Port of python PR #2183 to JS. Adds a beforeAgent hook to the
FilesystemMiddleware that checks the most recent message. If it is a
HumanMessage whose text content exceeds toolTokenLimitBeforeEvict, the
full content is written to the backend and the message is replaced with
a truncated preview pointing to the file.

Changes:
- Add TOO_LARGE_HUMAN_MSG template for evicted human messages
- Add extractTextFromMessage() to extract text from any message type
- Add buildEvictedHumanContent() to preserve non-text blocks (images)
- Add beforeAgent hook to createFilesystemMiddleware
- Add comprehensive tests for HumanMessage eviction

Co-authored-by: Christian Bromann <christian-bromann@users.noreply.github.com>

* format

* Create angry-jobs-film.md

* refactor: align with final Python PR - tag-based eviction architecture

Rework the HumanMessage eviction to match the final shipped Python PR:

Architecture change:
- beforeAgent: writes large content to backend and TAGS the message
  with lc_evicted_to in additional_kwargs (preserving original content
  in state for checkpoint persistence)
- wrapModelCall: truncates all tagged messages before sending to model
  (model sees preview, state keeps full content)

Key differences from initial port:
- Separate humanMessageTokenLimitBeforeEvict option (default: 50000)
- Original content preserved in state (not replaced)
- Messages tagged with lc_evicted_to for multi-turn truncation
- Path changed from /large_messages/ to /conversation_history/
- Added buildTruncatedHumanMessage helper for model-view truncation
- wrapModelCall now handles truncation of all tagged messages

Tests updated:
- beforeAgent tests verify tagging behavior (original content preserved)
- New wrapModelCall test suite for truncation of tagged messages
- Test for skip already-tagged messages
- Test for mixed tagged/untagged message lists
- Test for non-text block preservation during truncation

Co-authored-by: Christian Bromann <christian-bromann@users.noreply.github.com>

* format

* fix: update beforeAgent to use resolveBackend after main merge

The merge from main replaced getBackend/StateAndStore with
resolveBackend/BackendRuntime. Update the beforeAgent hook to use the
new API.

Co-authored-by: Christian Bromann <christian-bromann@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Christian Bromann <christian-bromann@users.noreply.github.com>
2026-03-29 13:59:00 -07:00
github-actions[bot] 48f21c3c6f chore: version packages (#379)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-26 14:05:51 -07:00
Christian Bromann 8e6a28316b fix(deepagents): support ttl for LS sandbox (#381)
* fix(deepagents): support ttl for LS sandbox

* format

* Add support for ttl in LS sandbox
2026-03-26 14:04:59 -07:00
dependabot[bot] 36c8459c09 build(deps): bump the patch-deps-updates-main group with 10 updates (#367)
Bumps the patch-deps-updates-main group with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [@eslint/eslintrc](https://github.com/eslint/eslintrc) | `3.3.3` | `3.3.5` |
| [@langchain/core](https://github.com/langchain-ai/langchainjs) | `1.1.33` | `1.1.36` |
| [@langchain/langgraph](https://github.com/langchain-ai/langgraphjs/tree/HEAD/libs/langgraph-core) | `1.2.3` | `1.2.5` |
| [@langchain/langgraph-checkpoint](https://github.com/langchain-ai/langgraphjs/tree/HEAD/libs/checkpoint) | `1.0.0` | `1.0.1` |
| [tsdown](https://github.com/rolldown/tsdown) | `0.21.4` | `0.21.5` |
| [langchain](https://github.com/langchain-ai/langchainjs) | `1.2.34` | `1.2.37` |
| [yaml](https://github.com/eemeli/yaml) | `2.8.2` | `2.8.3` |
| [@langchain/anthropic](https://github.com/langchain-ai/langchainjs) | `1.3.18` | `1.3.25` |
| [modal](https://github.com/modal-labs/modal-client) | `0.7.1` | `0.7.3` |
| [langsmith](https://github.com/langchain-ai/langsmith-sdk) | `0.5.7` | `0.5.13` |


Updates `@eslint/eslintrc` from 3.3.3 to 3.3.5
- [Release notes](https://github.com/eslint/eslintrc/releases)
- [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslintrc/compare/eslintrc-v3.3.3...eslintrc-v3.3.5)

Updates `@langchain/core` from 1.1.33 to 1.1.36
- [Release notes](https://github.com/langchain-ai/langchainjs/releases)
- [Commits](https://github.com/langchain-ai/langchainjs/compare/@langchain/core@1.1.33...@langchain/core@1.1.36)

Updates `@langchain/langgraph` from 1.2.3 to 1.2.5
- [Release notes](https://github.com/langchain-ai/langgraphjs/releases)
- [Changelog](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-core/CHANGELOG.md)
- [Commits](https://github.com/langchain-ai/langgraphjs/commits/@langchain/langgraph@1.2.5/libs/langgraph-core)

Updates `@langchain/langgraph-checkpoint` from 1.0.0 to 1.0.1
- [Release notes](https://github.com/langchain-ai/langgraphjs/releases)
- [Changelog](https://github.com/langchain-ai/langgraphjs/blob/main/libs/checkpoint/CHANGELOG.md)
- [Commits](https://github.com/langchain-ai/langgraphjs/commits/@langchain/langgraph-checkpoint@1.0.1/libs/checkpoint)

Updates `tsdown` from 0.21.4 to 0.21.5
- [Release notes](https://github.com/rolldown/tsdown/releases)
- [Commits](https://github.com/rolldown/tsdown/compare/v0.21.4...v0.21.5)

Updates `langchain` from 1.2.34 to 1.2.37
- [Release notes](https://github.com/langchain-ai/langchainjs/releases)
- [Commits](https://github.com/langchain-ai/langchainjs/compare/langchain@1.2.34...langchain@1.2.37)

Updates `yaml` from 2.8.2 to 2.8.3
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v2.8.2...v2.8.3)

Updates `@langchain/anthropic` from 1.3.18 to 1.3.25
- [Release notes](https://github.com/langchain-ai/langchainjs/releases)
- [Commits](https://github.com/langchain-ai/langchainjs/compare/@langchain/anthropic@1.3.18...@langchain/anthropic@1.3.25)

Updates `modal` from 0.7.1 to 0.7.3
- [Changelog](https://github.com/modal-labs/modal-client/blob/main/CHANGELOG_GO_JS.md)
- [Commits](https://github.com/modal-labs/modal-client/commits/go/v0.7.3)

Updates `langsmith` from 0.5.7 to 0.5.13
- [Release notes](https://github.com/langchain-ai/langsmith-sdk/releases)
- [Commits](https://github.com/langchain-ai/langsmith-sdk/commits)

---
updated-dependencies:
- dependency-name: "@eslint/eslintrc"
  dependency-version: 3.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: "@langchain/core"
  dependency-version: 1.1.36
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: "@langchain/langgraph"
  dependency-version: 1.2.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: "@langchain/langgraph-checkpoint"
  dependency-version: 1.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: tsdown
  dependency-version: 0.21.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: langchain
  dependency-version: 1.2.37
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: yaml
  dependency-version: 2.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: "@langchain/anthropic"
  dependency-version: 1.3.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: modal
  dependency-version: 0.7.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
- dependency-name: langsmith
  dependency-version: 0.5.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-deps-updates-main
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 11:57:00 -07:00
Christian Bromann 028f2f818f fix(deepagents): extend BackendFactory and make it async (#362)
* fix(deepagents): extend BackendFactory and make it async

* revert changes in old store

* Create funny-pears-clap.md

* cr

* cr

* cr
2026-03-25 11:45:20 -07:00
github-actions[bot] 63260d45be chore: version packages (#321)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-23 21:56:56 -07:00
Christian Bromann cb352a0412 feat(deepagent): add LangSmithSandbox (#324)
* feat(deepagent): add LangSmithSandbox

* Change deepagents version from patch to minor

* format

* fix tests

* format

* make it a patch

* cr

* cr

* fix

* cr
2026-03-23 21:40:31 -07:00
Christian Bromann 2b76272e9c fix(deepagents): use crypto.randomUUID() instead of uuid (#336)
* fix(deepagents): use crypto.randomUUID() instead of uuid

* update pnpm-lock

* Create grumpy-weeks-wave.md

* Update libs/deepagents/src/middleware/fs.int.test.ts
2026-03-23 21:20:32 -07:00
Maahir Sachdev 140e9ef517 fix(deepagents): throw on built-in tool collision (#330)
* add error

* Create big-horses-fail.md

* add config error class

* cr

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-03-23 21:20:02 -07:00
pawel-twardziak 3254f71708 fix(deepagents): remove orphaned ToolMessages for Gemini compatibility (#335)
* fix(deepagents): remove orphaned ToolMessages for Gemini compatibility

* Fix ToolMessages for Gemini compatibility

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-03-23 21:04:36 -07:00
Colin Francis 03ea1c9729 revert: "feat(deepagents): support multimodal files for backends (#298)" (#352)
* Revert "feat(deepagents): support multimodal files for backends (#298)"

This reverts commit aab678ad66.

* regen lock file

* fix empty string id check for sandbox protocols
2026-03-23 14:48:00 -07:00
Colin Francis 367e43a5ed revert: "feat(sdk): add async subagent middleware for remote LangGraph servers (#323)" (#351)
* Revert "feat(sdk): add async subagent middleware for remote LangGraph servers  (#323)"

This reverts commit 2bebf306f5.

* regen lock
2026-03-23 14:22:33 -07:00
Colin Francis 573479d743 Revert "chore(deepagents): refactor backend method names - lsInfo -> ls, …" (#349)
This reverts commit a5ba74eac2.
2026-03-23 13:46:06 -07:00
Colin Francis 96dc34ccb6 Revert "chore(sdk): unify sync subagents and async subagents into a single pr…" (#348)
This reverts commit ab85866549.
2026-03-23 13:45:42 -07:00