pub trait ActionExecutor: Send + Sync {
// Required method
fn execute_actions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
actions: &'life1 [ProposedAction],
config: &'life2 LoopConfig,
circuit_breakers: &'life3 CircuitBreakerRegistry,
) -> Pin<Box<dyn Future<Output = Vec<Observation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
// Provided method
fn tool_definitions(&self) -> Vec<ToolDefinition> { ... }
}Expand description
Trait for executing proposed actions and producing observations.
Required Methods§
Sourcefn execute_actions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
actions: &'life1 [ProposedAction],
config: &'life2 LoopConfig,
circuit_breakers: &'life3 CircuitBreakerRegistry,
) -> Pin<Box<dyn Future<Output = Vec<Observation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute_actions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
actions: &'life1 [ProposedAction],
config: &'life2 LoopConfig,
circuit_breakers: &'life3 CircuitBreakerRegistry,
) -> Pin<Box<dyn Future<Output = Vec<Observation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute a batch of approved actions, potentially in parallel.
Returns observations from all action results. Circuit breakers are checked before each dispatch.
Provided Methods§
Sourcefn tool_definitions(&self) -> Vec<ToolDefinition>
fn tool_definitions(&self) -> Vec<ToolDefinition>
Return tool definitions this executor can handle.
The runner auto-populates LoopConfig.tool_definitions from this
when the config’s list is empty. Override in executors that discover
tools dynamically (e.g., ComposioToolExecutor).