tiny-agent 0.1.0

一个小而完整的 Rust LLM Agent 运行时:可中断、可恢复、可观测、可插拔的 agent loop / A small but complete LLM agent runtime in Rust — an interruptible, resumable, observable, pluggable agent loop.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::core::Agent;
use crate::error::StorageError;
use async_trait::async_trait;

#[async_trait]
pub trait CheckpointStorage: Send + Sync {
    async fn save_checkpoint(&self, session_id: &str, agent: &Agent) -> Result<(), StorageError>;
    async fn get_checkpoint(&self, session_id: &str) -> Result<Option<Agent>, StorageError>;
    async fn delete_checkpoint(&self, session_id: &str) -> Result<(), StorageError>;
}