pub trait AgentToolHandler: Send + Sync {
// Required methods
fn execute<'life0, 'async_trait>(
&'life0 self,
input: AgentToolInput,
) -> Pin<Box<dyn Future<Output = Result<AgentToolOutput, AgentToolError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn name(&self) -> &str;
fn description(&self) -> &str;
// Provided methods
fn is_available(&self) -> bool { ... }
fn capabilities(&self) -> Vec<String> { ... }
}Expand description
Trait for agent tool handlers
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
input: AgentToolInput,
) -> Pin<Box<dyn Future<Output = Result<AgentToolOutput, AgentToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
input: AgentToolInput,
) -> Pin<Box<dyn Future<Output = Result<AgentToolOutput, AgentToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the agent with the given input
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get the agent’s description
Provided Methods§
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the agent is available
Sourcefn capabilities(&self) -> Vec<String>
fn capabilities(&self) -> Vec<String>
Get the agent’s capabilities/tags