pub trait AgentRuntime: Send + Sync {
// Required method
fn run_structured<'life0, 'async_trait, TIn, TOut>(
&'life0 self,
event: Event,
input: TIn,
) -> Pin<Box<dyn Future<Output = Result<Result<TOut>>> + Send + 'async_trait>>
where TIn: Send + Sync + Serialize + 'async_trait,
TOut: Send + Sync + for<'de> Deserialize<'de> + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Structured agent runtime used only after deterministic app context is built.
Implementations execute a model/tool runner against typed input and return a typed workflow result for validation. The runtime is not a shortcut around source evidence, review gates, or blocked live actions.
Required Methods§
Sourcefn run_structured<'life0, 'async_trait, TIn, TOut>(
&'life0 self,
event: Event,
input: TIn,
) -> Pin<Box<dyn Future<Output = Result<Result<TOut>>> + Send + 'async_trait>>
fn run_structured<'life0, 'async_trait, TIn, TOut>( &'life0 self, event: Event, input: TIn, ) -> Pin<Box<dyn Future<Output = Result<Result<TOut>>> + Send + 'async_trait>>
Runs one typed agent call for a workflow event and input packet.
The call returns a structured workflow result for the app validator to accept or reject. Even successful output remains draft/evidence until the owning workflow applies policy gates.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.