AI companion memory works in layers. The language model only sees a limited block of text each time it replies, so apps create long-term memory by filling that block with the most useful material: your last few messages word for word, a running summary of older ones, and a short list of saved facts about you. How well a companion remembers you depends mostly on how the app chooses those facts.
Why doesn’t the AI just remember everything you said? #
A language model keeps nothing between replies. Every time you send a message, the app builds a fresh prompt: the character’s instructions, whatever it has stored about you, the recent chat, and your new line. The model reads all of it, writes a reply, and discards it. On your next message the app builds the prompt again.
That prompt has a size limit, measured in tokens. A token is a chunk of text, roughly three-quarters of an English word on average. Large cloud models accept very long prompts, but long prompts are slower and more expensive, and models don’t use them evenly. A 2023 study from Stanford and collaborators, Lost in the Middle, found that models do best when the relevant detail sits at the start or end of a long input and noticeably worse when it’s buried in the middle. So pasting a months-long transcript into every prompt doesn’t give you good recall, even when the window is big enough to hold it.
On a phone the limit is tighter still, because the model has to fit in the device’s memory. That pushes on-device apps to be even more selective about what goes in.
The four layers of AI companion memory #
Most companion apps combine some version of these four layers:
| Layer | What it holds | Strength | Weakness |
|---|---|---|---|
| Recent messages | The last several turns, word for word | Exact wording and tone | Small, and it scrolls away |
| Rolling summary | A compressed “story so far” | Cheap way to keep the plot | Loses detail, can drift |
| Saved facts | Your name, likes, events, sensitive topics | Survives indefinitely | Only as good as extraction and retrieval |
| Relationship state | Mood, trust, closeness, current storyline | Keeps the feeling consistent | Often hidden from you |
Short-term memory: the recent message window #
The last handful of messages go into every prompt unchanged. This is why a companion answers well to what you said thirty seconds ago and badly to what you said last week. When the window fills, the oldest messages drop off the end.
The rolling summary #
Before old messages fall out of the window, many apps ask the model to condense them into a paragraph or two: “They met at the gallery, argued about the painting, made up over coffee.” That summary rides along in future prompts. Summaries are good at plot and bad at specifics. Your sister’s name is exactly the kind of detail a summary drops.
Long-term memory: extracted facts #
This is the layer that makes a companion feel like it knows you. After each exchange, a background step reads the recent messages and pulls out durable facts (“works night shifts”, “has a dog named Mochi”, “nervous about a job interview on Friday”). Each fact is stored separately, often with a type and an importance score.
Storing facts is only half the job. On every reply the app has to decide which facts to include, because it can’t include all of them. Common approaches:
- Pinned or high-importance facts go in every time. Your name belongs here.
- Relevance matching picks facts related to what you just said. Some apps use embeddings (numeric representations of meaning), which can match “my pup” to “has a dog”. Others use keyword overlap, which is simpler and faster but needs shared words.
- Recency gives a small boost to facts that came up recently.
Relationship state #
Companion apps also track a few numbers and labels about the relationship itself: the character’s current mood, how much they trust you, how close you’ve become, and what’s happening in the story right now. This state is what stops a character from greeting you like a stranger after fifty conversations.
Where AI companion memory goes wrong #
When a companion “forgets”, one of these usually happened:
- Nothing was saved. The extraction step decided your comment wasn’t worth keeping. Small models miss more.
- The wrong thing was saved. The model recorded the character’s detail as yours, or turned a joke into a fact.
- The fact wasn’t retrieved. It’s in storage, but it didn’t match what you just said closely enough to make the cut for this reply.
- The summary drifted. Repeated summarizing can blur or invent details over time.
- You can’t see any of it. If an app hides its memory, you can’t tell which of the above happened, and you can’t fix it.
We go deeper on each failure in why AI chatbots forget things.
How Xin handles memory #
Xin is built around this problem, and its approach is a useful concrete example. The last 12 messages stay word for word. After each exchange, a background pass (the chat header briefly reads “remembering…”) pulls out up to five new facts and files each one under About you, Likes & dislikes, Milestones, Handle with care, or Your story, with an importance weight. Older messages get rolled into a summary, and the character’s mood, trust, closeness and current storyline are updated.
Each reply is then built from the character’s persona, that relationship state, the summary, up to 10 pinned or high-importance facts, and up to 6 more facts chosen by how many words they share with your last message, their importance, and how recently they came up. There’s one memory per companion, shared across every chat thread you start with them. A memory journal shows every saved fact, and you can pin, edit, delete or add one yourself. Facts you add are pinned automatically.
All of it lives in a local database on your phone, and the model runs on the device too, so none of this memory is sent to a server.
Two honest limits. Retrieval in Xin matches words rather than meaning, so a fact that shares no words with what you just said may not surface unless it’s pinned or marked important. And the free model, Xin Core, is a 1.3 GB download that’s smaller than the optional VIP models, so it misses more facts during extraction. Pinning the things you care about covers most of that gap.
How to check what your AI companion remembers #
- Open the memory panel if the app has one. This is the only reliable view. Anything else is the model’s guess.
- Don’t trust “what do you remember about me?” A model will happily produce a confident answer built from the current chat, including made-up details.
- Test after a gap. Mention a specific fact, chat about other things for 20 or 30 messages, then refer to it indirectly and see if it comes back.
- Pin what matters. Your name, your pronouns, and the two or three things you’d be annoyed to repeat.
- Correct wrong facts at the source. Arguing with the character in chat rarely overwrites a bad memory. Editing the saved fact does.
For practical tips on getting a companion to keep the right things, see how to make an AI chatbot remember you. If you want something gone, how to make an AI chatbot forget something covers deletion.
Frequently asked questions #
Do AI companions remember past conversations? #
Most remember a summary and a set of saved facts rather than the full conversation. The exact wording of older messages usually isn’t kept in the prompt. Apps that show you a memory list make it easy to see what carried over.
Why did my AI companion forget my name? #
Either the fact was never saved, or it wasn’t selected for that reply. Names should be pinned so they’re included every time. If the app lets you set a display name in your profile, use that too, because it’s usually injected into every prompt separately from memory.
Is AI companion memory stored on a server? #
For most cloud-based apps, yes: memories are stored with your account on the company’s servers. On-device apps keep them on your phone. Check the app’s privacy policy, and our guide to what data AI chat apps collect, before you share anything personal.
How many messages can an AI companion remember word for word? #
It varies by app and model, from a handful to a few dozen recent messages. Past that point, the companion relies on summaries and saved facts. A bigger model or longer window helps, but good fact selection matters more than raw window size.