Agent Discovery
Methods for discovering A2A agent cards
Agent Discovery
Agent cards provide information about agents, and they can be discovered several ways.
A2A's discovery is based on modern web standards like JSON, HTTP, and OAuth. This allows a decentralized ecosystem with multiple actors, including agent developers, validators, registries, and agent hosting organizations.
Discovery Methods
Open Discovery
Individuals and organizations can publicly list and advertise their agent URLs:
These agent cards can be freely accessed by anyone with the URL. This can be suitable for agents that are meant to be used by the general public.
Curated Discovery
Organizations and communities may operate discovery networks or registries, which list and categorize agents that meet certain criteria. These registries can:
- Validate agents against security and quality standards
- Group agents by category, capabilities, or industry
- Provide search and recommendation functionality
- Offer ratings and reviews from users
Example of a registry endpoint:
Registries can implement various levels of curation:
- Open registries that accept all self-published agents
- Verified registries that validate basic functionality and security
- Premium registries with extensive testing and certification
Private Discovery
Organizations may operate private agent catalogs accessible only to authorized users. This is appropriate for:
- Enterprise environments with proprietary agents
- Internal tools and utilities
- Agents that handle sensitive data
Private discovery typically requires authentication:
Securing Agent Cards
When hosting agent cards, consider these security practices:
- HTTPS Only: Always serve agent cards over HTTPS
- Access Control: Use appropriate authentication for private agents
- Content Security: Set correct CORS headers to control which domains can access cards
- Versioning: Include version information in agent cards
- Immutable References: Consider using content-addressable references for immutable versions
- Digital Signatures: Sign agent cards to verify authenticity
Discovery Protocol
Clients can discover agent capabilities through:
- Direct Discovery: Access the agent card directly via its URL
- Registry Query: Query a registry for agents matching specific criteria
- Well-Known URI: Check for agent cards at standard locations like
.well-known/a2a-agents
Example of checking a well-known URI:
Agent Card Validation
Clients should validate agent cards by:
- Verifying the HTTPS certificate
- Checking for required fields
- Validating against the A2A agent card schema
- Ensuring the agent supports required capabilities
- Verifying any digital signatures
Implementation Examples
The A2A repository contains examples of agent discovery:
- Agent Registry - A simple TypeScript implementation of an agent registry
- Python Client Discovery - Code for discovering and validating agent cards