pub trait AgentExecutor: Send + Sync {
// Required methods
fn executor_type(&self) -> ExecutorType;
fn spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
prompt: &'life2 str,
config: &'life3 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession, AgentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn resume<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
session_id: &'life2 str,
prompt: &'life3 str,
config: &'life4 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession, AgentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait;
fn capabilities(&self) -> AgentCapabilities;
fn availability(&self) -> AvailabilityStatus;
}Expand description
Core trait — every provider implements this.
This is intentionally narrow: spawn, resume, capabilities, availability. Provider-specific features stay in the provider crate.
Required Methods§
Sourcefn executor_type(&self) -> ExecutorType
fn executor_type(&self) -> ExecutorType
Which provider this executor implements.
Sourcefn spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
prompt: &'life2 str,
config: &'life3 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
prompt: &'life2 str,
config: &'life3 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Create a new session and send the first prompt.
Sourcefn resume<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
session_id: &'life2 str,
prompt: &'life3 str,
config: &'life4 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn resume<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
session_id: &'life2 str,
prompt: &'life3 str,
config: &'life4 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Resume an existing session with a follow-up prompt.
Sourcefn capabilities(&self) -> AgentCapabilities
fn capabilities(&self) -> AgentCapabilities
Static capability flags.
Sourcefn availability(&self) -> AvailabilityStatus
fn availability(&self) -> AvailabilityStatus
Check if the runtime dependency (CLI, server) is available.