pub trait LoopCheckpointSink: Send + Sync {
// Required methods
fn save_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 LoopCheckpoint,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<LoopCheckpoint>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Receiver of per-tool-round checkpoints.
The framework ships one adapter:
SessionStoreCheckpointSink which forwards to a
crate::store::SessionStore. Hosts can implement custom sinks
(e.g. push directly to Redis) by implementing this trait.
Required Methods§
Sourcefn save_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 LoopCheckpoint,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 LoopCheckpoint,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist a checkpoint. Called from inside the agent loop after a successful tool round. Errors are logged at warn level and otherwise swallowed — losing a checkpoint must not halt the live run.
Sourcefn load_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<LoopCheckpoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<LoopCheckpoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the latest checkpoint for run_id, if any. Returns None
when no checkpoint has been recorded.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".