Skip to content

Commit c0c97b4

Browse files
committed
fix: default streamSubgraphs to true in LangGraph agent wrapper
The @ag-ui/langgraph 0.0.31+ changed the default for streamSubgraphs from true to undefined, breaking subagent streaming. This enriches the run() input's forwardedProps with streamSubgraphs: true as a default, while preserving any explicit user override via the nullish coalescing operator.
1 parent 3007cff commit c0c97b4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • packages/runtime/src/lib/runtime/agent-integrations/langgraph

packages/runtime/src/lib/runtime/agent-integrations/langgraph/agent.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,14 @@ export class LangGraphAgent extends AGUILangGraphAgent {
154154

155155
// @ts-ignore
156156
run(input: RunAgentInput): Observable<BaseEvent> {
157-
return super.run(input).pipe(
157+
const enrichedInput = {
158+
...input,
159+
forwardedProps: {
160+
...input.forwardedProps,
161+
streamSubgraphs: input.forwardedProps?.streamSubgraphs ?? true,
162+
},
163+
};
164+
return super.run(enrichedInput).pipe(
158165
map((processedEvent) => {
159166
// Turn raw event into emit state snapshot from tool call event
160167
if (processedEvent.type === EventType.RAW) {

0 commit comments

Comments
 (0)