feat(runtimes): mastra subagent delegation demo with SUBAGENT_* injection in the bridge - #958
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… injection in the bridge Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…leted expanded body Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fourth PR of the runtime-subagents arc (adapter #955, Strands #956, MAF #957).
weather_forecastersub-agent via Mastra 1.63.2'sagentsconfig (the sub-agents system; the deprecated AgentNetwork path untouched).deployments/ag-ui-mastra/subagent-emitter.mjsis a pure per-run injector in our hand-written bridge's translation loop:agent--prefixedTOOL_CALL_START→SUBAGENT_STARTED(subagentRunId<tid>-sub, parentToolCallId = the LLM tool-call id, stable across all frames); the matchingTOOL_CALL_RESULT→ one attributedTEXT_MESSAGEcarrying the child's final text +SUBAGENT_FINISHED(SUBAGENT_ERRORon failure-shaped results); pending delegations swept exactly once at run terminals.tool-outputchunks — 82 in the capture) but@ag-ui/mastradrops them (case "tool-output": break), and the bridge buffers the whole delegation burst until it resolves, so the card mounts effectively complete. All measured and documented incockpit/runtimes/mastra/angular/docs/wire-capture-subagents.md(spike capture, post-emitter capture, browser verification + screenshot).Testing
node --test— 8 new injector tests: exact ordering field-for-field, error-result shapes, passthrough, unmatched result, terminal sweep idempotence).🤖 Generated with Claude Code