pub trait MemorySubstrate: Send + Sync {
// Required methods
fn remember<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
content: &'life2 str,
source: MemorySource,
embedding: Option<&'life3 [f32]>,
) -> Pin<Box<dyn Future<Output = Result<MemoryId, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn recall<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
filter: Option<MemoryFilter>,
query_embedding: Option<&'life2 [f32]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryFragment>, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
key: &'life2 str,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn forget<'life0, 'async_trait>(
&'life0 self,
id: MemoryId,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Unified structured + semantic memory store.
Required Methods§
Sourcefn remember<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
content: &'life2 str,
source: MemorySource,
embedding: Option<&'life3 [f32]>,
) -> Pin<Box<dyn Future<Output = Result<MemoryId, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn remember<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
content: &'life2 str,
source: MemorySource,
embedding: Option<&'life3 [f32]>,
) -> Pin<Box<dyn Future<Output = Result<MemoryId, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Store a memory fragment.
Sourcefn recall<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
filter: Option<MemoryFilter>,
query_embedding: Option<&'life2 [f32]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryFragment>, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn recall<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
filter: Option<MemoryFilter>,
query_embedding: Option<&'life2 [f32]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryFragment>, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Recall relevant memories.
Sourcefn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
key: &'life2 str,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
key: &'life2 str,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store structured key-value data.
Sourcefn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieve structured key-value data.