ceylon-memory 0.1.2

Memory backend implementations for the Ceylon agent mesh framework
Documentation

Ceylon Memory

Memory backend implementations for agent state persistence.

This crate provides pluggable storage backends implementing the [ceylon_core::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_memory::InMemoryBackend;
use ceylon_core::{Memory, MemoryEntry, MemoryQuery};

# async fn example() -> anyhow::Result<()> {
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);
}
# Ok(())
# }