Skip to main content

AgentProvider

Trait AgentProvider 

Source
pub trait AgentProvider: Send + Sync {
    // Required methods
    fn run<'a>(
        &'a self,
        request: AgentRequest,
    ) -> Pin<Box<dyn Future<Output = Result<AgentOutcome, AgentCallError>> + Send + 'a>>;
    fn agents<'a>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfo>, AgentCallError>> + Send + 'a>>;
}
Expand description

The harness side of submilli:agents.

Required Methods§

Source

fn run<'a>( &'a self, request: AgentRequest, ) -> Pin<Box<dyn Future<Output = Result<AgentOutcome, AgentCallError>> + Send + 'a>>

Run request.agent on request.input and return its final answer.

Source

fn agents<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfo>, AgentCallError>> + Send + 'a>>

Every agent the harness offers. The engine removes the ones the policy denies to the caller before the program sees the list.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§