agent
A2A v1.0 Agent Metadata Types
Complete AgentCard redesign per A2A Protocol v1.0.0 specification.
Structs
Section titled “Structs”AgentSkill
Section titled “AgentSkill”Agent Skill (v1.0)
Fields
| Field | Type | Description |
|---|---|---|
id | String | |
name | String | |
description | String | |
tags | Option<Vec<String>> | |
examples | Option<Vec<String>> | |
input_modes | Option<Vec<String>> | |
output_modes | Option<Vec<String>> | |
security_requirements | Option<Vec<SecurityRequirement>> |
Methods
with_examples
Section titled “with_examples”fn with_examples(self, examples: Vec<String>) -> Selfwith_example
Section titled “with_example”fn with_example<impl Into<String>>(self, example: impl Into) -> Selfwith_tags
Section titled “with_tags”fn with_tags(self, tags: Vec<String>) -> Selfsupports_json_input
Section titled “supports_json_input”fn supports_json_input(&self) -> boolAgentInterface
Section titled “AgentInterface”Agent Interface (v1.0) — how to reach this agent.
Fields
| Field | Type | Description |
|---|---|---|
url | String | |
protocol_binding | String | |
tenant | Option<String> | |
protocol_version | Option<String> |
AgentCapabilities
Section titled “AgentCapabilities”Agent Capabilities (v1.0)
Fields
| Field | Type | Description |
|---|---|---|
streaming | bool | |
push_notifications | bool | |
extensions | Option<Vec<AgentExtension>> | |
extended_agent_card | bool |
AgentExtension
Section titled “AgentExtension”Agent Extension (v1.0)
Fields
| Field | Type | Description |
|---|---|---|
uri | String | |
description | Option<String> | |
required | bool | |
params | Option<serde_json::Value> |
AgentProvider
Section titled “AgentProvider”Agent Provider (v1.0)
Fields
| Field | Type | Description |
|---|---|---|
url | Option<String> | |
organization | String |
AgentCardSignature
Section titled “AgentCardSignature”JWS signature for agent card integrity.
Fields
| Field | Type | Description |
|---|---|---|
protected | String | |
signature | String | |
header | Option<serde_json::Value> |
AgentCard
Section titled “AgentCard”Agent Card — v1.0 top-level metadata object.
Fields
| Field | Type | Description |
|---|---|---|
name | String | |
description | Option<String> | |
version | Option<String> | |
supported_interfaces | Option<Vec<AgentInterface>> | |
capabilities | Option<AgentCapabilities> | |
skills | Vec<AgentSkill> | |
default_input_modes | Option<Vec<String>> | |
default_output_modes | Option<Vec<String>> | |
security_schemes | Option<HashMap<String, SecurityScheme>> | |
security_requirements | Option<Vec<SecurityRequirement>> | |
signatures | Option<Vec<AgentCardSignature>> | |
icon_url | Option<String> | |
provider | Option<AgentProvider> | |
documentation_url | Option<String> | |
metadata | Option<HashMap<String, serde_json::Value>> |
Methods
fn new<impl Into<String>>(name: impl Into) -> SelfMinimal card with just a name.
with_capability
Section titled “with_capability”fn with_capability<impl Into<String>, impl Into<String>>(self, method: impl Into, description: impl Into) -> SelfRegister a method capability on this agent card.
Stores the method name and description in the card’s pf:methods
metadata map. Used by A2AProtocol::register_method to keep the
agent card in sync with the method registry.
supports_method
Section titled “supports_method”fn supports_method(&self, method: &str) -> boolget_method_description
Section titled “get_method_description”fn get_method_description(&self, method: &str) -> Option<String>add_skill
Section titled “add_skill”fn add_skill(self, skill: AgentSkill) -> Selfget_skill
Section titled “get_skill”fn get_skill(&self, skill_id: &str) -> Option<&AgentSkill>get_skills_by_input_mode
Section titled “get_skills_by_input_mode”fn get_skills_by_input_mode(&self, input_mode: &str) -> Vec<&AgentSkill>supports_structured_skills
Section titled “supports_structured_skills”fn supports_structured_skills(&self) -> bool