pub trait OnStopFn: for<'a> Fn(&'a Agent, StopReason, Option<&AgentError>) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>> + Send + Sync + DynClone { }
Hooks that are called when the agent stop