Skip to main content

SubAgent

Trait SubAgent 

Source
pub trait SubAgent: Send + Sync {
    // Required methods
    fn name(&self) -> String;
    fn description(&self) -> String;
    fn run<'life0, 'async_trait>(
        &'life0 self,
        input: String,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

SubAgent represents a specialist agent that can be delegated work.

Required Methods§

Source

fn name(&self) -> String

Returns the name of the sub-agent

Source

fn description(&self) -> String

Returns the description of what the sub-agent does

Source

fn run<'life0, 'async_trait>( &'life0 self, input: String, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Runs the sub-agent with the given input and returns the result

Implementors§