Trait Agent

Source
pub trait Agent: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn name(&self) -> &str;
    fn capabilities(&self) -> &[String];
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        task: Task,
    ) -> Pin<Box<dyn Future<Output = Result<TaskResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Agent trait for AI agents

Required Methods§

Source

fn id(&self) -> &str

Get agent ID

Source

fn name(&self) -> &str

Get agent name

Source

fn capabilities(&self) -> &[String]

Get agent capabilities

Source

fn execute<'life0, 'async_trait>( &'life0 self, task: Task, ) -> Pin<Box<dyn Future<Output = Result<TaskResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a task

Implementors§