Stream order issue in nested agent via tool call
Above example works when agent stream chat realtime, but once chat completes and we reopen it then, we see two seperate assistant message for parent + this subagent calls.
It should show a single assistant message instead of two after persitance.
3 Replies
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8501
GitHub
[DISCORD:1424123959573614642] Stream order issue in nested agent vi...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1424123959573614642 execute: async ({ context, runtimeContext }) => { const messageId = runtimeContext....
Hey there and thanks for rising the issue 🙂 . How do you define your writer in your code?
@fracheton Thanks for reply
added a full code example here: https://github.com/mastra-ai/mastra/issues/8501#issuecomment-3423661493
discord doesn't like large code example I guess
Is there a better of doing this
my end goal is a main agent -> 5 subagents, where main agent can call all subagents using their trigger tool calls and I need to stream entire subagents stream to client side but processed summary to main agent.
I know this might not be the best way mastra recommend this pattern, but I tried mastra networks with latest release and it doesn't stream tool calls and some text delta on first stream.