Skip to content

Conversation

@minorun365
Copy link
Contributor

@minorun365 minorun365 commented Jan 18, 2026

Summary

Add A2AClient class 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 auth
  • A2AClient.from_url() for local development without auth
  • send_task() synchronous API for sending tasks
  • send_task_streaming() streaming API for real-time responses
  • get_agent_card() for retrieving agent metadata
  • Utility functions: build_agentcore_url, extract_region_from_arn

Planned for follow-up PR

  • Async API (send_task_async(), get_agent_card_async(), send_task_streaming_async())

Usage

from strands.multiagent.a2a import A2AClient

# Connect to AgentCore Runtime (IAM auth via mcp-proxy-for-aws)
client = A2AClient.from_agentcore_arn(
    "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/my-agent"
)

# Synchronous API
result = client.send_task("Calculate 3 + 5")

# Streaming API
for chunk in client.send_task_streaming("Write an essay"):
    print(chunk, end="", flush=True)

# Local development (no auth)
local_client = A2AClient.from_url("http://localhost:9000")

Dependencies

  • Uses mcp-proxy-for-aws for SigV4 authentication (optional, only needed for AgentCore)

Test plan

  • 21 unit tests added (all passing)
  • ruff linting: passed
  • ruff formatting: passed

@minorun365 minorun365 force-pushed the feat/a2a-client-with-iam-auth branch from 03c84b7 to 290d123 Compare January 20, 2026 14:05
@github-actions github-actions bot added size/m and removed size/xl labels Jan 20, 2026
@minorun365 minorun365 changed the title feat(a2a): Add A2AClient with IAM authentication support feat(a2a): Add A2AClient with basic synchronous API Jan 20, 2026
@minorun365 minorun365 force-pushed the feat/a2a-client-with-iam-auth branch from 290d123 to a202256 Compare January 20, 2026 14:11
@github-actions github-actions bot removed the size/m label Jan 20, 2026
@minorun365 minorun365 changed the title feat(a2a): Add A2AClient with basic synchronous API feat(a2a): Add A2AClient with synchronous and streaming API Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant