feat: surface team member activity in AG-UI via ACTIVITY_SNAPSHOT - #9253
feat: surface team member activity in AG-UI via ACTIVITY_SNAPSHOT#9253ProgrammerPlus1998 wants to merge 2 commits into
Conversation
048504c to
abe6fcb
Compare
|
any news to merge this? |
abe6fcb to
15e0f6b
Compare
Team runs streamed through AG-UI previously folded every member's output into a single assistant message (prefixed "Team member: "), so clients could not tell which member produced what. Member chunks now emit AG-UI ACTIVITY_SNAPSHOT events (activity_type "agno.team_member") keyed by a stable per-member message_id, carrying agentId/agentName/runId/parentRunId, a status lifecycle (running -> tool_calling -> completed), currentTool, and accumulated member text. The leader's own output continues to stream as TEXT_MESSAGE_*; member text is no longer folded into it. - StreamState: per-member message_id + snapshot content tracking - handlers: _is_member_chunk discriminator (agent event with parent_run_id), member run_content/tool_call/content_completed -> ACTIVITY_SNAPSHOT - remove member_responses folding and "Team member: " prefix - cookbook research_team example + TEST_LOG updated Validated with unit tests, a mocked-model harness, and a real OpenAI-compatible model run through the full AG-UI pipeline. Fixes agno-agi#9243
The member branch bound the member snapshot dict to `content`, which the non-member path later reassigns to a JSON string, tripping a mypy assignment-type error after the rebase onto latest main.
6b92b1f to
4a795db
Compare
|
Hi @kausmeows @ysolanky — rebased onto v3.0.0. The bundled ag-ui-protocol already supports Ready for review, thanks! |
|
any news for a timeline? |
|
Hi, I saw that 3.0.1 has been released, but #9253 is not included. Is there anything still blocking the merge, or is the fix planned for a future release? Just trying to understand the expected timeline. Thanks! |
|
I suspect the developers still have some P0 issues caused by major version changes to fix, and haven't had time to address these functional problems yet. You can ask the developers for help. |
|
Hi @kausmeows @ysolanky, just following up on #9253. Since 3.0.2, 3.0.3, 3.04 and 3.0.5 have now been released and #9253 is still not included, is there any specific blocker preventing the review/merge? The fix is still relevant for us because we need to preserve the Team member identity in the AG-UI stream. Thanks! |
Summary
Team runs streamed through AG-UI previously folded every member's output into a single assistant message (with a
"Team member: "prefix), so clients could not tell which member produced which content — see #9243.This change surfaces each team member's live progress through AG-UI's native Activity channel instead of flattening:
ACTIVITY_SNAPSHOTevents (activity_type: "agno.team_member"), keyed by a stable per-membermessage_id.agentId,agentName,runId,parentRunId, a status lifecycle (running → tool_calling → completed),currentTool, and the member's accumulated text.TEXT_MESSAGE_*; member text is no longer folded into the leader's message.stream_member_events=True). Hiding member output is still controlled upstream viastream_member_events=False.Fixes #9243
Why Activity instead of separate text messages
AG-UI's
ACTIVITY_*events are the protocol-native mechanism for "what each agent is doing" as a side-channel, decoupled from the main chat bubbles. Each member gets an addressablemessage_id, so interleaved/parallel member execution (nested teams) can't corrupt a single shared message — the failure mode a "one text message per member" approach has on frontends that assume a single active text bubble.Implementation
StreamState: per-membermessage_id+ mutable snapshot content tracking (get_or_create_member).handlers:_is_member_chunk()discriminator (agent-level event with non-Noneparent_run_id, set by team delegation); memberrun_content/tool_call_started/tool_call_completed/run_content_completed→ACTIVITY_SNAPSHOT; leader path unchanged.member_responsesfolding and the"Team member: "prefix from_extract_team_response_chunk_content.Type of change
Checklist
./scripts/format.shand./scripts/validate.sh)Additional Notes
Validation performed:
run_entity→ event translation): member chunks produce per-memberACTIVITY_SNAPSHOTs reachingstatus="completed"; member text never appears in leaderTEXT_MESSAGE_CONTENT; leader final summary appears only in the leader message. Confirmed with both a mocked model and a real model, including a member that calls a tool (observedtool_callingsnapshots).