Commit Graph

70 Commits

Author SHA1 Message Date
github-actions[bot] d4e81b58cc chore: version packages (#224)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 12:46:01 -08:00
Christian Bromann 199c86c013 fix(deepagents): update summarization behavior (#234)
* fix(deepagents): update summarization behavior

* actually use deepagent summarization middleware

* Update summarization behavior for deepagents

* make it work

* format

* fix pnpm-lock
2026-02-18 12:27:49 -08:00
Christian Bromann a827af7be8 feat(standard-tests): make test suite framework-agnostic and publish as public package (#237)
* feat(standard-tests): make test suite framework-agnostic and publish as public package

Move @langchain/sandbox-standard-tests from internal/ to libs/ for
publishing. The test suite no longer hard-depends on Vitest — test-runner
primitives (describe, it, expect, beforeAll, afterAll) are supplied via
a `runner` config property, letting consumers use any framework.

A convenience sub-export at @langchain/sandbox-standard-tests/vitest
pre-fills the runner with Vitest primitives for zero-config usage.

* format

* no underscore

* adding copies of license files

* adding changesets

* add build step

* fix test
2026-02-18 12:14:01 -08:00
Christian Bromann 357a092b31 feat(deepagents): add local shell backend (#236)
* feat(deepagents): add local shell backend

* format

* make it async

* update readme

* add integration tests

* format

* fix types
2026-02-18 11:09:17 -08:00
Alexei Vedernikov a762b91e7a chore(deepagents): re-export createSummarizationMiddleware (#230) 2026-02-15 11:04:00 -08:00
Maahir Sachdev 065f7cb5ee Merge branch 'main' into fix-write-file 2026-02-12 09:23:36 -08:00
Maahir Sachdev c966259da6 fix 2026-02-12 09:22:43 -08:00
Maahir Sachdev 3e041b3bac update test 2026-02-12 09:14:09 -08:00
Maahir Sachdev bb2598b4fa fix(deepagents): prevent write_file crash when model omits content
Default the `content` parameter to an empty string so a missing argument
doesn't crash the entire agent run via Zod validation failure.
2026-02-12 09:11:01 -08:00
github-actions[bot] 310f6fcab9 chore: version packages (#220)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-11 21:32:18 -08:00
Christian Bromann 163c1357e8 fix(deepagents): unwrap responseFormat strategy types so structuredResponse is correctly typed (#222)
* fix(deepagents): unwrap responseFormat strategy types so structuredResponse is correctly typed

Previously, passing responseFormat to createDeepAgent would leak the
strategy wrapper type (e.g. ToolStrategy<{ city: string }>) into the
agent's structuredResponse property instead of the inner parsed type
({ city: string }). This adds an InferStructuredResponse utility type
that extracts T from ToolStrategy<T> / ProviderStrategy<T>, and resolves
to ResponseFormatUndefined when no responseFormat is provided.

Also adds integration tests covering toolStrategy, providerStrategy,
combined tools + responseFormat, nested schemas, and subagents with
structured output.

* format

* Create stale-planes-breathe.md

* improve tests

* update deps

* add type tests
2026-02-11 21:31:03 -08:00
Christian Bromann ae70fa400e fix(deepagents): pass on subagent name (#218)
* fix(deepagents): pass on subagent name

* Add changeset for deepagents patch

* update deps

* format
2026-02-10 23:04:54 -08:00
github-actions[bot] 4b2892bd5b chore: version packages (#219)
* 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-02-11 03:47:30 +00:00
Hunter Lovell adce96c7c7 fix(skills): improve skills middleware input validation and add annotations (#211)
* fix(skills): improve skills middleware input validation and add annotations

* cr

* cr

* cr
2026-02-10 19:37:56 -08:00
Christian Bromann eadf2a3856 chore(deepagents): verify we can run nested deepagents (#207) 2026-02-10 19:30:20 -08:00
Hunter Lovell 2eea576809 refactor(summarization): state rework, move to wrap pattern (#210)
* refactor(summarization): state rework, move to wrap pattern

* cr
2026-02-10 18:18:42 -08:00
github-actions[bot] 7f82473721 chore: version packages (#217)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-10 15:18:49 -08:00
Anton Nak 4ea18587a3 fix(skills): use systemMessage.concat() instead of systemPrompt string (#208)
* fix(skills): use systemMessage.concat() instead of systemPrompt string

* style: fix Prettier formatting in skills.test.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(skills): update integration tests to use systemMessage API

The integration tests were using the old systemPrompt string API
but wrapModelCall now uses request.systemMessage.concat(). Updated
tests to pass SystemMessage objects and read from systemMessage.text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Anton Nakaliuzhnyi <anakaliuzhnyi@gipartners.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 14:38:52 -08:00
github-actions[bot] 809d79aff0 chore: version packages (#202)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-09 10:22:32 -08:00
Christian Bromann 3f30ba7e1d test(sandbox): enhance standard tests for sandboxes (#201)
* test(sandbox): enhance standard tests for sandboxes

* retrigger

* fix tests

* cr

* format

* fix deno

* cr

* format

* changeset

* cr

* cr

* don't need read/write overwrite anymore

* fix initial files

* format

* fix
2026-02-09 10:20:33 -08:00
Youngho Kim a837eacb81 fix: normalize path handling for cross-platform compatibility (#200)
* fix: normalize path handling for cross-platform compatibility

* add changesets

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-02-07 00:07:00 -08:00
github-actions[bot] 381e854d01 chore: version packages (#198)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-06 15:02:01 -08:00
Christian Bromann e4b5892b0e fix(deepagents): runtime agnostic sandbox operations (#197)
* fix(modal): add token to run in CI

* improve fs operations

* format

* changesets
2026-02-06 14:59:51 -08:00
github-actions[bot] 7cf506eee6 chore: version packages (#196)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-06 13:31:18 -08:00
Christian Bromann 731b01ed17 fix(deepagents): polish sandbox interfaces (#194)
* fix(deepagents): polish sandbox interfaces

* revert

* global ref

* format

* changesets

* tweak CI

* fix
2026-02-06 13:27:10 -08:00
github-actions[bot] e1a9a62d12 chore: version packages (#192)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-04 22:57:14 -08:00
Christian Bromann 988b44c129 feat: add SandboxProvider abstraction (#165)
* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* format

* feat: add support for Vercel sandbox

* feat: add VFS sandbox

* format

* rm vercel

* rename

* format

* rename

* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* feat: add support for Vercel sandbox

* feat: add VFS sandbox

* format

* rm vercel

* rename

* rename

* feat: add support for Vercel sandbox

* feat: support for sandbox provider

* not needed

* format

* add changeset

* missed file

* tweak

* format

* change changeset
2026-02-04 21:49:22 -08:00
Christian Bromann 07b91219e4 fix(summarization): resolve fraction trigger bug by using model profile for maxInputTokens (#189)
* fix(summarization): resolve fraction trigger bug by using model profile for maxInputTokens

The fraction-based trigger in createSummarizationMiddleware was always
ineffective because maxInputTokens was never passed to the internal
functions that needed it.

fixes #185

* fix type
2026-02-04 17:06:15 -08:00
Christian Bromann d7cc7f4d92 feat(deepagents): support skills in subagents (#187)
* feat(deepagents): support skills in subagents

* better check for runnable

* improve testing

* format
2026-02-04 17:01:52 -08:00
Christian Bromann 2380fc1317 fix(deepagents): grep should perform literal search instead of regex (#186) 2026-02-04 17:01:38 -08:00
Christian Bromann 9ce0db10e4 chore(deepagents): minor Readme tweaks 2026-02-04 14:41:02 -08:00
Youngho Kim 1a902db31f chore: migrate to use SystemMessage and add tests for filesystem middleware (#184)
* refactor: migrate filesystem middleware to use SystemMessage

Refactor `createFilesystemMiddleware` to use `systemMessage.concat()` instead of string concatenation with `systemPrompt`. This aligns with the pattern established in the memory middleware and provides better type safety.

Add comprehensive test coverage for `wrapModelCall` including:
- System prompt injection behavior
- Conditional execute tool registration based on backend support
- Custom system prompt handling

* test: add comprehensive wrapToolCall tests for filesystem middleware

Add test coverage for the wrapToolCall functionality in the filesystem middleware:
- Test pass-through behavior when eviction is disabled
- Test that tools in TOOLS_EXCLUDED_FROM_EVICTION are not evicted regardless of size
- Test that small tool results are not evicted
- Test eviction of large ToolMessage results to filesystem
- Test handling of Command objects with multiple ToolMessages
- Test graceful error handling when backend write fails during eviction
2026-02-04 11:04:26 -08:00
github-actions[bot] 72c3b18d09 chore: version packages (#182)
* 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-02-04 03:14:33 +00:00
Hunter Lovell 063436e0a0 feat: set default recursionLimit to 10k (#183)
* feat: set default recursionLimit to 10k

* chore: format

* chore: fixup bad test
2026-02-03 19:11:23 -08:00
Youngho Kim 9f77da4723 refactor: migrate memory middleware to use SystemMessage (#178)
* refactor(deepagents): migrate memory middleware to use SystemMessage

Update memory middleware to use SystemMessage class instead of string-based systemPrompt. This change aligns the middleware with the updated request interface and provides better type safety.

- Replace systemPrompt string with SystemMessage object in memory.ts
- Use SystemMessage.concat() method for combining memory section with existing system message
- Update all test cases to use SystemMessage constructor and .text property for assertions

* add changeset

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-02-03 16:18:50 -08:00
Maahir Sachdev 3cc53264db refactor: Add shared filesValue state primitive (#181)
* Add shared filesValue

* lint
2026-02-03 16:18:26 -08:00
github-actions[bot] 41f1e38f65 chore: version packages (#164)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-02 22:40:11 -08:00
Christian Bromann 90ade665a3 fix(deepagents): fix type issues (#174)
* fix(deepagents): fix type issues

* fix types

* minor tweak
2026-02-02 22:35:00 -08:00
Christian Bromann 7038d247a8 fix(deepagents): resolve dangling tool_call_id when rejecting parallel tool calls (#173)
* fix(deepagents): resolve dangling tool_call_id when rejecting parallel tool calls

* type improvements

* format
2026-02-02 21:41:32 -08:00
Christian Bromann dff8977d20 fix(deepagents): remove obsolete import 2026-02-02 21:15:52 -08:00
Maahir Sachdev e4f9f8d8c8 fix: missing files in skillsMiddleware schema (#160)
* fix missing files in skillsMiddleware

* Update tests

* Add integration tests + fixes

* Restore skills.test.ts from main

* Update tests to unit from integration

* Update unit tests

* fix test

* changeset
2026-02-02 21:11:51 -08:00
Christian Bromann c674c619cd fix(deepagents): prevent infinite loop when read_file returns large content (#172)
* fix(deepagents): prevent infinite loop when read_file returns large content (#82)

When a tool returned a large result with few but very long lines, the
agent could enter an infinite eviction/read loop. The content would be
evicted to the filesystem, then read_file would return all the content
(since it only had a line limit, not a character limit), which would
again exceed the eviction threshold.

fixes #82

* export FileData from right place

* add changesets
2026-02-02 21:10:56 -08:00
Christian Bromann 52675bd939 fix(deepagents): handle empty oldString in performStringReplacement (#170)
* fix: handle empty oldString in performStringReplacement (#161)

When both file content and oldString are empty, `content.split("")`
returns an empty array, causing `occurrences` to be -1 and returning
an invalid success response.

This change:
- Adds special case handling for empty files: when both content and
  oldString are empty, treat it as "set initial content" and return
  [newString, 0]
- Returns a clear error when oldString is empty but file has content
- Adds comprehensive tests for empty oldString scenarios

This allows users to edit empty files by passing oldString="" with
their desired content, while preventing ambiguous empty replacements
on non-empty files.

fixes #161

* retrigger
2026-02-02 21:08:30 -08:00
Christian Bromann e6d895bdf9 fix(middleware): avoid unnecessary REMOVE_ALL_MESSAGES in PatchToolCallsMiddleware (#169)
* fix(middleware): avoid unnecessary REMOVE_ALL_MESSAGES in PatchToolCallsMiddleware

The middleware was unconditionally triggering REMOVE_ALL_MESSAGES on every
request, even when there were no dangling tool calls to patch. This caused
unnecessary frontend re-renders and UI flickering when using useStream with
fetchStateHistory: true.

Added a needsPatch flag to track whether any dangling tool calls are found,
and only trigger the state rebuild when patching is actually needed.

Fixes #127

* retrigger

* fix test

* add changeset
2026-02-02 21:08:12 -08:00
Maahir Sachdev 0fe09a51de fix: missing files/memoryContents in memory middleware (#159)
* Update memory state schmea

* Update tests

* Update testing

* changeset

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

* Update libs/deepagents/src/middleware/memory.test.ts

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
2026-02-02 20:07:59 -08:00
Youngho Kim 0ef8362f80 test(deepagents): add unit tests for createPatchToolCallsMiddleware (#168) 2026-02-02 10:28:37 -08:00
Christian Bromann 0b65b09864 fix(deepagents): copy LICENSE file into published package 2026-02-01 19:14:00 -08:00
github-actions[bot] fa41f08580 chore: version packages (#151)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-28 10:55:12 -08:00
Christian Bromann 8a92e572ea fix(deepagents): use new StateSchema class (#145)
* fix(deepagents): use new StateSchema class

* format

* fix bundling

* run unit tests also in windows

* revert

* fix windows test issue

* bump lc

* bump lc

* path normalization
2026-01-28 10:52:38 -08:00
github-actions[bot] eb79cdc1e7 chore: version packages (#140)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-23 13:24:49 -08:00