pub trait SessionHost: Send + Sync {
// Required method
fn spawn_agent<'life0, 'async_trait>(
&'life0 self,
opts: SpawnOpts,
) -> Pin<Box<dyn Future<Output = Result<AgentRunResult, MachiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn spawn_agents<'life0, 'async_trait>(
&'life0 self,
opts: Vec<SpawnOpts>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentRunResult>, MachiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Host capable of spawning nested agents.
Required Methods§
Sourcefn spawn_agent<'life0, 'async_trait>(
&'life0 self,
opts: SpawnOpts,
) -> Pin<Box<dyn Future<Output = Result<AgentRunResult, MachiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn spawn_agent<'life0, 'async_trait>(
&'life0 self,
opts: SpawnOpts,
) -> Pin<Box<dyn Future<Output = Result<AgentRunResult, MachiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Spawn and run a nested agent to completion.
Provided Methods§
Sourcefn spawn_agents<'life0, 'async_trait>(
&'life0 self,
opts: Vec<SpawnOpts>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentRunResult>, MachiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn spawn_agents<'life0, 'async_trait>(
&'life0 self,
opts: Vec<SpawnOpts>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentRunResult>, MachiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Spawn many nested agents concurrently (order of results matches input).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".