The A2A Registry provides a multi-protocol API for agent registration, discovery, and management. This reference covers the primary interaction methods across JSON-RPC 2.0, REST, and GraphQL protocols.
- Development Mode: Open access, for local development
- Production Mode: Strict authentication and authorization
- JWT-based authentication
- Role-based access control (RBAC)
- Configurable trust levels for agent registration
- JWT Token
- API Key
- OAuth 2.0
{
"jsonrpc": "2.0",
"method": "register_agent",
"params": {
"agent_card": {
"name": "example-agent",
"description": "Agent description",
"version": "1.0.0",
"protocol_version": "0.3.0",
"preferred_transport": "JSONRPC",
"skills": [
{
"id": "skill_id",
"description": "Skill description"
}
]
}
},
"id": 1
}POST /api/v1/agents
Content-Type: application/json
{
"name": "example-agent",
...
}
mutation {
registerAgent(
agentCard: {
name: "example-agent"
# ... other fields
}
) {
id
name
registrationTimestamp
}
}- By skill
- By name/description
- By trust level
- By protocol version
{
"jsonrpc": "2.0",
"method": "search_agents",
"params": {
"skills": ["weather_forecast"],
"protocol_version": "0.3.0"
},
"id": 2
}query {
searchAgents(
skills: ["weather_forecast"]
protocolVersion: "0.3.0"
) {
agents {
name
skills {
id
description
}
}
}
}::: a2a_registry.server
::: a2a_registry.storage
::: a2a_registry.cli
- Configurable whitelist for agent extension URIs
- Trust level assignment for extensions
- Granular access control
# Example extension registration
extension = {
"uri": "https://example.com/agent-extension",
"trust_level": "high",
"allowed_skills": ["weather", "forecast"]
}
registry.register_extension(extension)AGENT_REGISTRATION_FAILED(1001)AGENT_NOT_FOUND(1002)UNAUTHORIZED_ACCESS(1003)INVALID_PROTOCOL_VERSION(1004)
{
"error": {
"code": 1001,
"message": "Agent registration failed",
"details": {
"reason": "Invalid agent card format"
}
}
}- Default rate limit: 100 requests/minute
- Configurable per API key
- Supports exponential backoff
/health: Overall system health/agents/health: Aggregate agent health/metrics: Prometheus-compatible metrics
# Example configuration
registry_config = {
"host": "0.0.0.0",
"port": 8000,
"log_level": "INFO",
"auth_mode": "production",
"trust_levels": {
"development": {"max_agents": 10},
"production": {"max_agents": 1000}
}
}- A2A Protocol: v0.3.0
- Python: 3.9+
- Supported Transports:
- JSON-RPC 2.0 (Primary)
- REST
- GraphQL
- gRPC (Experimental)
- Use JWT for authentication in production
- Implement agent health checks
- Validate agent cards before registration
- Use GraphQL for complex querying
- Implement proper error handling
- Official Python SDK
- Community-supported libraries for other languages
- Incorrect agent card format
- Authentication failures
- Protocol version mismatches
Refer to our Troubleshooting Guide for detailed resolution steps.