pub struct AgentCard {
pub name: String,
pub description: String,
pub url: String,
pub capabilities: Vec<String>,
pub version: String,
pub provider: Option<String>,
pub documentation_url: Option<String>,
pub authentication: Option<Vec<String>>,
pub default_input_modes: Vec<String>,
pub default_output_modes: Vec<String>,
}Expand description
Agent metadata card, served at /.well-known/agent.json.
Describes an agent’s identity, endpoint, and capabilities so that other agents can discover and interact with it.
Fields§
§name: StringHuman-readable agent name.
description: StringDescription of what the agent does.
url: StringBase URL where the agent accepts A2A requests.
capabilities: Vec<String>List of capability identifiers (e.g. “text-generation”, “tool-use”).
version: StringProtocol version string.
provider: Option<String>Provider/organization name (optional).
documentation_url: Option<String>Documentation URL (optional).
authentication: Option<Vec<String>>Authentication schemes supported (optional).
default_input_modes: Vec<String>Default input modes (e.g. [“text”, “image”]).
default_output_modes: Vec<String>Default output modes (e.g. [“text”]).
Implementations§
Source§impl AgentCard
impl AgentCard
Sourcepub fn new(
name: impl Into<String>,
description: impl Into<String>,
url: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, description: impl Into<String>, url: impl Into<String>, ) -> Self
Create a new agent card.
Sourcepub fn with_capability(self, capability: impl Into<String>) -> Self
pub fn with_capability(self, capability: impl Into<String>) -> Self
Add a capability.
Sourcepub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
Set the version.
Sourcepub fn with_provider(self, provider: impl Into<String>) -> Self
pub fn with_provider(self, provider: impl Into<String>) -> Self
Set the provider/organization name.
Sourcepub fn with_documentation_url(self, url: impl Into<String>) -> Self
pub fn with_documentation_url(self, url: impl Into<String>) -> Self
Set the documentation URL.
Sourcepub fn with_authentication(self, schemes: Vec<String>) -> Self
pub fn with_authentication(self, schemes: Vec<String>) -> Self
Set the authentication schemes.
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentCard
impl RefUnwindSafe for AgentCard
impl Send for AgentCard
impl Sync for AgentCard
impl Unpin for AgentCard
impl UnsafeUnpin for AgentCard
impl UnwindSafe for AgentCard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more