diff --git a/examples/helloworld/__main__.py b/examples/helloworld/__main__.py index ac6cca7d..abf8fbdf 100644 --- a/examples/helloworld/__main__.py +++ b/examples/helloworld/__main__.py @@ -27,7 +27,9 @@ version='1.0.0', defaultInputModes=['text'], defaultOutputModes=['text'], - capabilities=AgentCapabilities(), + capabilities=AgentCapabilities( + streaming=True, # enable streaming mode + ), skills=[skill], authentication=AgentAuthentication(schemes=['public']), ) diff --git a/examples/helloworld/test_client.py b/examples/helloworld/test_client.py index 0ade8d2a..2de745aa 100644 --- a/examples/helloworld/test_client.py +++ b/examples/helloworld/test_client.py @@ -34,6 +34,7 @@ async def main() -> None: params=MessageSendParams(**send_message_payload) ) + # if you want to stream the response, please make sure to set streaming=True in the agent card (__main__.py) stream_response = client.send_message_streaming(streaming_request) async for chunk in stream_response: print(chunk.model_dump(mode='json', exclude_none=True))