Expand description
Memory backends for agent state persistence.
This module provides pluggable storage backends implementing the crate::core::memory::Memory trait:
InMemoryBackend- Fast, thread-safe in-memory storage (default)- [
SqliteBackend] - File-based persistent storage (feature:sqlite) - [
RedisBackend] - Distributed persistent storage (feature:redis)
§Example
use ceylon_runtime::InMemoryBackend;
use ceylon_runtime::core::memory::{Memory, MemoryEntry, MemoryQuery};
let memory = InMemoryBackend::new();
// Store an entry
let entry = MemoryEntry::new("Important note");
let id = memory.store(entry).await?;
// Retrieve by ID
if let Some(entry) = memory.get(&id).await? {
println!("Content: {}", entry.content);
}See the Memory Backends README for detailed documentation on each backend.
Re-exports§
pub use backends::in_memory::InMemoryBackend;