Replies: 1 comment
-
|
is there any update to this topic. is subagent tool tracking possible? i found now solution so far |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request: Add Subgraph Streaming Support to React useStream Hook
Summary
Add support for subgraph streaming in the
useStreamReact hook from@langchain/langgraph-sdk/reactto enable streaming events from both main graphs and nested subgraphs.Current Behavior
The React
useStreamhook currently only streams events from the main graph. While the underlying SDK supports subgraph streaming via thestreamSubgraphsparameter in the client API, this functionality is not exposed through the React hook interface.Desired Behavior
Enable subgraph streaming directly through the
useStreamhook configuration:Use Case
When working with complex multi-agent systems that use nested subgraphs, developers need visibility into streaming events from all graph levels. This is particularly important for:
Current Workaround
Developers must abandon the convenient React hook and implement custom streaming logic using the underlying client API, which loses the benefits of:
Technical Implementation Suggestions
Option 1: Add to UseStreamOptions interface
Option 2: Add to SubmitOptions interface
Option 3: Support both approaches
Allow configuration at both the hook level (default behavior) and submit level (per-request override).
Event Handling
When subgraph streaming is enabled, events should follow the existing pattern with namespaced event names:
Related Documentation
Environment
@langchain/langgraph-sdkAdditional Context
The underlying infrastructure already supports subgraph streaming as evidenced by:
TypedAsyncGenerator<TStreamMode, TSubgraphs>type parameterSubgraphValuesStreamEvent,SubgraphUpdatesStreamEventtypesAsSubgraph<TEvent>event transformation utilitiesstreamSubgraphsparameter supportThis feature request is to expose this existing functionality through the React hook interface for better developer experience and consistency.
Acceptance Criteria
useStreamhook accepts asubgraphsorstreamSubgraphsboolean optionBeta Was this translation helpful? Give feedback.
All reactions