Skip to main content

DreamStore

Trait DreamStore 

Source
pub trait DreamStore: Send + Sync {
    // Required methods
    fn upsert<'life0, 'life1, 'async_trait>(
        &'life0 self,
        agent_id: &'life1 str,
        record: MemoryRecord,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn search<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        agent_id: &'life1 str,
        query: &'life2 MemoryQuery,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryRecall>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn save_session<'life0, 'async_trait>(
        &'life0 self,
        data: SessionData,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Durable-memory host storage. upsert is the only mutation and is called only after the kernel’s WriteMemory gate accepts the record.

Required Methods§

Source

fn upsert<'life0, 'life1, 'async_trait>( &'life0 self, agent_id: &'life1 str, record: MemoryRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn search<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, agent_id: &'life1 str, query: &'life2 MemoryQuery, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryRecall>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Semantic search over the agent’s long-term memories. Called on demand during a session when the LLM invokes the memory meta-tool.

Source

fn save_session<'life0, 'async_trait>( &'life0 self, data: SessionData, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Persist a completed session before the runner’s one extraction pass.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§