pub struct AgentCard {Show 13 fields
pub name: String,
pub description: String,
pub version: Option<String>,
pub provider: Option<AgentProvider>,
pub icon_url: Option<Url>,
pub documentation_url: Option<Url>,
pub supported_interfaces: Vec<AgentInterface>,
pub capabilities: AgentCapabilities,
pub security_schemes: Vec<SecurityScheme>,
pub security: Vec<SecurityRequirement>,
pub default_input_modes: Vec<ContentType>,
pub default_output_modes: Vec<ContentType>,
pub skills: Vec<AgentSkill>,
}Expand description
An A2A Agent Card — metadata describing an agent’s capabilities.
Published at /.well-known/agent-card.json for discovery.
Fields§
§name: StringHuman-readable name of the agent.
description: StringDescription of what the agent does.
version: Option<String>Semantic version of the agent.
provider: Option<AgentProvider>The provider/organization that created this agent.
icon_url: Option<Url>URL to the agent’s icon/logo.
documentation_url: Option<Url>URL to the agent’s documentation.
supported_interfaces: Vec<AgentInterface>Interfaces supported by this agent (URLs + protocol bindings).
capabilities: AgentCapabilitiesCapabilities declared by this agent.
security_schemes: Vec<SecurityScheme>Security schemes supported by this agent.
security: Vec<SecurityRequirement>Security requirements (references to security_schemes).
default_input_modes: Vec<ContentType>Default input content types accepted.
default_output_modes: Vec<ContentType>Default output content types produced.
skills: Vec<AgentSkill>Skills (specific abilities) of this agent.
Implementations§
Source§impl AgentCard
impl AgentCard
Sourcepub async fn discover(base_url: &str) -> A2AResult<Self>
pub async fn discover(base_url: &str) -> A2AResult<Self>
Discover an agent by fetching its Agent Card from the well-known endpoint.
Fetches {base_url}/.well-known/agent-card.json.
Sourcepub fn supports_streaming(&self) -> bool
pub fn supports_streaming(&self) -> bool
Check if this agent supports streaming.
Sourcepub fn supports_push_notifications(&self) -> bool
pub fn supports_push_notifications(&self) -> bool
Check if this agent supports push notifications.
Sourcepub fn find_skill(&self, skill_id: &str) -> Option<&AgentSkill>
pub fn find_skill(&self, skill_id: &str) -> Option<&AgentSkill>
Find a skill by ID.
Sourcepub fn primary_url(&self) -> Option<&Url>
pub fn primary_url(&self) -> Option<&Url>
Get the primary interface URL.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentCard
impl<'de> Deserialize<'de> for AgentCard
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for AgentCard
impl JsonSchema for AgentCard
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more