Embeddings Memory Backend
The embeddings backend stores memories as vector embeddings, enabling semantic similarity search. This is the most powerful recall mechanism, allowing agents to find contextually relevant memories even when exact keywords do not match.
Overview
The embeddings backend:
- Converts memory text into dense vector representations
- Stores vectors in a local or remote vector database
- Retrieves memories by cosine similarity to the current query
- Supports multiple embedding providers (Ollama, OpenAI, etc.)
How It Works
- When a memory is stored, its text is sent to an embedding model
- The resulting vector is stored alongside the original text
- During recall, the current context is embedded and compared against stored vectors
- The top-K most similar memories are returned
Configuration
toml
[memory]
backend = "embeddings"
[memory.embeddings]
provider = "ollama"
model = "nomic-embed-text"
dimension = 768
top_k = 10
similarity_threshold = 0.5
[memory.embeddings.store]
type = "sqlite-vec" # or "pgvector"
path = "~/.local/share/openprx/embeddings.db"1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
Supported Embedding Providers
| Provider | Model | Dimensions |
|---|---|---|
| Ollama | nomic-embed-text | 768 |
| OpenAI | text-embedding-3-small | 1536 |
| OpenAI | text-embedding-3-large | 3072 |