pub trait WorkflowAgentRunner: Send + Sync {
// Required method
fn run_agent<'life0, 'async_trait>(
&'life0 self,
default_provider: Arc<dyn AgentProvider>,
provider_override: Option<String>,
input: AgentProviderRunInput,
) -> Pin<Box<dyn Future<Output = Result<AgentProviderResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn retry_in_runtime(&self) -> bool { ... }
fn sleep<'life0, 'async_trait>(
&'life0 self,
duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn run_agent<'life0, 'async_trait>(
&'life0 self,
default_provider: Arc<dyn AgentProvider>,
provider_override: Option<String>,
input: AgentProviderRunInput,
) -> Pin<Box<dyn Future<Output = Result<AgentProviderResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn retry_in_runtime(&self) -> bool
fn retry_in_runtime(&self) -> bool
Whether the workflow scheduler should wrap this runner’s run_agent call
in the per-agent retry loop.
Most runners should use the default true: their run_agent method is a
single agent/provider boundary, so retrying it is safe and keeps retry
behavior centralized in the runtime scheduler.
Runners that perform their own checkpointing or replay should return
false and apply retry internally around the nondeterministic provider
call. For example, the SQLite durable runner must not have the scheduler
retry its whole run_agent method, because each call advances durable
occurrence counters and may create a distinct checkpoint such as
step:sig_x#2 instead of retrying the original durable step.
fn sleep<'life0, 'async_trait>(
&'life0 self,
duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".