feat(ag-ui): multi-message subagent cards (full transcript)#692
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ith text back-compat Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s tool-call card) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ranscript phases Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tructured transcript emission Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… transcript Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Subagent cards over AG-UI now render a full live transcript — multiple assistant turns + reasoning + tool calls (with results) — instead of a single accumulating text blob.
How (Approach 1 — fat activity content)
One ACTIVITY per subagent carries the transcript as
content.messages[]+content.toolCalls[], streamed via JSON-Patch DELTAs. The L1 reducer is untouched (it already applies arbitrary ACTIVITY patches).Subagent.toolCalls?: Signal<ToolCall[]>(neutralMessageunchanged — it already hasrole:'tool'/toolCallId/toolCallIds/reasoning).to-agent.tsprojectscontent.messages → Message[]andcontent.toolCalls → ToolCall[], with atextback-compat fallback so the shipped single-text emitter (cockpitag-ui/subagents) keeps working.track m.id) with reasoning + markdown text, delegating each tool call to the existingChatToolCallCardComponent.lookuptool, capped) emitting structuredmessage_start/message/tool_call/tool_resultphases; a pure transform turns them into the DELTAs.Tests
message_start → tool_call → tool_result → message_startsequence; and the examples/ag-ui e2e asserting the subagent settles withmessageCount ≥ 2and alookuptool call carrying its result (durableagent.subagents()assertions, robust under aimock replay).chat+ag-uilint/test,nx build chat, examples/ag-ui e2e (21/21), python (23). api-docs regenerated forSubagent.toolCalls.Out of scope
Cockpit
ag-ui/subagentsintentionally not migrated (validates the back-compattextpath). Two latent reducer/projection robustness items flagged in review are spun off to a separate follow-up.Design spec + plan:
docs/superpowers/specs/2026-06-18-ag-ui-multi-message-subagent-cards-design.md,docs/superpowers/plans/2026-06-18-ag-ui-multi-message-subagent-cards.md.🤖 Generated with Claude Code