Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:A2aproject A2a java Agent Card Advertisement

From Leeroopedia
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:

  1. Build an `AgentCard` using the Builder pattern with name, description, version, capabilities, skills, and supportedInterfaces
  2. Expose it as a CDI bean qualified with `@PublicAgentCard` in a Quarkus application
  3. The framework automatically serves it at `/.well-known/agent-card.json`

To discover an agent:

  1. Use `A2A.getAgentCard(agentUrl)` or `A2ACardResolver` to fetch the card from the well-known endpoint
  2. Inspect `supportedInterfaces` to determine available transports
  3. Inspect `capabilities` to determine streaming/push-notification support

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment