Memory
What the agent remembers, what each turn carries, how it finds the rest, and how a finished conversation becomes an episode.
Nestor keeps memories, lasting facts (“Léa is vegetarian”), and episodes, what each past conversation was about, both rebuilt from the journal.


What a turn carries
- The latest 150 memories
- Beyond them, up to 12 the words find
- Their 3 latest conversations
- Up to 4 older ones the words find
- recall finds memories by words and meaning
- recall finds conversations, between two dates if asked
- read_conversation rereads one, word for word
Memories are dated: of two that disagree, the model keeps the later. Episodes are seen only by their participants. Tools reach the rest:
| Tool | Does |
|---|---|
recall |
searches memories and past conversations, between two dates if asked |
read_conversation |
rereads one conversation word for word |
remember |
keeps a memory |
correct_memory |
fixes one |
forget |
drops one |
Finding by words and by meaning
- 1Léa has choir practice every Tuesday evening.
- 2Léa is vegetarian.
- 1Léa is vegetarian.
- 2Hugo cannot stand coriander.
- 1Léa is vegetarian.
- 2Léa has choir practice every Tuesday evening.
- 3Hugo cannot stand coriander.
Words go through SQLite’s full-text index (accents ignored), meaning through an embedding model and
sqlite-vec. Search by meaning is optional: point
memory.embedder at an embedding model.
models:
embed:
type: embedding
provider: openai-compatible
base_url: https://openrouter.ai/api/v1
api_key: ${MODEL_API_KEY}
model: openai/text-embedding-3-small
memory:
embedder: embed
Any OpenAI-compatible embeddings server works, such as llama-server --embeddings. Vectors are
recomputed in the background after a model change.
When a conversation is over
When a conversation ends, the consolidation model writes its episode and keeps the lasting facts the agent missed. After a stop, Nestor catches up at the next start.
Settings
| Setting | Default | What it does |
|---|---|---|
memory.strategy |
both |
recent: the latest only; search: only what the words find |
memory.recent |
150 | memories in the household layer |
memory.found |
12 | memories the words may add beyond them |
memory.recent_episodes |
3 | latest conversations of whoever speaks |
memory.found_episodes |
4 | older conversations their words may add |
memory.embedder |
none | the embedding model, for search by meaning |
memory.query_timeout_s |
1 | seconds to embed a question before searching by words only |
memory.consolidation |
agent.written |
the model that writes episodes |