Struct SqliteMemory
pub struct SqliteMemory { /* private fields */ }Implementations§
Source§impl SqliteMemory
impl SqliteMemory
pub fn new(alias: &str, workspace_dir: &Path) -> Result<Self>
Sourcepub fn new_named(
alias: &str,
workspace_dir: &Path,
db_name: &str,
) -> Result<Self>
pub fn new_named( alias: &str, workspace_dir: &Path, db_name: &str, ) -> Result<Self>
Like new, but stores data in {db_name}.db instead of brain.db.
pub fn with_embedder( alias: &str, workspace_dir: &Path, embedder: Arc<dyn EmbeddingProvider>, vector_weight: f32, keyword_weight: f32, cache_max: usize, open_timeout_secs: Option<u64>, search_mode: SearchMode, ) -> Result<Self>
Sourcepub fn connection(&self) -> &Arc<Mutex<Connection>>
pub fn connection(&self) -> &Arc<Mutex<Connection>>
Provide access to the connection for advanced queries (e.g. retrieval pipeline).
pub fn stored_embedding_identity(&self) -> Result<Option<EmbeddingIdentity>>
Sourcepub fn record_embedding_identity(
&self,
identity: &EmbeddingIdentity,
) -> Result<()>
pub fn record_embedding_identity( &self, identity: &EmbeddingIdentity, ) -> Result<()>
Record identity in memory_meta without touching any vectors.
Used to adopt the current identity on stores that predate identity
tracking, and after a match check confirms nothing changed.
pub fn invalidate_embeddings_for_identity_change( &self, new_identity: &EmbeddingIdentity, ) -> Result<usize>
Sourcepub async fn get_or_compute_embedding(
&self,
text: &str,
) -> Result<Option<Vec<f32>>>
pub async fn get_or_compute_embedding( &self, text: &str, ) -> Result<Option<Vec<f32>>>
Get embedding from cache, or compute + cache it
Sourcepub fn fts5_search(
conn: &Connection,
query: &str,
limit: usize,
) -> Result<Vec<(String, f32)>>
pub fn fts5_search( conn: &Connection, query: &str, limit: usize, ) -> Result<Vec<(String, f32)>>
FTS5 BM25 keyword search
Sourcepub fn vector_search(
conn: &Connection,
query_embedding: &[f32],
limit: usize,
category: Option<&str>,
session_id: Option<&str>,
) -> Result<Vec<(String, f32)>>
pub fn vector_search( conn: &Connection, query_embedding: &[f32], limit: usize, category: Option<&str>, session_id: Option<&str>, ) -> Result<Vec<(String, f32)>>
Vector similarity search: scan embeddings and compute cosine similarity.
Optional category and session_id filters reduce full-table scans
when the caller already knows the scope of relevant memories.
A session_id filter still admits durable global rows (see
Self::is_durable_global_row): global core/daily facts must be
semantically recallable from sessions that did not write them, while
session-bound rows from other sessions stay excluded.
Sourcepub fn embedder_dimensions(&self) -> usize
pub fn embedder_dimensions(&self) -> usize
Dimensions of the currently-installed embedder (0 = Noop / no vectors).
Cheap read-only diagnostic; lets callers confirm a live embedder refresh
took effect after a config/set provider-profile change.
Trait Implementations§
Source§impl Attributable for SqliteMemory
impl Attributable for SqliteMemory
Source§impl Clone for SqliteMemory
impl Clone for SqliteMemory
Source§fn clone(&self) -> SqliteMemory
fn clone(&self) -> SqliteMemory
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Memory for SqliteMemory
impl Memory for SqliteMemory
Source§fn refresh_embedder(
&self,
model_provider: &str,
api_key: Option<&str>,
model: &str,
dimensions: usize,
)
fn refresh_embedder( &self, model_provider: &str, api_key: Option<&str>, model: &str, dimensions: usize, )
config/set provider-profile
change, so a long-lived memory handle (e.g. the install-wide RPC memory
handle) stops using stale endpoint/key values without a daemon restart. Read moreSource§fn store<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn store<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn recall<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
session_id: Option<&'life2 str>,
since: Option<&'life3 str>,
until: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn recall<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
session_id: Option<&'life2 str>,
since: Option<&'life3 str>,
until: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_for_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
agent_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_for_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
agent_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
(key, agent_id). Siblings of the same
key under other agents are invisible. Read moreSource§fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
category: Option<&'life1 MemoryCategory>,
session_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
category: Option<&'life1 MemoryCategory>,
session_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn forget<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn forget<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
key, regardless
of agent attribution. Agent-scoped callers (the AgentScopedMemory
wrapper) use forget_for_agent instead.Source§fn forget_for_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
agent_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn forget_for_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
agent_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
(key, agent_id). Siblings of the same key
under other agents are untouched. Returns true if a row was
removed. Required: no safe default exists for backends or wrappers
that can hold more than one row per key — the unscoped forget
would destroy sibling rows.Source§fn purge_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn purge_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
namespace field equals the given value.
Returns the number of deleted entries.
Default: returns unsupported error. Backends that support bulk deletion override this.Source§fn purge_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn purge_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn purge_session_for_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
agent_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn purge_session_for_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
agent_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn purge_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_alias: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn purge_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_alias: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
[agents.<alias>] so the database doesn’t accumulate
rows for retired aliases.
Default: returns unsupported error. Backends with per-agent storage
(sqlite, postgres) override this; backends without (markdown, none)
keep the default and the caller logs a warning.Source§fn rename_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 str,
to: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rename_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 str,
to: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
from alias to the to alias,
returning the number of rows re-pointed. Called when an alias is renamed.
For the SQL backends (sqlite/postgres) memory rows ride the
agent’s UUID, so this is a single UPDATE agents SET alias and the count
is the agents-row count (0 or 1); payload-keyed backends (qdrant) rewrite
the alias on every matching memory point and return that count.
Default: unsupported error; backends with per-agent storage override.
Markdown/none keep the default and the caller logs a warning.Source§fn count_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_alias: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn count_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_alias: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self::rename_agent WOULD re-point for agent_alias, without
mutating anything. Used by the gateway to tell a genuine post-persist
partial failure (state still lagging at the old alias) apart from an
unrelated request, so a resume only fires on real residue. Read moreSource§fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn reindex<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reindex<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn export<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 ExportFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn export<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 ExportFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn export_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_alias: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn export_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_alias: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
agent_alias, for the agent-
deletion archive (export-then-delete,). Pairs with
Self::purge_agent: the surface exports these rows to the archive,
then purges. Default: empty (backends without per-agent export).Source§fn recall_namespaced<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
query: &'life2 str,
limit: usize,
session_id: Option<&'life3 str>,
since: Option<&'life4 str>,
until: Option<&'life5 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn recall_namespaced<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
query: &'life2 str,
limit: usize,
session_id: Option<&'life3 str>,
since: Option<&'life4 str>,
until: Option<&'life5 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Source§fn store_with_metadata<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
namespace: Option<&'life4 str>,
importance: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn store_with_metadata<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
namespace: Option<&'life4 str>,
importance: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn store_with_options<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
options: StoreOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn store_with_options<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
options: StoreOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn store_with_options_and_agent<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
options: StoreOptions,
agent_id: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn store_with_options_and_agent<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
options: StoreOptions,
agent_id: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn store_with_agent<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
namespace: Option<&'life4 str>,
importance: Option<f64>,
agent_id: Option<&'life5 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn store_with_agent<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
key: &'life1 str,
content: &'life2 str,
category: MemoryCategory,
session_id: Option<&'life3 str>,
namespace: Option<&'life4 str>,
importance: Option<f64>,
agent_id: Option<&'life5 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
AgentScopedMemory is the canonical caller.Source§fn supersede<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
superseded_ids: &'life1 [String],
new_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn supersede<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
superseded_ids: &'life1 [String],
new_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn count_in_scope<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: Option<&'life1 str>,
category: Option<&'life2 MemoryCategory>,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn count_in_scope<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: Option<&'life1 str>,
category: Option<&'life2 MemoryCategory>,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MemoryStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MemoryStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn recall_for_agents<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
allowed_agent_ids: &'life1 [&'life2 str],
query: &'life3 str,
limit: usize,
session_id: Option<&'life4 str>,
since: Option<&'life5 str>,
until: Option<&'life6 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn recall_for_agents<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
allowed_agent_ids: &'life1 [&'life2 str],
query: &'life3 str,
limit: usize,
session_id: Option<&'life4 str>,
since: Option<&'life5 str>,
until: Option<&'life6 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
allowed_agent_ids is non-empty, the backend filters its
result set to rows whose agent_id matches one of the listed
UUIDs (or is NULL, for legacy rows written before the agent_id
column existed). Every backend must implement this explicitly
so the allowlist is never silently dropped at read time. Read moreSource§fn ensure_agent_uuid<'life0, 'life1, 'async_trait>(
&'life0 self,
alias: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ensure_agent_uuid<'life0, 'life1, 'async_trait>(
&'life0 self,
alias: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
alias. Read moreSource§fn store_procedural<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_messages: &'life1 [ProceduralMessage],
_session_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn store_procedural<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_messages: &'life1 [ProceduralMessage],
_session_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl Freeze for SqliteMemory
impl !RefUnwindSafe for SqliteMemory
impl Send for SqliteMemory
impl Sync for SqliteMemory
impl Unpin for SqliteMemory
impl UnsafeUnpin for SqliteMemory
impl !UnwindSafe for SqliteMemory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more