[PR #394] [MERGED] chore(sdk): update async subagent middleware for agent protocol #421

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/394
Author: @colifran
Created: 3/30/2026
Status: Merged
Merged: 3/31/2026
Merged by: @colifran

Base: alphaHead: colifran/agent-protocol-for-async-subagents


📝 Commits (7)

  • b1a2492 update async subagent middleware for agent protocol
  • 67a2d26 add changeset
  • ae61234 Update libs/deepagents/src/middleware/async_subagents.ts
  • 58a1e39 Update libs/deepagents/src/middleware/async_subagents.ts
  • e18eae4 Update libs/deepagents/src/middleware/async_subagents.ts
  • 2e1362a Merge branch 'alpha' into colifran/agent-protocol-for-async-subagents
  • 9395494 differentiate agent protocol

📊 Changes

5 files changed (+57 additions, -25 deletions)

View changed files

.changeset/thirty-steaks-see.md (+5 -0)
📝 examples/async-subagents/parallel-research/researcher.ts (+4 -4)
📝 libs/deepagents/src/agent.ts (+2 -0)
📝 libs/deepagents/src/middleware/async_subagents.ts (+45 -21)
📝 libs/deepagents/src/middleware/index.ts (+1 -0)

📄 Description

Summary

Broadens async subagent middleware to work with self-hosted Agent Protocol servers, not just LangGraph
Platform.

  • Docstrings: Updated AsyncSubAgent, AsyncTask, AsyncTaskStatus, ASYNC_TASK_SYSTEM_PROMPT,
    and createAsyncSubAgentMiddleware to reference "Agent Protocol server" rather than "LangGraph
    server/deployment"
  • AsyncTaskStatus: Added "pending" to the union — both LangGraph Platform and self-hosted
    servers return this as the initial run state
  • ASYNC_TASK_TOOL_NAMES: Added exported constant and included in BUILTIN_TOOL_NAMES so
    user-provided tools that collide with async tool names (start_async_task etc.) surface a
    ConfigurationError
  • Example fix: Updated parallel-research/researcher.ts to use the renamed
    createCompletionCallbackMiddleware and callbackGraphId

Note: This is mostly just documentation changes.


🔄 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/394 **Author:** [@colifran](https://github.com/colifran) **Created:** 3/30/2026 **Status:** ✅ Merged **Merged:** 3/31/2026 **Merged by:** [@colifran](https://github.com/colifran) **Base:** `alpha` ← **Head:** `colifran/agent-protocol-for-async-subagents` --- ### 📝 Commits (7) - [`b1a2492`](https://github.com/langchain-ai/deepagentsjs/commit/b1a2492c10bc7e7776ce6d4ae5b0c5187c157056) update async subagent middleware for agent protocol - [`67a2d26`](https://github.com/langchain-ai/deepagentsjs/commit/67a2d2624346705b800818bda4d0701a7e4b6ca0) add changeset - [`ae61234`](https://github.com/langchain-ai/deepagentsjs/commit/ae61234a1cfca68b64c4e8aea165fbeb73d0b0bc) Update libs/deepagents/src/middleware/async_subagents.ts - [`58a1e39`](https://github.com/langchain-ai/deepagentsjs/commit/58a1e39b35f2221552cfb7d38ff027e87b34a234) Update libs/deepagents/src/middleware/async_subagents.ts - [`e18eae4`](https://github.com/langchain-ai/deepagentsjs/commit/e18eae4740f4436663c6bcc472988a5d4f666e3f) Update libs/deepagents/src/middleware/async_subagents.ts - [`2e1362a`](https://github.com/langchain-ai/deepagentsjs/commit/2e1362a929f1cb62ffb75b9d42ce2c66f2b789db) Merge branch 'alpha' into colifran/agent-protocol-for-async-subagents - [`9395494`](https://github.com/langchain-ai/deepagentsjs/commit/9395494d7d1e4a7005cbe7eae51ff4b196baaca0) differentiate agent protocol ### 📊 Changes **5 files changed** (+57 additions, -25 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/thirty-steaks-see.md` (+5 -0) 📝 `examples/async-subagents/parallel-research/researcher.ts` (+4 -4) 📝 `libs/deepagents/src/agent.ts` (+2 -0) 📝 `libs/deepagents/src/middleware/async_subagents.ts` (+45 -21) 📝 `libs/deepagents/src/middleware/index.ts` (+1 -0) </details> ### 📄 Description ### Summary Broadens async subagent middleware to work with self-hosted Agent Protocol servers, not just LangGraph Platform. - **Docstrings**: Updated `AsyncSubAgent`, `AsyncTask`, `AsyncTaskStatus`, `ASYNC_TASK_SYSTEM_PROMPT`, and `createAsyncSubAgentMiddleware` to reference "Agent Protocol server" rather than "LangGraph server/deployment" - **`AsyncTaskStatus`**: Added `"pending"` to the union — both LangGraph Platform and self-hosted servers return this as the initial run state - **`ASYNC_TASK_TOOL_NAMES`**: Added exported constant and included in `BUILTIN_TOOL_NAMES` so user-provided tools that collide with async tool names (`start_async_task` etc.) surface a `ConfigurationError` - **Example fix**: Updated `parallel-research/researcher.ts` to use the renamed `createCompletionCallbackMiddleware` and `callbackGraphId` Note: This is mostly just documentation changes. --- <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:01 -04:00
yindo closed this issue 2026-06-05 17:23:01 -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#421