Agent

Trait Agent 

Source
pub trait Agent: Send + Sync {
    // Required methods
    fn tools(&self) -> Vec<Box<dyn Tool + Send + Sync>>;
    fn clone_agent(&self) -> Box<dyn Agent>;

    // Provided method
    fn execute(
        &self,
        action: &AgentAction,
    ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + '_>> { ... }
}

Required Methods§

Source

fn tools(&self) -> Vec<Box<dyn Tool + Send + Sync>>

Source

fn clone_agent(&self) -> Box<dyn Agent>

Provided Methods§

Source

fn execute( &self, action: &AgentAction, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + '_>>

Implementors§