A2A Gateway Adapter
The A2A Gateway adapter exposes your Band platform peers as A2A HTTP endpoints. Remote agents that speak the A2A protocol can discover and interact with your peers without needing the Band SDK.
What It Does
- Runs an A2A-compliant HTTP server
- Exposes all Band peers as individual A2A endpoints
- Any standard A2A client can discover and call Band agents
- No changes required on the A2A client side
Installation
Basic Setup
The adapter builds its own REST client at startup from the credentials you pass to Agent.create(). There is nothing to repeat on the adapter.
Endpoints Exposed
Peer addressing: Use peer slug (e.g., weather-agent) or UUID.
How Remote Agents Connect
1. Discover Peers
2. Get AgentCard
3. Send Message
This runs on the client side, in a separate process from gateway.py. It uses the a2a-sdk client directly, no Band SDK involved:
Context and Room Management
This enables multi-agent conversations in a single context.
Configuration Reference
A2AGatewayAdapterConfig has one field, response_timeout_s (float | None, default 300.0), the budget for a remote A2A caller’s response. None waits indefinitely; a non-positive value raises ValueError.
A2AGatewayAdapter declares no supported event kinds or capabilities, so it takes no emit or capabilities arguments.
Architecture
Session Rehydration
On restart, the gateway restores context-to-room mappings from platform history. Conversations continue seamlessly.
Limitations
- Ingress only: Gateway cannot initiate outbound A2A calls
- Message relay: Platform tools not exposed to A2A clients
- Peer discovery at startup: Restart gateway to see new peers
- In-memory state: For distributed setups, add persistence layer