[PR #3940] [MERGED] docs(middleware): LangGraph workflow composition section #3949

Closed
opened 2026-06-05 18:53:41 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3940
Author: @mdrxy
Created: 5/10/2026
Status: Merged
Merged: 5/12/2026
Merged by: @mdrxy

Base: mainHead: mdrxcy/lg-midd


📝 Commits (3)

  • 77ebadd docs(middleware): LangGraph workflow composition section
  • ac9bbfd cr
  • 4c7e38b docs(middleware): switch composition example to AgentState

📊 Changes

1 file changed (+56 additions, -0 deletions)

View changed files

📝 src/oss/langchain/middleware/overview.mdx (+56 -0)

📄 Description

Added a new section to the middleware overview explaining that create_agent returns a compiled LangGraph, which means an agent configured with middleware can be dropped into a larger StateGraph as a node or subgraph. Includes Python and TypeScript examples showing how to compose an agent with HITL and other middleware alongside classification and routing steps.

Changes

  • Document agent reuse in larger LangGraph topologies — new section on src/oss/langchain/middleware/overview.mdx clarifies that middleware hooks (HITL, retries, PII redaction, etc.) continue to run when the agent is used as a subgraph node, and points readers to the subgraph composition guide.

🔄 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/docs/pull/3940 **Author:** [@mdrxy](https://github.com/mdrxy) **Created:** 5/10/2026 **Status:** ✅ Merged **Merged:** 5/12/2026 **Merged by:** [@mdrxy](https://github.com/mdrxy) **Base:** `main` ← **Head:** `mdrxcy/lg-midd` --- ### 📝 Commits (3) - [`77ebadd`](https://github.com/langchain-ai/docs/commit/77ebadd9ef141e1979ae16dbe858046ae1c07f6c) docs(middleware): LangGraph workflow composition section - [`ac9bbfd`](https://github.com/langchain-ai/docs/commit/ac9bbfd5e32cfd001357030b61fe8f239ed41d59) cr - [`4c7e38b`](https://github.com/langchain-ai/docs/commit/4c7e38bab120b829d231d68fe3867aaa5887cc73) docs(middleware): switch composition example to AgentState ### 📊 Changes **1 file changed** (+56 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/langchain/middleware/overview.mdx` (+56 -0) </details> ### 📄 Description Added a new section to the middleware overview explaining that `create_agent` returns a compiled LangGraph, which means an agent configured with middleware can be dropped into a larger `StateGraph` as a node or subgraph. Includes Python and TypeScript examples showing how to compose an agent with HITL and other middleware alongside classification and routing steps. ## Changes - **Document agent reuse in larger LangGraph topologies** — new section on `src/oss/langchain/middleware/overview.mdx` clarifies that middleware hooks (HITL, retries, PII redaction, etc.) continue to run when the agent is used as a subgraph node, and points readers to the subgraph composition guide. --- <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 18:53:41 -04:00
yindo closed this issue 2026-06-05 18:53:41 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3949