[PR #617] [CLOSED] Add unit tests for SystemMessage support #784

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagents/pull/617
Author: @ps06756
Created: 12/25/2025
Status: Closed

Base: masterHead: add-unit-tests-for-system-message-support


📝 Commits (2)

  • 305fd44 Improve create_deep_agent() to support SystemMessage type
  • bbd0f97 Add unit tests for SystemMessage support in create_deep_agent

📊 Changes

2 files changed (+208 additions, -2 deletions)

View changed files

📝 libs/deepagents/deepagents/graph.py (+9 -2)
libs/deepagents/tests/unit_tests/test_create_deep_agent.py (+199 -0)

📄 Description

Adds comprehensive unit tests for #597 and PR #612.

Summary

This PR adds unit tests for the SystemMessage type support in the system_prompt parameter of create_deep_agent(). These tests are designed to work with PR #612 which implements the feature to align with langchain.agents.create_agent.

Tests Added

  • String system_prompt (existing behavior)
  • SystemMessage system_prompt (new behavior from #597)
  • None and default system_prompt
  • Complex content in SystemMessage
  • Empty string and empty SystemMessage content

All 7 tests pass when run on top of PR #612.

Note

This PR is based on the improve-create-deep-agent branch from PR #612 and should be reviewed/merged alongside it.

Related: #597, #612


🔄 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/617 **Author:** [@ps06756](https://github.com/ps06756) **Created:** 12/25/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `add-unit-tests-for-system-message-support` --- ### 📝 Commits (2) - [`305fd44`](https://github.com/langchain-ai/deepagents/commit/305fd44e0de28747b6a4373447d6ba0feb38dccd) Improve create_deep_agent() to support SystemMessage type - [`bbd0f97`](https://github.com/langchain-ai/deepagents/commit/bbd0f970cbc9bf37df2d1f162ce8a2196badf0de) Add unit tests for SystemMessage support in create_deep_agent ### 📊 Changes **2 files changed** (+208 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `libs/deepagents/deepagents/graph.py` (+9 -2) ➕ `libs/deepagents/tests/unit_tests/test_create_deep_agent.py` (+199 -0) </details> ### 📄 Description Adds comprehensive unit tests for #597 and PR #612. ## Summary This PR adds unit tests for the SystemMessage type support in the `system_prompt` parameter of `create_deep_agent()`. These tests are designed to work with PR #612 which implements the feature to align with `langchain.agents.create_agent`. ## Tests Added - String system_prompt (existing behavior) - SystemMessage system_prompt (new behavior from #597) - None and default system_prompt - Complex content in SystemMessage - Empty string and empty SystemMessage content All 7 tests pass when run on top of PR #612. ## Note This PR is based on the `improve-create-deep-agent` branch from PR #612 and should be reviewed/merged alongside it. Related: #597, #612 --- <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:17:09 -05:00
yindo closed this issue 2026-02-16 09:17: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#784