pub trait HandoffStrategy: Send + Sync {
// Required method
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
agents: &'life1 [(String, Arc<Mutex<Agent>>)],
input: Message,
bus: Arc<dyn MessageBus>,
) -> Pin<Box<dyn Future<Output = Result<AgentResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn name(&self) -> &str { ... }
}Expand description
Strategy for routing a request through a fleet.
Required Methods§
Sourcefn run<'life0, 'life1, 'async_trait>(
&'life0 self,
agents: &'life1 [(String, Arc<Mutex<Agent>>)],
input: Message,
bus: Arc<dyn MessageBus>,
) -> Pin<Box<dyn Future<Output = Result<AgentResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
agents: &'life1 [(String, Arc<Mutex<Agent>>)],
input: Message,
bus: Arc<dyn MessageBus>,
) -> Pin<Box<dyn Future<Output = Result<AgentResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run input through agents and return the final response.
bus is available for inter-agent traffic.