Principle:A2aproject A2a java Agent Card Advertisement
| Knowledge Sources | |
|---|---|
| Domains | Distributed_Systems, Service_Discovery |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
A service discovery mechanism where agents publish self-describing capability manifests that clients fetch to learn how to interact with them.
Description
Agent Card Advertisement is the A2A Protocol's approach to agent discovery. Rather than requiring out-of-band configuration or a centralized registry, each A2A agent exposes a JSON manifest at a well-known endpoint (`.well-known/agent-card.json`). This manifest — the AgentCard — contains the agent's identity, capabilities, supported transport protocols, skills, and security requirements.
The problem this solves is the bootstrapping problem in agent-to-agent communication: before a client can send a message to an agent, it must know what the agent can do, which transport protocols it speaks, whether streaming is supported, and what authentication is required. The AgentCard provides all of this in a standardized, machine-readable format.
In the broader landscape, this is an instance of the well-known URI pattern (RFC 5785) combined with capability-based service advertisement. It parallels OpenAPI/Swagger specifications for REST APIs, but is tailored for autonomous agent communication: skills, streaming capabilities, and push notification support are first-class citizens.
Usage
Use this principle when:
- Building an A2A-compatible agent server — you must produce and expose an AgentCard
- Building an A2A client — you must fetch and parse the AgentCard before constructing a client
- Designing multi-tenant agent deployments — tenant-specific card paths enable per-tenant capability advertisement
- Selecting transport protocols — the AgentCard's `supportedInterfaces` list is the negotiation surface
Theoretical Basis
The AgentCard advertisement follows the capability advertisement pattern:
Agent → publishes AgentCard at /.well-known/agent-card.json
Client → GET /.well-known/agent-card.json → AgentCard
Client → reads supportedInterfaces, capabilities, skills
Client → selects transport protocol and constructs Client
The AgentCard record is an immutable data structure with required and optional fields:
AgentCard = {
name: String // agent identity (required)
description: String // what the agent does (required)
version: String // implementation version (required)
capabilities: { // feature flags (required)
streaming: bool
pushNotifications: bool
stateTransitionHistory: bool
}
supportedInterfaces: [ // transport endpoints, ordered by preference (required)
{ protocol: "JSONRPC", url: "http://..." }
{ protocol: "GRPC", url: "localhost:9000" }
]
skills: [Skill] // what the agent can do (required)
securitySchemes: { ... } // auth methods (optional)
}
The first entry in `supportedInterfaces` is the agent's preferred transport. Clients that don't override this preference will use the server's order.
Practical Guide
To advertise an agent:
- Build an `AgentCard` using the Builder pattern with name, description, version, capabilities, skills, and supportedInterfaces
- Expose it as a CDI bean qualified with `@PublicAgentCard` in a Quarkus application
- The framework automatically serves it at `/.well-known/agent-card.json`
To discover an agent:
- Use `A2A.getAgentCard(agentUrl)` or `A2ACardResolver` to fetch the card from the well-known endpoint
- Inspect `supportedInterfaces` to determine available transports
- Inspect `capabilities` to determine streaming/push-notification support
Related Pages
Implemented By
- Implementation:A2aproject_A2a_java_AgentCard_Builder
- Implementation:A2aproject_A2a_java_A2ACardResolver
- Implementation:A2aproject_A2a_java_A2A_Utils
- Implementation:A2aproject_A2a_java_TransportProtocol
- Implementation:A2aproject_A2a_java_AgentCard_Validation_Resolution
- Implementation:A2aproject_A2a_java_Server_Multitenancy_and_Transport_SPI