pub struct AgentCard {Show 14 fields
pub protocol_version: String,
pub name: String,
pub description: String,
pub version: String,
pub url: String,
pub provider: Option<AgentProvider>,
pub capabilities: Option<AgentCapabilities>,
pub default_input_modes: Vec<String>,
pub default_output_modes: Vec<String>,
pub skills: Vec<AgentSkill>,
pub security_schemes: Option<HashMap<String, Value>>,
pub security: Option<Vec<HashMap<String, Vec<String>>>>,
pub supports_authenticated_extended_card: Option<bool>,
pub signatures: Option<Vec<AgentCardSignature>>,
}Expand description
Agent Card - metadata describing an A2A agent
Agent Cards are used for agent discovery. They are typically served at
/.well-known/agent-card.json and describe the agent’s identity, capabilities,
and security requirements.
Fields§
§protocol_version: StringThe version of the A2A protocol supported
name: StringAgent name
description: StringAgent description
version: StringAgent version
url: StringThe preferred endpoint URL for the agent’s A2A service
provider: Option<AgentProvider>Organization/provider details
capabilities: Option<AgentCapabilities>Features supported by this agent
default_input_modes: Vec<String>Default supported input MIME types
default_output_modes: Vec<String>Default supported output MIME types
skills: Vec<AgentSkill>List of specific skills/capabilities
security_schemes: Option<HashMap<String, Value>>Security schemes following OpenAPI specification
security: Option<Vec<HashMap<String, Vec<String>>>>Security requirements
supports_authenticated_extended_card: Option<bool>Whether a more detailed card is available post-authentication
signatures: Option<Vec<AgentCardSignature>>JWS signatures for card verification
Implementations§
Source§impl AgentCard
impl AgentCard
Sourcepub fn new(
name: impl Into<String>,
description: impl Into<String>,
version: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, description: impl Into<String>, version: impl Into<String>, ) -> Self
Create a new Agent Card with required fields
Sourcepub fn vtcode_default(url: impl Into<String>) -> Self
pub fn vtcode_default(url: impl Into<String>) -> Self
Create a default VT Code agent card
Sourcepub fn with_provider(self, provider: AgentProvider) -> Self
pub fn with_provider(self, provider: AgentProvider) -> Self
Set the provider
Sourcepub fn with_capabilities(self, capabilities: AgentCapabilities) -> Self
pub fn with_capabilities(self, capabilities: AgentCapabilities) -> Self
Set the capabilities
Sourcepub fn add_skill(self, skill: AgentSkill) -> Self
pub fn add_skill(self, skill: AgentSkill) -> Self
Add a skill
Sourcepub fn supports_streaming(&self) -> bool
pub fn supports_streaming(&self) -> bool
Check if streaming is supported
Sourcepub fn supports_push_notifications(&self) -> bool
pub fn supports_push_notifications(&self) -> bool
Check if push notifications are supported