Skip to content

Streaming restaurant sample#918

Open
nan-yu wants to merge 2 commits intogoogle:mainfrom
nan-yu:streaming-restaurant-sample
Open

Streaming restaurant sample#918
nan-yu wants to merge 2 commits intogoogle:mainfrom
nan-yu:streaming-restaurant-sample

Conversation

@nan-yu
Copy link
Collaborator

@nan-yu nan-yu commented Mar 20, 2026

Description

Add streaming support for the restaurant finder sample.

This depends on changes in PR #905.

Demo:

streaming.demo.restaurant.finder.webm

Pre-launch Checklist

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

const lines = buffer.split('\n\n');
buffer = lines.pop() || '';

for (const line of lines) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems like a reasonable amount of boilerplate. It seems like one of the issues is that this client needs to speak "A2A" to an A2A server, but it isn't using the client library for A2A, so there's quite a lot of manual request handling and stream processing. I was hoping that on the client side it should be quite simple to just take A2UI data chunks and propagate them to the message processor. All the heavy stream processing has already been accomplished on the server side.

I filed #966 with some ideas on how to refactor this, but I think it makes sense to submit all your changes seeing as they work, and then we can look at refactoring to reduce boilerplate. WDYT?

nan-yu added 2 commits March 25, 2026 19:34
By default, the Angular client uses the non-streaming API to communicate
with the agent. To enable streaming, set the `ENABLE_STREAMIING` env var
to `true.

```bash
export ENABLE_STREAMING=true
npm start -- restaurant
```
@nan-yu nan-yu force-pushed the streaming-restaurant-sample branch from 3a8764c to 8b7ebd0 Compare March 25, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants