pub struct AgentCard {
pub name: String,
pub version: String,
pub description: Option<String>,
pub tags: Vec<String>,
pub endpoint_url: Option<String>,
pub capabilities: Vec<String>,
pub input_modes: Vec<String>,
pub output_modes: Vec<String>,
pub created_at: String,
pub updated_at: Option<String>,
pub owner: Option<String>,
}Expand description
Metadata document describing a registered agent’s capabilities and endpoint.
Follows the A2A protocol agent card schema with camelCase JSON serialization.
owner is the user who registered the card, set by the registry routes from the
authenticated caller; a value sent in a request body is ignored. A card without an owner
— one stored before cards had owners, or inserted through an AgentRegistryStore
directly — is readable by every authenticated caller and changed by no one through the
routes; remove or replace it through the store.
§Example
use adk_server::registry::types::AgentCard;
let card = AgentCard {
name: "my-agent".to_string(),
version: "1.0.0".to_string(),
description: Some("A helpful agent".to_string()),
tags: vec!["search".to_string(), "qa".to_string()],
endpoint_url: Some("https://example.com/agents/my-agent".to_string()),
capabilities: vec!["text".to_string(), "tool-calling".to_string()],
input_modes: vec!["text".to_string()],
output_modes: vec!["text".to_string()],
created_at: "2025-01-15T10:30:00Z".to_string(),
updated_at: None,
owner: None,
};
let json = serde_json::to_string(&card).unwrap();
assert!(json.contains("endpointUrl"));Fields§
§name: StringUnique agent name used as the primary identifier.
version: StringSemantic version string (e.g. "1.0.0").
description: Option<String>Optional human-readable description of the agent.
Tags for categorization and filtering.
endpoint_url: Option<String>URL where the agent can be reached.
capabilities: Vec<String>Capabilities the agent supports (e.g. "text", "tool-calling").
input_modes: Vec<String>Supported input modes (e.g. "text", "audio").
output_modes: Vec<String>Supported output modes (e.g. "text", "audio").
created_at: StringISO 8601 timestamp of when the card was created.
updated_at: Option<String>ISO 8601 timestamp of the last update, if any.
owner: Option<String>The user ID of the caller who registered the card; None on a card no one owns.
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>,
impl StructuralPartialEq for AgentCard
Auto Trait Implementations§
impl Forget for AgentCard
impl Freeze for AgentCard
impl Move for AgentCard
impl RefUnwindSafe for AgentCard
impl Send for AgentCardwhere
RawVecInner: Send,
impl Sync for AgentCardwhere
RawVecInner: Sync,
impl Unpin for AgentCard
impl UnsafeUnpin for AgentCardwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for AgentCardwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more