API Overview¶
The A2A Registry provides APIs for agent registration and discovery, supporting multiple transport protocols as defined in the A2A Protocol Specification. This implementation follows A2A Protocol v0.3.0.
Supported Protocols¶
The A2A Registry implements multiple transport protocols to ensure maximum compatibility:
1. REST/HTTP+JSON¶
- Endpoint:
http://localhost:8000
(default) - Content-Type:
application/json
- Use Case: Web integrations, simple HTTP clients, testing
2. gRPC¶
- Endpoint:
localhost:50051
(default gRPC port) - Protocol: Protocol Buffers over HTTP/2
- Use Case: High-performance applications, typed clients, streaming
3. JSON-RPC 2.0 (Planned)¶
- Endpoint:
http://localhost:8000/rpc
- Content-Type:
application/json
- Use Case: RPC-style integrations, batch operations
Core Concepts¶
Agent Card¶
An Agent Card is a JSON metadata document that describes an agent's: - Identity (name, description, version) - Capabilities and skills - Service endpoints - Authentication requirements
Registry Metadata¶
Additional metadata maintained by the registry: - Registration timestamps - Health status and monitoring - Discovery preferences - Performance metrics
Common Operations¶
Registration Flow¶
- Register Agent: Submit agent card to registry
- Health Check: Registry periodically checks agent availability
- Discovery: Other agents can find this agent through search
- Update: Agent can update its card as needed
- Unregister: Remove agent when going offline
Discovery Flow¶
- Search: Query registry with search criteria
- Filter: Apply filters (region, capabilities, health)
- Select: Choose appropriate agent for task
- Connect: Use agent's endpoint to establish communication
Authentication & Security¶
Current Implementation¶
- No authentication required (development/testing)
- HTTP transport (can be upgraded to HTTPS)
Production Considerations¶
- Implement API key authentication
- Use HTTPS/TLS for all communication
- Add rate limiting and request validation
- Consider mutual TLS for gRPC
Error Handling¶
HTTP Status Codes (REST)¶
200 OK
: Successful operation201 Created
: Agent registered successfully400 Bad Request
: Invalid request data404 Not Found
: Agent not found500 Internal Server Error
: Server error
gRPC Status Codes¶
OK
: Successful operationINVALID_ARGUMENT
: Invalid request parametersNOT_FOUND
: Agent not foundALREADY_EXISTS
: Agent already registeredINTERNAL
: Server error
Rate Limits¶
Current implementation has no rate limiting. For production use, consider: - Per-IP rate limiting - Per-agent rate limiting - Burst allowances for batch operations
Next Steps¶
- Endpoints - Detailed API reference
- Examples - Code examples and tutorials
- Configuration - Server configuration options