Skip to main content

Module memory

Module memory 

Source
Expand description

Vector memory layer — semantic storage and retrieval of agent memories.

This module provides two traits:

§Default (no extra features)

NoopEmbedding and NoopVectorStore are always available and provide backward-compatible keyword search without any new dependencies.

§OpenAI embeddings (openai-embedding feature)

[OpenAiEmbedding] calls the OpenAI text-embedding-3-small endpoint. Reuses the existing RECURSIVE_API_KEY / RECURSIVE_API_BASE env vars.

§SQLite vector store (vector-memory feature)

[SqliteVecStore] persists vectors in a per-workspace SQLite database. Cosine similarity is computed in Rust (linear scan over stored BLOBs), requiring no native extension and no C compiler beyond the bundled SQLite.

Re-exports§

pub use noop::NoopEmbedding;
pub use noop::NoopVectorStore;

Modules§

noop
No-op / fallback implementations of EmbeddingProvider and VectorStore.

Structs§

MemoryEntry
A single memory fragment that can be stored and retrieved.

Traits§

EmbeddingProvider
Converts text into a dense embedding vector.
VectorStore
Persistent store for MemoryEntry items with optional semantic search.