pub struct AgentCard {Show 13 fields
pub name: Arc<str>,
pub description: Arc<str>,
pub version: Arc<str>,
pub supported_interfaces: Vec<AgentInterface>,
pub provider: Option<AgentProvider>,
pub documentation_url: Option<Url>,
pub icon_url: Option<Url>,
pub capabilities: AgentCapabilities,
pub default_input_modes: Vec<Arc<str>>,
pub default_output_modes: Vec<Arc<str>>,
pub skills: Vec<AgentSkill>,
pub security_schemes: BTreeMap<Arc<str>, SecurityScheme>,
pub security_requirements: Vec<SecurityRequirement>,
}Expand description
A self-describing manifest for an agent.
This is the required-fields view plus the four
single-value optional fields the proto names
(provider, documentation_url, icon_url, plus
the security_schemes map that lands in this commit).
The remaining optional fields (security_requirements,
signatures) land in follow-up commits — the former
is its own type, the latter is RFC 7515 JWS and wants
its own dependency footprint.
Fields§
§name: Arc<str>A human-readable name. REQUIRED, non-empty.
description: Arc<str>A human-readable description. REQUIRED, non-empty.
version: Arc<str>The version of the agent, in semver form. REQUIRED,
non-empty. The spec uses this for ETag derivation in
caching; the builder does not parse the string.
supported_interfaces: Vec<AgentInterface>The protocol bindings the agent publishes, in preference order. REQUIRED, non-empty. An agent with no interface has no protocol to speak.
provider: Option<AgentProvider>The service provider of the agent. Optional in the
proto, present here as Option<AgentProvider> so the
field is omitted from the wire form when the agent
does not advertise a provider.
documentation_url: Option<Url>A URL providing additional documentation about the agent. Optional in the proto; absent by default.
icon_url: Option<Url>A URL to an icon for the agent. Optional in the proto; absent by default. UI clients surface this as the agent’s avatar in a directory listing.
capabilities: AgentCapabilitiesThe capability set. REQUIRED — the field is always present on the wire.
default_input_modes: Vec<Arc<str>>The default input media types. REQUIRED, non-empty. The
spec recommends text/plain as the universal default.
default_output_modes: Vec<Arc<str>>The default output media types. REQUIRED, non-empty.
skills: Vec<AgentSkill>The skills the agent advertises. REQUIRED (the field is always present; an empty list is valid).
security_schemes: BTreeMap<Arc<str>, SecurityScheme>The security schemes the agent advertises, keyed by
the caller’s chosen scheme name. Optional in the
spec — an agent that does not require authentication
has no securitySchemes field on the wire. The map
is BTreeMap so the wire form is deterministic
(alphabetical by scheme name), which keeps test
fixtures readable.
security_requirements: Vec<SecurityRequirement>The security requirements the agent publishes, in
preference order. Optional in the spec — an agent
with no security_requirements field on the wire
defaults to “every operation requires no
authentication”, which is the same as publishing
[{ "schemes": {} }]. The two are different signals
(the former is implicit, the latter is explicit)
and clients render them differently.