You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document proposes a feature enhancement to Langflow that enables nested progress notifications in multi-agent workflows. This feature provides complete transparency into child agent operations by displaying their progress updates hierarchically within the parent agent's tool invocation, rather than as separate top-level messages.
Business Value:
Improved user experience in complex multi-agent workflows
Better debugging and monitoring capabilities for agent orchestration
Organizations can combine simple MCP tools with complex Langflow flow tools, guaranteeing operations happen in a particular way rather than relying entirely on agentic skills
Enhanced compliance and auditing capabilities for enterprise users
Problem Statement
Current Behavior: Lack of Agent-to-Agent Transparency
When a parent agent invokes a child agent as a tool in Langflow, users cannot see what the child agent is doing. The current implementation has several critical limitations:
1. Invisible Child Agent Operations
Parent agent shows "Called tool: CHILD_FLOW" with execution time
Child agent's internal steps are completely hidden from the user
No visibility into which tools the child agent invokes
No insight into the child agent's reasoning process
2. Flat Message Structure
All messages appear at the same level in the chat interface:
User: "What is the metadata for product ABC?"
├─ Parent Agent: Called tool GET_DATA_PRODUCTS (7.5s)
├─ 📊 Tool Progress: "What is the metadata..." ← Child notification (orphaned)
├─ 🔄 Agent Steps: "Processing request..." ← Child notification (orphaned)
├─ 🔨 Tool: get_metadata ← Child notification (orphaned)
├─ ✅ AI: "Here's the metadata..." ← Child notification (orphaned)
└─ Parent Agent: "Here's the metadata..."
Problems:
Child notifications appear as separate top-level messages
No visual connection between parent tool call and child operations
Difficult to understand which messages belong to which agent
Cluttered interface with orphaned progress messages
3. Poor User Experience in Complex Workflows
Users cannot trace execution flow in multi-agent systems
Debugging agent orchestration is difficult
No way to understand why a tool call took a long time
Enterprise users need transparency for compliance and auditing
Proposed Solution: Nested Progress Notifications
Visual Representation
Transform the flat message structure into a hierarchical, expandable view:
User: "What is the metadata for product ABC?"
└─ Parent Agent
└─ Called tool: GET_DATA_PRODUCTS [Expandable ▼] (7.5s)
├─ 📊 Tool Progress [Expandable ▼]
│ └─ "What is the metadata of data product ABC?"
│
├─ 🔄 Agent Steps [Expandable ▼]
│ └─ "Processing request to retrieve metadata..."
│
├─ 🔨 Tool Invocation [Expandable ▼]
│ ├─ Tool: get_metadata
│ └─ Input: {'data_product_id': 'ABC'}
│
└─ ✅ Final Answer [Expandable ▼]
└─ "Here's the metadata for data product ABC: ..."
Benefits:
✅ Clear parent-child relationship visualization
✅ Expandable/collapsible sections for progressive disclosure
✅ All child operations nested under parent tool call
✅ Clean, organized interface
✅ Easy to trace execution flow
NOTE: This section describles how this demonstration implementation works but it is not meant to be pushed as the actual final solution - only to act as an inspiration for an official solution
⚠️Important: This demonstration implementation has dependencies on unreleased or modified versions of external packages. Users attempting to run this demonstration must be aware of these requirements.
1. MCP-Proxy Modifications Required
Issue: The standard mcp-proxy package does not support the progress notification streaming required for this feature.
Temporary Solution: The implementation branch uses a locally modified version of mcp-proxy with necessary changes.
Update the commands in the affected Langflow files to point to their modified local mcp-proxy installation
Example:
# Instead of using the standard mcp-proxy command:# mcp-proxy --config config.json# Users must point to their locally modified version:# /path/to/local/mcp-proxy/mcp-proxy --config config.json
2. MCP SDK Main Branch Dependency
Issue: This implementation requires features from the unreleased MCP SDK version 2.0, which is currently only available on the main branch.
Current Configuration:
The pyproject.toml file has been modified to use the MCP SDK main branch:
Action Required for Users:
Users should be aware that:
This dependency points to an unstable, unreleased version
The main branch may have changed since this demonstration was created
Future updates to the main branch could break this implementation
Long-Term Solution:
This dependency is only needed until MCP SDK version 2.0 is officially released. Once released, the dependency should be updated to:
"mcp>=2.0.0,<3.0.0"
3. Recommended Setup Process
For users who want to test this demonstration:
Clone the feature branch:
git clone https://github.com/stevehaertel/langflow.git
cd langflow
git checkout feature/mcp-sdk-main-branch-migration
Set up modified mcp-proxy:
# Clone mcp-proxy repository
git clone https://github.com/sparfenyuk/mcp-proxy.git
cd mcp-proxy
# Apply changes from PR #189# (Follow instructions in the PR)# Note the path to your modified mcp-proxy
Update Langflow configuration:
Edit config_utils.py, mcp_projects.py, and projects.py
Update mcp-proxy command paths to point to your local installation
Install Langflow dependencies:
cd /path/to/langflow
pip install -e src/backend/base
The nested progress notifications feature transforms Langflow's multi-agent experience by providing complete transparency into child agent operations. This enhancement addresses a critical gap in agent-to-agent visibility, making complex workflows easier to understand, debug, and trust.
This document proposes a feature enhancement to Langflow that enables nested progress notifications in multi-agent workflows. This feature provides complete transparency into child agent operations by displaying their progress updates hierarchically within the parent agent's tool invocation, rather than as separate top-level messages.
Business Value:
Improved user experience in complex multi-agent workflows
Better debugging and monitoring capabilities for agent orchestration
Organizations can combine simple MCP tools with complex Langflow flow tools, guaranteeing operations happen in a particular way rather than relying entirely on agentic skills
Enhanced compliance and auditing capabilities for enterprise users
Problem Statement
Current Behavior: Lack of Agent-to-Agent Transparency
When a parent agent invokes a child agent as a tool in Langflow, users cannot see what the child agent is doing. The current implementation has several critical limitations:
1. Invisible Child Agent Operations
Parent agent shows "Called tool: CHILD_FLOW" with execution time
Child agent's internal steps are completely hidden from the user
No visibility into which tools the child agent invokes
No insight into the child agent's reasoning process
2. Flat Message Structure
All messages appear at the same level in the chat interface:
User: "What is the metadata for product ABC?"
├─ Parent Agent: Called tool GET_DATA_PRODUCTS (7.5s)
├─ 📊 Tool Progress: "What is the metadata..." ← Child notification (orphaned)
├─ 🔄 Agent Steps: "Processing request..." ← Child notification (orphaned)
├─ 🔨 Tool: get_metadata ← Child notification (orphaned)
├─ ✅ AI: "Here's the metadata..." ← Child notification (orphaned)
└─ Parent Agent: "Here's the metadata..."
Problems:
Child notifications appear as separate top-level messages
No visual connection between parent tool call and child operations
Difficult to understand which messages belong to which agent
Cluttered interface with orphaned progress messages
3. Poor User Experience in Complex Workflows
Users cannot trace execution flow in multi-agent systems
Debugging agent orchestration is difficult
No way to understand why a tool call took a long time
Enterprise users need transparency for compliance and auditing
Feature Request
Feature Enhancement Request: Nested Progress Notifications for Agent-to-Agent Transparency
Status: Demonstration created
Category: User Experience, Multi-Agent Systems
Implementation Branch: feature/mcp-sdk-main-branch-migration
Compare with Main: View all changes
Executive Summary
This document proposes a feature enhancement to Langflow that enables nested progress notifications in multi-agent workflows. This feature provides complete transparency into child agent operations by displaying their progress updates hierarchically within the parent agent's tool invocation, rather than as separate top-level messages.
Business Value:
Problem Statement
Current Behavior: Lack of Agent-to-Agent Transparency
When a parent agent invokes a child agent as a tool in Langflow, users cannot see what the child agent is doing. The current implementation has several critical limitations:
1. Invisible Child Agent Operations
2. Flat Message Structure
All messages appear at the same level in the chat interface:
Problems:
3. Poor User Experience in Complex Workflows
Proposed Solution: Nested Progress Notifications
Visual Representation
Transform the flat message structure into a hierarchical, expandable view:
Benefits:
NOTE: This section describles how this demonstration implementation works but it is not meant to be pushed as the actual final solution - only to act as an inspiration for an official solution
Implementation Overview
A complete working implementation has been developed and is available in the feature/mcp-sdk-main-branch-migration branch.
Setup Requirements
1. MCP-Proxy Modifications Required
Issue: The standard
mcp-proxypackage does not support the progress notification streaming required for this feature.Temporary Solution: The implementation branch uses a locally modified version of
mcp-proxywith necessary changes.Affected Files:
src/backend/base/langflow/api/utils/mcp/config_utils.pysrc/backend/base/langflow/api/v1/mcp_projects.pysrc/backend/base/langflow/api/v1/projects.pyThese files contain commands to run
mcp-proxy, but the commands have been temporarily modified to point to a local version.Official Fix: A pull request has been submitted to the official mcp-proxy repository:
Action Required for Users:
Until PR #189 is merged into the official mcp-proxy repository, users must:
Example:
2. MCP SDK Main Branch Dependency
Issue: This implementation requires features from the unreleased MCP SDK version 2.0, which is currently only available on the main branch.
Current Configuration:
The
pyproject.tomlfile has been modified to use the MCP SDK main branch:"mcp @ git+https://github.com/modelcontextprotocol/python-sdk.git@main"Risks:
Action Required for Users:
Users should be aware that:
Long-Term Solution:
This dependency is only needed until MCP SDK version 2.0 is officially released. Once released, the dependency should be updated to:
"mcp>=2.0.0,<3.0.0"3. Recommended Setup Process
For users who want to test this demonstration:
Clone the feature branch:
git clone https://github.com/stevehaertel/langflow.git cd langflow git checkout feature/mcp-sdk-main-branch-migrationSet up modified mcp-proxy:
Update Langflow configuration:
config_utils.py,mcp_projects.py, andprojects.pyInstall Langflow dependencies:
cd /path/to/langflow pip install -e src/backend/baseEnable the feature:
export LANGFLOW_MCP_SERVER_STREAM_MESSAGES_IN_PROGRESS=trueRun database migration:
4. Production Considerations
This demonstration is NOT production-ready due to:
For production deployment, the Langflow team should:
Backend Implementation
The backend implementation spans multiple functional areas to enable nested progress notifications:
1. Database Schema Extensions
Purpose: Support parent-child message relationships and nested content blocks
Changes:
parent_message_idandtool_call_idfields to track parent-child relationshipsnested_blocksfield for recursive nestingnesting_depthandblock_typefields for UI rendering and classificationImpact: Messages can now form hierarchical structures, and content blocks can contain nested child blocks
Files Modified:
2. MCP Protocol Integration
Purpose: Enable progress notification streaming from child flows to parent flows via MCP protocol
Changes:
progress_callbackparameter to MCP client implementations (stdio and HTTP/SSE)progressTokenvia meta parameter to MCP SDK(ctx, params)with ServerRequestContextImpact: Child flows running as MCP tools can now stream progress messages back to parent flows in real-time
Files Modified:
3. Agent Message Routing System
Purpose: Intelligently route child agent notifications to parent message's nested structure
Changes:
Impact: Child agent progress appears nested under parent's tool call in real-time, with proper classification and no duplicates
Files Modified:
4. Message Persistence & Caching
Purpose: Efficiently persist nested blocks and prevent data loss during concurrent updates
Changes:
Impact: Nested blocks are reliably persisted to database and survive concurrent updates from streaming events
Files Modified:
5. Component Integration
Purpose: Connect all pieces together for seamless nested notification flow
Changes:
Impact: Complete end-to-end flow from child agent → MCP protocol → parent agent → nested UI display
Files Modified:
6. Feature Flag Control
Purpose: Enable safe rollout with ability to disable feature if issues arise
Changes:
LANGFLOW_MCP_SERVER_STREAM_MESSAGES_IN_PROGRESSImpact: Feature can be gradually rolled out and easily disabled if needed
Files Modified:
Key Backend Features
Message Type Detection
Automatically classifies progress notifications based on content patterns:
Smart Message Updates
Nested Block Hierarchy
Real-Time Streaming
Deduplication Logic
Testing & Validation
Test Scenario: Parent-Child Agent Flow
Setup:
Expected Result:
Actual Result: ✅ All nested blocks render correctly with proper hierarchy
Implementation Details
For complete implementation details, please refer to the feature branch which contains:
Compare with Main: View all changes
Conclusion
The nested progress notifications feature transforms Langflow's multi-agent experience by providing complete transparency into child agent operations. This enhancement addresses a critical gap in agent-to-agent visibility, making complex workflows easier to understand, debug, and trust.
Links
Motivation
Executive Summary
This document proposes a feature enhancement to Langflow that enables nested progress notifications in multi-agent workflows. This feature provides complete transparency into child agent operations by displaying their progress updates hierarchically within the parent agent's tool invocation, rather than as separate top-level messages.
Business Value:
Problem Statement
Current Behavior: Lack of Agent-to-Agent Transparency
When a parent agent invokes a child agent as a tool in Langflow, users cannot see what the child agent is doing. The current implementation has several critical limitations:
1. Invisible Child Agent Operations
2. Flat Message Structure
All messages appear at the same level in the chat interface:
Problems:
3. Poor User Experience in Complex Workflows
Your Contribution
No response