Expand description
§Conversation Persistence (SQLite backend)
Provides SQLite-backed storage for conversation history so agents survive pod restarts without losing context. Supports configurable retention policies (time-based, count-based, token-budget-based).
§Architecture
ConversationStore— manages a SQLite database with sessions and messages tables- Sessions are identified by a session ID (UUID or user-provided)
- Messages are stored with role, content, timestamp, and token count
- Retention policies are applied on read (not on write) for simplicity
§Usage
use ravenclaws::persistence::ConversationStore;
let store = ConversationStore::open(":memory:")?;
store.create_session("session-1", "You are a helpful assistant.")?;
store.add_message("session-1", "user", "Hello!", None)?;
let history = store.get_history("session-1", None)?;Structs§
- Conversation
Store - SQLite-backed conversation store
- Stored
Message - A stored conversation message
- Stored
Session - A stored conversation session
Enums§
- Retention
Policy - Retention policy for pruning old conversations