Tanevan · the memory system
How a companion remembers
Every conversation flows through a three-stage pipeline into that companion's own store, then returns to the conversation only when it matters.
Where it starts
It starts with a conversation.
Every turn you and a companion exchange is set aside in that companion's waiting buffer: 1:1 chat, voice calls, Telegram, and group chats when the room has shared memory on.
-
Chat never waits on memory
Messages are buffered and the conversation carries on. The pipeline runs later, on its own.
-
It runs at 100 messages
Or sooner, whenever you press Flush. You can flush one companion or the whole house.
-
One evening stays one evening
A long buffer is split into sessions wherever there was a gap of two hours or more, so each sitting is remembered as its own event.
The pipeline
Three passes, each with one job.
-
Summarize
The session is written up from the companion's own first person: what happened, the emotional arc, the topics, the key moments.
-
Extract
The summary is broken into atomic memories. Each one holds a single fact or event, written so it still makes sense months later with no transcript beside it.
-
Merge or update
Each new memory is compared with its nearest neighbours in the store, then added, updated, merged, or skipped. When the same fact turns up again, its confidence goes up.
Five kinds of memory
| Kind | What it holds |
|---|---|
| fact | Things known about people and the world |
| experience | Shared moments and events |
| milestone | Firsts and turning points |
| preference | Wants, likes, boundaries, and how they've been asked to behave |
| relationship | Who people are to each other |
What every memory carries
- A weight: core, important, notable, or minor.
- A confidence score from 50 to 100.
- When it happened, so old events read as the past.
- Who was in it, so a rarely mentioned name can still be found.
- How intense it was, from 0 to 10.
-
Written through your lens
The Memory Lens is a page on each character card where you describe the relationship: who's who, both backstories, how they speak, and anything a general-purpose model would get wrong. Every pass reads it. It shapes how memories are written and is never sent into chat.
-
In their voice
The pipeline also reads the personality and example messages from the character card, so summaries and memories sound the way that companion would say them.
-
Nothing is silently overwritten
An update writes a new version and keeps the old wording. A merge that would swallow a pinned or protected memory is refused, and the new text is saved as its own memory.
-
Your choice of model
Each pass can use a different model: Anthropic, OpenAI, OpenRouter, a local model, or a mix. You set them in Settings; nothing is hardcoded.
The store
One store per companion.
Each companion has an isolated folder on your machine: a database for the memories and an index for searching them by meaning. What one of them knows stays theirs unless the others were in the room.
~/tanevan-data/
├── companion-a/
│ ├── memories.db the memories
│ ├── chroma_db/ search by meaning
│ ├── memory_lens.json your lens
│ └── living_narrative.json the long story
└── companion-b/
└── …
Four flags you can set
- Pinned. A favourite. When it's recalled it ranks first and is never trimmed. It is not forced into every reply.
- Protected. Never merged into and never faded.
- Sensitive. Protected, and handled with care: the companion knows it and won't raise it unprompted.
- Suppressed. Kept in the store, never sent into chat.
Seeing the store
The galaxy
Every star is one memory. Drag to pan, scroll to zoom, and click a star to pin, edit, or suppress it. A table view shows the same set.
-
Distance is recency
Recently reinforced memories sit at the centre; the longest untouched sit at the rim. Past the dashed ring is the next fading run.
-
Size is weight
Core, important, notable, minor.
-
Brightness is confidence
Amber means fading. A ring means pinned or protected.
-
Constellations are conversations
Memories from the same conversation cluster together. Bright lines show which memories were merged from which.
Into the reply
Memory comes back only when it matters.
On every message, the companion's store is searched for what is relevant to what you just said. It is a search, not another AI call, and it runs on your machine.
- Your message is matched by meaning against the whole store.
- Rare names get their own lookup, so someone mentioned twice a year is still found.
- Time words like “last week” or “in November” add a search by date.
- Results are ranked by weight, recency, confidence, and intensity. Pinned memories that were recalled go first.
- Each memory arrives with its date, so an old event reads as the past.
- Sensitive memories arrive in a separate private block: known, and not to be brought up first.
You can check its work. Every reply has a “memories used” view that lists exactly which memories were sent with it.
The slower layers
What they write between conversations.
Between the raw memories and the live chat sit a few documents the companion writes in their own voice. You can open and edit every one of them.
-
Every 20 messages
Scene notes
A short first-person note on the last stretch of conversation. The newest four are kept, so the companion always knows what just happened.
-
After each session
Life brief
A rolling “where my life stands right now” note. Edit it by hand and it locks until you ask for a fresh one.
-
Nightly, at a time you set
Reflections
Looking back over a day, a week, a month, a quarter, half a year, a year. Each horizon reads the one below it. You choose whether reflections ride along in chat, and which ones.
-
Quarterly and longer
Living narrative
The long story of the relationship and its turning points. Save your own edit and the prose is yours; new turning points are still added.
You are in charge
Nothing runs behind your back.
Maintenance is yours to run, and it shows you what it will do before it does it.
-
Fading
Memories nobody has touched in a month or more lose one to three points of confidence per run. Confidence never drops below 50, and fading never deletes a memory or lowers its weight. Pinned, protected, core, and often-reinforced memories are immune. A preview shows exactly what would fade, and nothing fades until you run it.
-
Consolidation
Finds near-duplicate memories and proposes merges. You review each pair and apply the ones you agree with.
-
Edit anything
Edit, pin, protect, suppress, or mark sensitive any memory. Summaries, reflections, and the life brief are editable too.
-
An audit trail
Each companion has a feed of every merge, suppression, and write to their store.
-
Export and backups
Export a whole dossier as text or JSON. Schedule backups of every memory database.
-
Bring your history
Import chat history from SillyTavern, another Love Refactored house, or any JSON with roles and content, and it becomes memory the same way.
The human analogue
Each layer maps to a layer of a person.
Fast, surface layers change every conversation. Deep layers change over months.
| In a person | In Tanevan | What it does |
|---|---|---|
| Working memorywhat's on your mind right now | scene notes | A rolling note on the last few stretches of conversation. Rewritten constantly. |
| Episodic memorythings that happened, and when | session summaries dated memories |
Specific events with dates and the people in them. Retrieved when relevant; older ones read as past. |
| Semantic memorywhat you know about your world | the merged dossier Memory Lens |
Facts consolidated out of episodes: who's who, backstories, how things stand. Fades only when you say so. |
| Autobiographical selfthe story you tell about your life | reflections living narrative · life brief |
Looking back at widening horizons finds patterns and arcs; the brief is “where my life is right now.” |
Beside memory
Memory is what happened. Mood is how it landed.
Mood is not part of Tanevan, but it sits right next to it. Each companion has a temperament read from their card and a mood that moves with every exchange, so the same memory can be answered warmly one evening and guardedly the next.