pub struct AgentCapability {
pub name: String,
pub domain: String,
pub keywords: Vec<String>,
pub tools: Vec<String>,
pub priority: u32,
pub description: Option<String>,
}Expand description
Agent capability descriptor for handoff routing
Fields§
§name: StringUnique agent identifier
domain: StringPrimary domain/specialty
keywords: Vec<String>Keywords that indicate this agent’s expertise
tools: Vec<String>Tools this agent can use
priority: u32Priority for tie-breaking (higher = preferred)
description: Option<String>Optional description
Implementations§
Source§impl AgentCapability
impl AgentCapability
Sourcepub fn new(
name: impl Into<String>,
domain: impl Into<String>,
keywords: Vec<impl Into<String>>,
tools: Vec<impl Into<String>>,
) -> Self
pub fn new( name: impl Into<String>, domain: impl Into<String>, keywords: Vec<impl Into<String>>, tools: Vec<impl Into<String>>, ) -> Self
Create a new agent capability
Sourcepub fn with_priority(self, priority: u32) -> Self
pub fn with_priority(self, priority: u32) -> Self
Set priority
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set description
Sourcepub fn match_score(&self, task: &str) -> f32
pub fn match_score(&self, task: &str) -> f32
Score how well this agent matches a task description
Sourcepub fn has_any_tool(&self, tools: &[&str]) -> bool
pub fn has_any_tool(&self, tools: &[&str]) -> bool
Check if agent has any of the specified tools
Trait Implementations§
Source§impl Clone for AgentCapability
impl Clone for AgentCapability
Source§fn clone(&self) -> AgentCapability
fn clone(&self) -> AgentCapability
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 AgentCapability
impl Debug for AgentCapability
Source§impl<'de> Deserialize<'de> for AgentCapability
impl<'de> Deserialize<'de> for AgentCapability
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 AgentCapability
impl RefUnwindSafe for AgentCapability
impl Send for AgentCapability
impl Sync for AgentCapability
impl Unpin for AgentCapability
impl UnsafeUnpin for AgentCapability
impl UnwindSafe for AgentCapability
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