pub struct AgentCardRegistry { /* private fields */ }Expand description
Global registry of available agents and their capability cards.
The registry enables agents to discover each other by capability, supporting the A2A “handshake” pattern where agents query “who can do X?”.
Implementations§
Source§impl AgentCardRegistry
impl AgentCardRegistry
Sourcepub async fn register_agent(&self, card: AgentCard) -> Result<()>
pub async fn register_agent(&self, card: AgentCard) -> Result<()>
Registers an agent’s card in the registry.
Sourcepub async fn unregister_agent(&self, agent_id: AgentId) -> Result<()>
pub async fn unregister_agent(&self, agent_id: AgentId) -> Result<()>
Unregisters an agent from the registry.
Sourcepub async fn find_agents_by_capability(
&self,
capability: &str,
) -> Result<Vec<AgentCard>>
pub async fn find_agents_by_capability( &self, capability: &str, ) -> Result<Vec<AgentCard>>
Finds all agents that have the given capability.
Sourcepub async fn find_agents_by_skill(&self, skill: &str) -> Result<Vec<AgentCard>>
pub async fn find_agents_by_skill(&self, skill: &str) -> Result<Vec<AgentCard>>
Finds all agents that have the given skill.
Sourcepub async fn get_agent(&self, agent_id: AgentId) -> Option<AgentCard>
pub async fn get_agent(&self, agent_id: AgentId) -> Option<AgentCard>
Finds an agent by its ID.
Sourcepub async fn list_agents(&self) -> Vec<AgentCard>
pub async fn list_agents(&self) -> Vec<AgentCard>
Returns all registered agents.
Sourcepub async fn agent_count(&self) -> usize
pub async fn agent_count(&self) -> usize
Returns the count of registered agents.
Sourcepub async fn update_status(
&self,
agent_id: AgentId,
status: AgentStatus,
) -> Result<()>
pub async fn update_status( &self, agent_id: AgentId, status: AgentStatus, ) -> Result<()>
Updates an agent’s status.
Trait Implementations§
Source§impl Clone for AgentCardRegistry
impl Clone for AgentCardRegistry
Source§fn clone(&self) -> AgentCardRegistry
fn clone(&self) -> AgentCardRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AgentCardRegistry
impl !UnwindSafe for AgentCardRegistry
impl Freeze for AgentCardRegistry
impl Send for AgentCardRegistry
impl Sync for AgentCardRegistry
impl Unpin for AgentCardRegistry
impl UnsafeUnpin for AgentCardRegistry
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