Skip to content

feat: implement server-side streaming for A2A messages and update client to handle SSE responses#1049

Merged
nan-yu merged 3 commits intogoogle:mainfrom
nan-yu:streaming-contact_multiple_surfaces
Apr 1, 2026
Merged

feat: implement server-side streaming for A2A messages and update client to handle SSE responses#1049
nan-yu merged 3 commits intogoogle:mainfrom
nan-yu:streaming-contact_multiple_surfaces

Conversation

@nan-yu
Copy link
Copy Markdown
Collaborator

@nan-yu nan-yu commented Apr 1, 2026

Description

non-streaming client with streaming agent

custom-components-example.non-streaming.webm

streaming client with streaming agent

custom-components-example.streaming.webm

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

@nan-yu nan-yu force-pushed the streaming-contact_multiple_surfaces branch from 337a7e8 to 684cf6b Compare April 1, 2026 20:40
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces streaming support for the custom components example, enabling incremental UI updates. Key changes include the integration of A2uiStreamParser in the Python agent, the implementation of SSE (Server-Sent Events) parsing in the TypeScript client, and middleware updates to handle text/event-stream responses. The UI now features a rendering indicator and processes message chunks as they arrive. Review feedback highlights a potential memory leak in the session parser cache, the need for more robust SSE line parsing, opportunities to reduce code duplication in message extraction logic, and improved error handling for active streams.

@nan-yu nan-yu merged commit 8eb94d9 into google:main Apr 1, 2026
10 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Apr 1, 2026
@nan-yu nan-yu deleted the streaming-contact_multiple_surfaces branch April 1, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants