Replies: 1 comment
-
|
Typically the main agent would receive events one a time from agent_a by iterating over the result from send_message(): Within that async loop you can examine the chunk and stream an appropriate event to the browser, typically via Server Sent Events (or possibly a WebSocket). It is of course up to you to define the communication protocol between the main agent and the browser. I wouldn't recommend it, but if you want to use the A2A protocol between the main agent and the browser then you would probably need to convert each chunk into an appropriate call to TaskUpdater.update_status(). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In our project, assuming the Q&A chain is: user/browser ==> main agent ==a2a==> agent_a + agent_b, the output from agent_a or agent_b is often not plain text, but rather SSE-formatted streaming output similar to the following data, where the browser renders the response results according to an agreed-upon format:
For example, if the above data is the response from agent_a, how should this be handled when returning from agent_a to the main agent through the A2A protocol, so that the main agent can forward it back to the browser in the same format?
Beta Was this translation helpful? Give feedback.
All reactions