[PR #178] [MERGED] refactor: migrate memory middleware to use SystemMessage #183

Closed
opened 2026-02-16 06:17:22 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/178
Author: @JadenKim-dev
Created: 2/3/2026
Status: Merged
Merged: 2/3/2026
Merged by: @christian-bromann

Base: mainHead: edit-memory-middleware


📝 Commits (2)

  • 56fc766 refactor(deepagents): migrate memory middleware to use SystemMessage
  • a9893be add changeset

📊 Changes

3 files changed (+51 additions, -25 deletions)

View changed files

.changeset/stale-pugs-hammer.md (+5 -0)
📝 libs/deepagents/src/middleware/memory.test.ts (+38 -19)
📝 libs/deepagents/src/middleware/memory.ts (+8 -6)

📄 Description

Update memory middleware to use SystemMessage class instead of string-based systemPrompt. This change aligns the middleware with the updated request interface. (request.systemPrompt seems to be deprecated)

  • Replace systemPrompt string with SystemMessage object
  • 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

🔄 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/178 **Author:** [@JadenKim-dev](https://github.com/JadenKim-dev) **Created:** 2/3/2026 **Status:** ✅ Merged **Merged:** 2/3/2026 **Merged by:** [@christian-bromann](https://github.com/christian-bromann) **Base:** `main` ← **Head:** `edit-memory-middleware` --- ### 📝 Commits (2) - [`56fc766`](https://github.com/langchain-ai/deepagentsjs/commit/56fc766b64d6180dd472e35606f1cc2e5b4b075c) refactor(deepagents): migrate memory middleware to use SystemMessage - [`a9893be`](https://github.com/langchain-ai/deepagentsjs/commit/a9893be30f8fdd3b9bf02301506862b7ced3b5ab) add changeset ### 📊 Changes **3 files changed** (+51 additions, -25 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/stale-pugs-hammer.md` (+5 -0) 📝 `libs/deepagents/src/middleware/memory.test.ts` (+38 -19) 📝 `libs/deepagents/src/middleware/memory.ts` (+8 -6) </details> ### 📄 Description Update memory middleware to use SystemMessage class instead of string-based systemPrompt. This change aligns the middleware with the updated request interface. (request.systemPrompt seems to be deprecated) - Replace systemPrompt string with SystemMessage object - 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 --- <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 06:17:22 -05:00
yindo closed this issue 2026-02-16 06:17:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#183