pub struct AgentRegistry { /* private fields */ }Expand description
Registry of available agents for handoff routing
Implementations§
Source§impl AgentRegistry
impl AgentRegistry
Sourcepub fn register(&mut self, capability: AgentCapability)
pub fn register(&mut self, capability: AgentCapability)
Register an agent’s capabilities
Sourcepub fn unregister(&mut self, name: &str) -> Option<AgentCapability>
pub fn unregister(&mut self, name: &str) -> Option<AgentCapability>
Unregister an agent
Sourcepub fn get(&self, name: &str) -> Option<&AgentCapability>
pub fn get(&self, name: &str) -> Option<&AgentCapability>
Get agent by name
Sourcepub fn find_best_agent(
&self,
task: &str,
exclude: Option<&str>,
) -> Option<(String, f32)>
pub fn find_best_agent( &self, task: &str, exclude: Option<&str>, ) -> Option<(String, f32)>
Find the best agent for a task
Sourcepub fn find_by_tool(&self, tool: &str) -> Vec<&AgentCapability>
pub fn find_by_tool(&self, tool: &str) -> Vec<&AgentCapability>
Find agents that can use a specific tool
Sourcepub fn find_by_domain(&self, domain: &str) -> Vec<&AgentCapability>
pub fn find_by_domain(&self, domain: &str) -> Vec<&AgentCapability>
Find agents by domain
Sourcepub fn all(&self) -> Vec<&AgentCapability>
pub fn all(&self) -> Vec<&AgentCapability>
Get all registered agents
Trait Implementations§
Source§impl Clone for AgentRegistry
impl Clone for AgentRegistry
Source§fn clone(&self) -> AgentRegistry
fn clone(&self) -> AgentRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentRegistry
impl Debug for AgentRegistry
Source§impl Default for AgentRegistry
impl Default for AgentRegistry
Source§fn default() -> AgentRegistry
fn default() -> AgentRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AgentRegistry
impl RefUnwindSafe for AgentRegistry
impl Send for AgentRegistry
impl Sync for AgentRegistry
impl Unpin for AgentRegistry
impl UnsafeUnpin for AgentRegistry
impl UnwindSafe for AgentRegistry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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