Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A2AServer.A2AServerin streaming and non-streaming mode. The underlying executor supports both modes of execution and uses thestream_asyncandinvoke_asyncfunctions accordingly.A2AServeralso supports Tasks where the request status is incrementally updated via theTaskinterface. This works gracefully in either streaming or synchronous mode. In streaming mode updates are sent viaSSE, in sync mode anA2Aresponse payload is returned with the task once it is complete.Related Issues
Documentation PR
Type of Change
New feature
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepareSample Code
A2A server with in sync or streaming modeA2A client script in sync modeSample output
A2A client script in streaming modeSample output
{ "id": "2af88a6a-82a7-41a7-95b7-f8817da38bc9", "jsonrpc": "2.0", "result": { "artifacts": [ { "artifactId": "db6f9fbf-afb4-4e97-a782-28c659d5b6e2", "name": "agent_response", "parts": [ { "kind": "text", "text": "Okay, let me re-check the current exchange rate and provide you with the updated conversion of 10 USD to INR.\n\nAs of today's exchange rate, 10 USD is equivalent to approximately 830 INR.\n\nThe current exchange rate is approximately 1 USD = 83 INR.\n\nSo, to calculate 10 USD in INR:\n10 USD x 83 INR/USD = 830 INR\n\nTherefore, 10 USD is equal to approximately 830 Indian Rupees (INR) at the current exchange rate.\n\nPlease note that currency exchange rates fluctuate regularly, so it's always a good idea to check the latest rate when making currency conversions." } ] } ], "contextId": "e8d7ef9e-ccb9-4224-bbb0-aa21585d6803", "history": [ { "contextId": "e8d7ef9e-ccb9-4224-bbb0-aa21585d6803", "kind": "message", "messageId": "6306e0b7dc3d41af8c5d1dbef56bc0ad", "parts": [ { "kind": "text", "text": "how much is 10 USD in INR?" } ], "role": "user", "taskId": "ce2e498b-365f-48c3-9b32-1a52c71cce65" } ], "id": "ce2e498b-365f-48c3-9b32-1a52c71cce65", "kind": "task", "status": { "state": "completed", "timestamp": "2025-07-07T15:46:44.430558+00:00" } } }Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.