feat(a2a): Add A2AClient with synchronous and streaming API #1510
+581
−2
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.
Summary
Add
A2AClientclass for communicating with remote A2A agents deployed on AWS Bedrock AgentCore Runtime.This PR provides an initial implementation with synchronous and streaming APIs. Async API will be added in a follow-up PR to keep the PR size manageable.
Features
A2AClient.from_agentcore_arn()for AgentCore Runtime connection with IAM authA2AClient.from_url()for local development without authsend_task()synchronous API for sending taskssend_task_streaming()streaming API for real-time responsesget_agent_card()for retrieving agent metadatabuild_agentcore_url,extract_region_from_arnPlanned for follow-up PR
send_task_async(),get_agent_card_async(),send_task_streaming_async())Usage
Dependencies
mcp-proxy-for-awsfor SigV4 authentication (optional, only needed for AgentCore)Test plan