Memory structure
| Field | Type | Description |
|---|---|---|
id | string | Unique memory ID (UUID) |
content | string | The memory text — this is what gets embedded and searched |
user_id | string | Owner of this memory, for multi-user isolation |
tier | integer | Storage tier (0–3), controls priority and retention |
type | string | fact, preference, context, or custom |
tags | array | Filterable labels |
metadata | object | Arbitrary key-value data |
score | float | Relevance score (only in search results) |
Memory types
- fact — Objective information: “User’s company is Acme Corp”
- preference — User choices: “Prefers concise responses”
- context — Situational: “Currently working on Q1 budget”
- custom — Any string you define
Embedding & search
When you store a memory, Velixar generates a vector embedding of thecontent field. Search queries are also embedded, and results are ranked by cosine similarity.
This means you search by meaning, not keywords:
- Query: “what color does the user like?” → matches “User’s favorite color is blue”
- Query: “display settings” → matches “User prefers dark mode”