pub trait AgentExecutor: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
config: &'life1 AgentJobConfig,
prompt: &'life2 str,
working_dir: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Trait for executing agent-mode cron jobs.
Implement this trait to provide agent execution capabilities to the cron
scheduler. The server crate implements this using a3s-code-core::Agent.
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
config: &'life1 AgentJobConfig,
prompt: &'life2 str,
working_dir: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
config: &'life1 AgentJobConfig,
prompt: &'life2 str,
working_dir: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute an agent prompt and return the text result.