Skip to content

feat(ag-ui): multi-message subagent cards (full transcript)#692

Merged
blove merged 10 commits into
mainfrom
feat/ag-ui-multi-message-subagent-cards
Jun 18, 2026
Merged

feat(ag-ui): multi-message subagent cards (full transcript)#692
blove merged 10 commits into
mainfrom
feat/ag-ui-multi-message-subagent-cards

Conversation

@blove

@blove blove commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

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).

  • libs/chat: additive optional Subagent.toolCalls?: Signal<ToolCall[]> (neutral Message unchanged — it already has role:'tool'/toolCallId/toolCallIds/reasoning).
  • libs/ag-ui: to-agent.ts projects content.messages → Message[] and content.toolCalls → ToolCall[], with a text back-compat fallback so the shipped single-text emitter (cockpit ag-ui/subagents) keeps working.
  • chat-subagent-card: hybrid renderer — ordered transcript (track m.id) with reasoning + markdown text, delegating each tool call to the existing ChatToolCallCardComponent.
  • examples/ag-ui python: the research subagent became a reason→tool→answer loop (offline deterministic lookup tool, capped) emitting structured message_start/message/tool_call/tool_result phases; a pure transform turns them into the DELTAs.

Tests

  • ag-ui projection (messages[]+toolCalls[] + text back-compat); chat-subagent-card transcript + reasoning + tool-call card; python transform phase-builders; an in-process emission test asserting the message_start → tool_call → tool_result → message_start sequence; and the examples/ag-ui e2e asserting the subagent settles with messageCount ≥ 2 and a lookup tool call carrying its result (durable agent.subagents() assertions, robust under aimock replay).
  • Gates green: chat+ag-ui lint/test, nx build chat, examples/ag-ui e2e (21/21), python (23). api-docs regenerated for Subagent.toolCalls.

Out of scope

Cockpit ag-ui/subagents intentionally not migrated (validates the back-compat text path). 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

blove and others added 9 commits June 18, 2026 13:34
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>
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jun 18, 2026 9:47pm

Request Review

@blove blove enabled auto-merge (squash) June 18, 2026 21:40
@blove blove merged commit 05cd321 into main Jun 18, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant