[PR #171] [MERGED] feat: Cleanup middleware implementations and agent definition, add longterm mem + long tool result interceptor #489

Closed
opened 2026-02-16 09:16:09 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagents/pull/171
Author: @nhuang-lc
Created: 10/15/2025
Status: Merged
Merged: 10/17/2025
Merged by: @nhuang-lc

Base: masterHead: nh/clean


📝 Commits (10+)

  • a2bcb43 Add long-term mem and long-tool interceptor, cleanup middleware files
  • e0b58aa Fix version
  • f8e6505 Fix docstr
  • 90d0e6f Update test
  • 4fe881a Add async implementations to middleware
  • f6387e8 Upgrade langchain to use todolist middleware
  • f7355d5 Update tests
  • d6e455c Update pyproject
  • 10562ce Handle Command in addition to ToolMessages with the interceptor
  • 6e2bce3 Update interceptor, and add some info to the too large tool call

📊 Changes

25 files changed (+5135 additions, -1301 deletions)

View changed files

Makefile (+15 -0)
📝 README.md (+305 -227)
📝 examples/research/research_agent.py (+5 -4)
📝 pyproject.toml (+67 -8)
📝 src/deepagents/__init__.py (+7 -5)
📝 src/deepagents/graph.py (+115 -114)
src/deepagents/middleware.py (+0 -199)
src/deepagents/middleware/__init__.py (+6 -0)
src/deepagents/middleware/filesystem.py (+1118 -0)
src/deepagents/middleware/subagents.py (+479 -0)
src/deepagents/model.py (+0 -5)
src/deepagents/prompts.py (+0 -416)
src/deepagents/state.py (+0 -33)
src/deepagents/tools.py (+0 -148)
src/deepagents/types.py (+0 -21)
tests/__init__.py (+1 -0)
tests/integration_tests/__init__.py (+1 -0)
📝 tests/integration_tests/test_deepagents.py (+45 -17)
tests/integration_tests/test_filesystem_middleware.py (+688 -0)
tests/integration_tests/test_hitl.py (+153 -0)

...and 5 more files

📄 Description

Structural Changes

  • Upgrade to latest LangChain alpha release a14
  • Consolidate logic in Middleware files
  • Much more comprehensive tests for Subagents and Filesystem
  • Use the PlanningMiddleware from LangChain instead of a separate implementation

Features

  • Add long-term memory to filesystem
  • Add long-tool interceptor

Breaking Changes

  • Updated the create_deep_agent signature to closely mimic that of create_agent (prompt -> system_prompt)
  • async_create_deep_agent has been folded into create_deep_agent
  • graph -> runnable in CompiledSubAgent schema

🔄 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/deepagents/pull/171 **Author:** [@nhuang-lc](https://github.com/nhuang-lc) **Created:** 10/15/2025 **Status:** ✅ Merged **Merged:** 10/17/2025 **Merged by:** [@nhuang-lc](https://github.com/nhuang-lc) **Base:** `master` ← **Head:** `nh/clean` --- ### 📝 Commits (10+) - [`a2bcb43`](https://github.com/langchain-ai/deepagents/commit/a2bcb43f4f5aba767bcaf04b8e58b3587f8a914e) Add long-term mem and long-tool interceptor, cleanup middleware files - [`e0b58aa`](https://github.com/langchain-ai/deepagents/commit/e0b58aa216c0e9a8259f92dbc9d11d7cfaf7b40e) Fix version - [`f8e6505`](https://github.com/langchain-ai/deepagents/commit/f8e6505b4cfc225824547b303699ea81d6c92fa3) Fix docstr - [`90d0e6f`](https://github.com/langchain-ai/deepagents/commit/90d0e6fc69bbecdf5bfea676b9c8d947d12aa426) Update test - [`4fe881a`](https://github.com/langchain-ai/deepagents/commit/4fe881a4375d1504848c741f9a0032d19ca4d9a2) Add async implementations to middleware - [`f6387e8`](https://github.com/langchain-ai/deepagents/commit/f6387e81d90fd29bb68d5b106831a6c1abd2603f) Upgrade langchain to use todolist middleware - [`f7355d5`](https://github.com/langchain-ai/deepagents/commit/f7355d546e3a0ee79e57d6f4d9fa9d840b573a92) Update tests - [`d6e455c`](https://github.com/langchain-ai/deepagents/commit/d6e455cc340ca209954624a08d1f74228a68f7f4) Update pyproject - [`10562ce`](https://github.com/langchain-ai/deepagents/commit/10562ce2e0a4ee12ff14301a9a16af6680bb4b2d) Handle Command in addition to ToolMessages with the interceptor - [`6e2bce3`](https://github.com/langchain-ai/deepagents/commit/6e2bce39d3739a845393bd2888c5e8e8c18b1fb8) Update interceptor, and add some info to the too large tool call ### 📊 Changes **25 files changed** (+5135 additions, -1301 deletions) <details> <summary>View changed files</summary> ➕ `Makefile` (+15 -0) 📝 `README.md` (+305 -227) 📝 `examples/research/research_agent.py` (+5 -4) 📝 `pyproject.toml` (+67 -8) 📝 `src/deepagents/__init__.py` (+7 -5) 📝 `src/deepagents/graph.py` (+115 -114) ➖ `src/deepagents/middleware.py` (+0 -199) ➕ `src/deepagents/middleware/__init__.py` (+6 -0) ➕ `src/deepagents/middleware/filesystem.py` (+1118 -0) ➕ `src/deepagents/middleware/subagents.py` (+479 -0) ➖ `src/deepagents/model.py` (+0 -5) ➖ `src/deepagents/prompts.py` (+0 -416) ➖ `src/deepagents/state.py` (+0 -33) ➖ `src/deepagents/tools.py` (+0 -148) ➖ `src/deepagents/types.py` (+0 -21) ➕ `tests/__init__.py` (+1 -0) ➕ `tests/integration_tests/__init__.py` (+1 -0) 📝 `tests/integration_tests/test_deepagents.py` (+45 -17) ➕ `tests/integration_tests/test_filesystem_middleware.py` (+688 -0) ➕ `tests/integration_tests/test_hitl.py` (+153 -0) _...and 5 more files_ </details> ### 📄 Description **Structural Changes** - Upgrade to latest LangChain alpha release a14 - Consolidate logic in Middleware files - Much more comprehensive tests for Subagents and Filesystem - Use the PlanningMiddleware from LangChain instead of a separate implementation **Features** - Add long-term memory to filesystem - Add long-tool interceptor **Breaking Changes** - Updated the `create_deep_agent` signature to closely mimic that of `create_agent` (prompt -> system_prompt) - async_create_deep_agent has been folded into `create_deep_agent` - graph -> runnable in CompiledSubAgent schema --- <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-02-16 09:16:09 -05:00
yindo closed this issue 2026-02-16 09:16:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagents#489