* feat(deepagent): add LangSmithSandbox
* Change deepagents version from patch to minor
* format
* fix tests
* format
* make it a patch
* cr
* cr
* fix
* cr
* launch tool, check tool
* update tool and cancel tool
* update and cancel tool tests
* list async subagent jobs tool
* list subagent jobs tool and create middleware
* wire in async subagents
* create and use state schema, update message to messages
* tests
* AsyncSubagent -> AsyncSubAgent
* fix import
* bug fixes
* fix exports
* refactor for sync and async subagents as a single entry point
* fix tool names
* restore processed subagent var name
* fix bug
* adjust tool names and tests
* add createdAt, updatedAt, and checkAt fields
* add a changeset
* job->task
* SubAgent->subagent in docstrings
* update tool names
* use tool runtime
* update naming to match async task naming convention
* remove extra custom middleware added during merge conflicts
* launch_async_task->start_async_task
* buildLaunchTool->buildStartTool
* feat(node-vfs): enhance VfsSandbox to support absolute paths in commands and add related integration tests
- Implemented a method to rewrite absolute paths in commands referencing VFS entries to point to the temporary directory.
- Added integration tests for executing multi-file Node.js projects with both absolute and relative paths.
- Updated existing tests to clarify path usage in commands.
* fix(node-vfs): add changeset for rewriting absolute VFS paths in execute() commands
* fix: ci
---------
Co-authored-by: wangjiangjian.0224 <wangjiangjian.0224@bytedance.com>
* fix(deepagents): reorder middleware so prompt caching and memory run last
Move anthropicPromptCachingMiddleware and memoryMiddleware after all static
and user-supplied middleware so that updates to memory contents do not
invalidate Anthropic prompt caches.
Port of langchain-ai/deepagents#2070.
* cr
* update backend protocol interface, types, and utils
* refactor state backend
* refactor store backend
* clean up
* unit tests
* refactor filesystem
* unit tests
* skip binary files in literal search for filesystem backend
* refactor base sandbox
* base sandbox unit tests
* refactor local shell backend
* refactor composite backend
* composite and local shell backend changes
* refactor fs middleware
* unit tests and fixed issue where createFileData was removed - this would be breaking
* refactor acp filesystem backend
* backend protocol v2
* simplify createFileData
* docstrings
* adapt backend protocol tests
* sandbox protocol v2
* format
* standard tests
* fix tests
* fix tests
* fix tests
* fix node vfs
* lint fix
* empty commit
* fix download files to handle binary
* any backend protocol
* lint
* make backend protocol v2 extend backend protocol
* make backend unknown type for is sandbox backend check
* add changeset
* add max binary file size
* add svg
* separate v1 and v2
* format
* lint
* format
* update glob, ls, read raw return types
* unit test fixes
* fix tests
* restore standard-tests package
* fix integ tests - make standard-tests backward compatible
* remove deleted sandbox adapter
* standard-test refactor for backwards compat
* linting
* fix tests
* type guards and improved guard checks
* store mime type with v2 file data
* make explicit v1 types
* fix locall shell int types
* fix bug
* edge case
* update providers
* lint
* fix repl
* read raw tests
* support string or unint8arrays
* clean comments, docstrings, and fix issue where we were throwing a string
* don't re-wrap uint8arrays
* clean up test names
* fix quickjs
* poison pill and uint8array issues
* add back video and audio support
* bump langgraph-checkpoint version for json plus serializer changes
* fix lock after merge with main
* remove explicit cast
* use instance of Uint8Array for FileDataV2 schema
* update changeset
* update backend protocol interface, types, and utils
* refactor state backend
* refactor store backend
* clean up
* unit tests
* refactor filesystem
* unit tests
* skip binary files in literal search for filesystem backend
* refactor base sandbox
* base sandbox unit tests
* refactor local shell backend
* refactor composite backend
* composite and local shell backend changes
* refactor fs middleware
* unit tests and fixed issue where createFileData was removed - this would be breaking
* refactor acp filesystem backend
* backend protocol v2
* simplify createFileData
* docstrings
* adapt backend protocol tests
* sandbox protocol v2
* format
* standard tests
* fix tests
* fix tests
* fix tests
* fix node vfs
* lint fix
* empty commit
* fix download files to handle binary
* any backend protocol
* lint
* make backend protocol v2 extend backend protocol
* make backend unknown type for is sandbox backend check
* add changeset
* add max binary file size
* add svg
* separate v1 and v2
* format
* lint
* format
* update glob, ls, read raw return types
* unit test fixes
* fix tests
* restore standard-tests package
* fix integ tests - make standard-tests backward compatible
* remove deleted sandbox adapter
* standard-test refactor for backwards compat
* linting
* fix tests
* type guards and improved guard checks
* store mime type with v2 file data
* make explicit v1 types
* fix locall shell int types
* fix bug
* edge case
* update providers
* lint
* fix repl
* read raw tests
* support string or unint8arrays
* clean comments, docstrings, and fix issue where we were throwing a string
* don't re-wrap uint8arrays
* clean up test names
* fix quickjs
* poison pill and uint8array issues
* add back video and audio support
* bump langgraph-checkpoint version for json plus serializer changes
* fix lock after merge with main
* remove explicit cast
* use instance of Uint8Array for FileDataV2 schema
* refactor backend methods
* add changeset
* changesets
* regen lock
* update backend protocol interface, types, and utils
* refactor state backend
* refactor store backend
* clean up
* unit tests
* refactor filesystem
* unit tests
* skip binary files in literal search for filesystem backend
* refactor base sandbox
* base sandbox unit tests
* refactor local shell backend
* refactor composite backend
* composite and local shell backend changes
* refactor fs middleware
* unit tests and fixed issue where createFileData was removed - this would be breaking
* refactor acp filesystem backend
* backend protocol v2
* simplify createFileData
* docstrings
* adapt backend protocol tests
* sandbox protocol v2
* format
* standard tests
* fix tests
* fix tests
* fix tests
* fix node vfs
* lint fix
* empty commit
* fix download files to handle binary
* any backend protocol
* lint
* make backend protocol v2 extend backend protocol
* make backend unknown type for is sandbox backend check
* add changeset
* add max binary file size
* add svg
* separate v1 and v2
* format
* lint
* format
* update glob, ls, read raw return types
* unit test fixes
* fix tests
* restore standard-tests package
* fix integ tests - make standard-tests backward compatible
* remove deleted sandbox adapter
* standard-test refactor for backwards compat
* linting
* fix tests
* fix integ test
* type guards and improved guard checks
* store mime type with v2 file data
* make explicit v1 types
* fix locall shell int types
* fix bug
* edge case
* update providers
* lint
* fix repl
* read raw tests
* support string or unint8arrays
* clean comments, docstrings, and fix issue where we were throwing a string
* don't re-wrap uint8arrays
* clean up test names
* fix quickjs
* poison pill and uint8array issues
* add back video and audio support
* bump langgraph-checkpoint version for json plus serializer changes
* fix lock after merge with main
* remove explicit cast
* use instance of Uint8Array for FileDataV2 schema
* update changeset
* regen lock
* fix(deepagents): move uuid from devDependencies to dependencies
* Move uuid to dependencies from devDependencies
---------
Co-authored-by: Christian Bromann <git@bromann.dev>
* feat(acp): add authMethods to InitializeResponse for ACP registry compliance
The ACP registry CI verifies that agents advertise authentication
methods during initialization. Add configurable `authMethods` to
`DeepAgentsServerOptions` with sensible defaults (Anthropic/OpenAI
env_var methods + agent-type fallback), and expose typed interfaces
for all three ACP auth method types (agent, env_var, terminal).
* Create weak-singers-wash.md
* format
* remove description prop
* improve caching performance
* add changeset
* add check for anthropic models
* use content blocks
* test isAnthropicModel
* update logic to ensure all stable content BEFORE the memory block is cached - not just the system prompt
* fix type check error
* add cache breakpoint after subagent middleware for default and general purpose
* fix: delegate CompositeBackend.id to default sandbox backend
CompositeBackend failed isSandboxBackend check because it lacked the
required id property from SandboxBackendProtocol. Added a get id()
getter that delegates to the default backend's id when it is a sandbox,
or returns an empty string otherwise. This preserves the real sandbox
ID (e.g. from Daytona/Deno/Modal) for external lifecycle operations
like provider.delete({ sandboxId: sandbox.id }).
Fixes#275
* Fix delegation of CompositeBackend.id to sandbox backend
* fix: add truncation to grep/glob/ls tool results
Fixes#272
grep, glob, and ls tools can return hundreds of KB of results, which
can exceed context limits and cause model retries or blank responses.
This adds truncation at the TOOL_RESULT_TOKEN_LIMIT (20K tokens ~80KB)
threshold, consistent with read_file's existing behavior.
Changes:
- Import truncateIfTooLong utility in fs.ts middleware
- Apply truncation to ls, glob, and grep tool results
- Truncate arrays before joining to preserve complete lines
- Add guidance message when results are truncated
The truncation happens in the middleware layer (matching Python's
architecture), not in the backend, so backends return full results
and middleware applies the limit.
* test: add documentation for truncation test coverage
Add note explaining that ls/grep/glob truncation is covered by
existing truncateIfTooLong tests in utils.test.ts (lines 290-314).
Full integration tests would require complex LangGraph context setup.
* test: add integration tests for ls/grep/glob truncation
Add proper integration tests that verify truncation works through the
entire middleware → tool → backend → formatting → truncation pipeline.
- Mock getCurrentTaskInput to enable tool invocation without LangGraph
- Test ls, glob, and grep tools with large result sets (truncated)
- Test ls, glob, and grep tools with small result sets (not truncated)
- Remove unnecessary comments for cleaner test code
These tests verify that the truncation logic added in commit 6e4a2b8
works correctly through the full middleware integration.
* Implement truncation in tool results
Add truncation feature to grep, glob, and ls tool results.
---------
Co-authored-by: Christian Bromann <git@bromann.dev>
* feat(server): add ACP support
* improvements
* rename to deepagents-acp
* format
* add missing props
* linting
* lint
* more docs
* Create orange-scissors-tell.md
* more features
* format
* format
* fix tests
* format
* fix(deepagents): fix OOM in conversation history offloading (#XXX)
The summarization middleware used edit() to append to the conversation
history file, which downloaded the file twice and performed a full
string search-and-replace — causing ~6x peak memory relative to file
size. Replace with direct byte concatenation via uploadFiles(), reducing
peak memory to ~2x.
Also harden BaseSandbox.edit() with memory and performance improvements:
- Count occurrences via indexOf loop instead of split() to avoid
allocating intermediate arrays
- Use replaceAll() instead of split().join()
- Reuse found index for single-replace to skip redundant search
- Release raw Uint8Array early for GC
- Guard against empty oldString (infinite loop)
- Short-circuit when oldString === newString
* Fix OOM issue in conversation history offloading
* improved behavior for empty files
* format