[PR #440] feat: add artifactsRoot to CompositeBackend and middleware #464

Open
opened 2026-06-05 17:23:16 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/440
Author: @open-swe[bot]
Created: 4/8/2026
Status: 🔄 Open

Base: mainHead: open-swe/23f64c62-afe9-dc40-bbe0-c86a558611b3


📝 Commits (1)

  • 8737734 feat: add artifactsRoot to CompositeBackend and middleware

📊 Changes

6 files changed (+450 additions, -3 deletions)

View changed files

libs/deepagents/src/backends/composite.artifacts-root.test.ts (+33 -0)
📝 libs/deepagents/src/backends/composite.ts (+6 -0)
libs/deepagents/src/middleware/fs.artifacts-root.test.ts (+222 -0)
📝 libs/deepagents/src/middleware/fs.ts (+13 -2)
libs/deepagents/src/middleware/summarization.artifacts-root.test.ts (+165 -0)
📝 libs/deepagents/src/middleware/summarization.ts (+11 -1)

📄 Description

Description

Port of langchain-ai/deepagents#2490. Adds an optional artifactsRoot parameter to CompositeBackend that propagates through FilesystemMiddleware and SummarizationMiddleware. This parameterizes the paths used for large tool result eviction (/large_tool_results/) and conversation history offloading (/conversation_history/), allowing callers to control where internal artifacts are written. Defaults to "/" for backwards compatibility.

Test Plan

  • Verify CompositeBackend accepts and stores custom artifactsRoot
  • Verify filesystem middleware uses artifactsRoot for tool result eviction and HumanMessage eviction paths
  • Verify summarization middleware uses artifactsRoot for conversation history prefix
  • Verify trailing slash normalization prevents double slashes

Opened collaboratively by Sydney Runkle and open-swe.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/440 **Author:** [@open-swe[bot]](https://github.com/apps/open-swe) **Created:** 4/8/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `open-swe/23f64c62-afe9-dc40-bbe0-c86a558611b3` --- ### 📝 Commits (1) - [`8737734`](https://github.com/langchain-ai/deepagentsjs/commit/873773476aa2cc9d57781c1c005db7fbc45a779a) feat: add artifactsRoot to CompositeBackend and middleware ### 📊 Changes **6 files changed** (+450 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `libs/deepagents/src/backends/composite.artifacts-root.test.ts` (+33 -0) 📝 `libs/deepagents/src/backends/composite.ts` (+6 -0) ➕ `libs/deepagents/src/middleware/fs.artifacts-root.test.ts` (+222 -0) 📝 `libs/deepagents/src/middleware/fs.ts` (+13 -2) ➕ `libs/deepagents/src/middleware/summarization.artifacts-root.test.ts` (+165 -0) 📝 `libs/deepagents/src/middleware/summarization.ts` (+11 -1) </details> ### 📄 Description ## Description Port of [langchain-ai/deepagents#2490](https://github.com/langchain-ai/deepagents/pull/2490). Adds an optional `artifactsRoot` parameter to `CompositeBackend` that propagates through `FilesystemMiddleware` and `SummarizationMiddleware`. This parameterizes the paths used for large tool result eviction (`/large_tool_results/`) and conversation history offloading (`/conversation_history/`), allowing callers to control where internal artifacts are written. Defaults to `"/"` for backwards compatibility. ## Test Plan - [ ] Verify `CompositeBackend` accepts and stores custom `artifactsRoot` - [ ] Verify filesystem middleware uses `artifactsRoot` for tool result eviction and HumanMessage eviction paths - [ ] Verify summarization middleware uses `artifactsRoot` for conversation history prefix - [ ] Verify trailing slash normalization prevents double slashes _Opened collaboratively by Sydney Runkle and open-swe._ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 17:23:16 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#464