tiny_agent/checkpoint/mod.rs
1use crate::core::Agent;
2use crate::error::StorageError;
3use async_trait::async_trait;
4
5#[async_trait]
6pub trait CheckpointStorage: Send + Sync {
7 async fn save_checkpoint(&self, session_id: &str, agent: &Agent) -> Result<(), StorageError>;
8 async fn get_checkpoint(&self, session_id: &str) -> Result<Option<Agent>, StorageError>;
9 async fn delete_checkpoint(&self, session_id: &str) -> Result<(), StorageError>;
10}