Skip to main content

BeforeRunCallback

Type Alias BeforeRunCallback 

Source
pub type BeforeRunCallback = Box<dyn Fn(Arc<dyn InvocationContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>>> + Send>> + Send + Sync>;
Expand description

Callback invoked before the agent run starts.

Can perform setup, validation, or early exit. Return Ok(Some(content)) to skip the run and return this content. Return Ok(None) to continue with the run.

Aliased Typeยง

pub struct BeforeRunCallback(/* private fields */);