How AI Companion Memory Works: Context Windows, Summaries, Retrieval and Profiles
On this page
The 4 layers of AI memory
| Layer | What it holds | Strength | Weakness |
|---|---|---|---|
| 1. Context window | The last chunk of conversation, read directly | Perfect recall of recent turns | Limited size; old messages fall out |
| 2. Rolling summary | Condensed notes on older conversation | Keeps the story’s gist | Loses specific details |
| 3. Retrieval (RAG) | A searchable store of saved memories | Can recall specific facts from long ago | Can fetch the wrong memory at the wrong time |
| 4. Profile | Stable facts: name, job, preferences, boundaries | Always available | Must be kept up to date and correctable |
Most apps use only layer 1, or layers 1 and 2. Apps built around memory, such as ChatBrat, add saved memories you can see and remove, which ChatBrat shows in a memory panel with a per-fact Forget control.
What it looks like in practice
In a published 100-turn memory test, facts were planted before turn 10 and asked for after turn 80, well outside a 20-turn window. ChatBrat recalled the user’s name, job, city and a rescheduled wedding; Character.AI lost the city and the wedding. Both struggled with restraint, knowing when not to press on a painful topic. That shows why storing facts is the easy half of memory.
What “humanistic” adds
Humanistic memory is about judgment on top of storage:
- Importance: a job interview beats what you had for lunch.
- Emotion: hard moments are remembered with care, not as trivia.
- Fading: small details decay instead of crowding recall.
- Timing: memories surface when relevant, not as recitations.
- Control: you can see, correct and delete what’s kept.
How to tell which layers an app uses
- Chat past ~50 messages, then ask about something from the start (tests layers 1 and 2).
- Start a new chat and ask again (tests layers 3 and 4).
- Look for a memory page you can edit (a sign of layer 4 with user control).
- Delete a memory and check that it’s gone (tests control).
Full checklist: the 10-minute memory test. Related: why AI companions forget · do AI chatbots remember your conversations?
Frequently asked questions
What is a context window in AI chat?
The amount of recent text the model can read at once. It acts like short-term memory: once a chat is longer than the window, the oldest messages are no longer seen unless the app stores and re-inserts them.
What is RAG memory?
Retrieval-augmented generation: the app stores memories, searches them for the ones relevant to your latest message, and adds those to what the model reads before it replies.
Why does AI memory sometimes bring up the wrong thing?
Retrieval can match on surface words instead of meaning, or surface sensitive details at the wrong time. Good memory systems weight importance and know when to hold back, which is the hardest part to get right.