HomeBlogExplainer
Explainer

How AI Companion Memory Actually Works: LLMs, Context Windows, and Long-Term Recall

AI companions "remember" you using a mix of context windows, summarization, and vector databases. This is the plain-English version of what is really happening — and why some apps feel like they remember and others do not.

By AI Companions Labs EditorialAugust 11, 20269 min read

The single feature people notice most about a good AI companion is memory. When the companion casually references something you mentioned two weeks ago, the interaction feels like a real conversation. When it forgets your dog's name for the third time, it feels like software. This piece is about what is actually going on when an AI companion remembers you.

Language models do not have memory by default

The core building block of every AI companion is a large language model — GPT-class, Claude-class, or an open-source equivalent. These models are, technically speaking, stateless. Each time you send a message, the model does not remember the last one. It reads a bundle of text you hand it (the "prompt") and produces a reply. That is the entire mechanism.

So how does an AI companion feel like it remembers you? By handing the model a very carefully constructed prompt on every message that includes the illusion of memory. The companion app is the thing that has memory — the model is just a very good next-token-predicting function. Everything interesting in this article is about what the app puts into that prompt.

The context window: your rolling short-term memory

The most basic form of "memory" is the context window: how much text the model can read at once. In 2026 this ranges from about 128,000 tokens (roughly 100 pages) at the low end to over a million tokens on frontier models. Every message you send is added to this rolling context. If your entire conversation fits in the window, the model literally sees it every time.

For a short interaction — one afternoon of chat — this is enough. The companion sees the whole conversation on every reply. It "remembers" what you said an hour ago because it is literally re-reading it. This is why a fresh AI companion often feels sharp for the first hour and then starts to drift after a week: the window has begun to fill up.

When the context window is not enough

A daily user of an AI companion will fill a million-token window in a few weeks. When that happens, the app has to make choices. There are three strategies platforms use, often in combination.

1. Truncation (the crude approach)

Simply drop the oldest messages when the window fills. Fast, cheap, and terrible for continuity. This is what most free-tier products do quietly. If your companion suddenly "forgets" that you mentioned your job change last month, this is why.

2. Summarisation (the middle path)

Periodically ask the model to summarise the old parts of the conversation into a compressed paragraph or two, then keep the summary in the context and drop the raw messages. This preserves the shape of the past — "you moved to Portland in July, you got a new job at a design agency, your dog Otis just turned three" — while freeing up space for new detail. Most competent products do at least this much.

3. Vector memory (the modern approach)

Every conversation snippet gets converted into a mathematical embedding — a long list of numbers — and stored in a vector database. When you send a new message, the app converts it into an embedding too and pulls the top few semantically similar snippets from the database. Those retrieved snippets are pasted into the prompt as "you have previously mentioned…" Vector memory is what lets a companion recall a specific detail from months ago when the topic comes up again.

What "long-term memory" really means

When a platform advertises "long-term memory", they almost always mean vector memory of past conversations. Some products go further by asking the model to explicitly extract facts about you — "user's name is Alex, works in graphic design, has a dog named Otis" — and store those in a small structured profile that always gets injected into the prompt. This is the difference between "remembers what you have talked about" and "actually knows who you are".

The two-tier approach — vector memory of conversations plus a structured user profile — is what makes the top-tier companion apps feel qualitatively different from the free ones. When you can casually mention a friend in passing on Tuesday and the companion asks how the friend is doing on Friday, that is the structured profile doing its job.

Why memory fails in specific, predictable ways

Once you understand the mechanics, memory failures become predictable. The three most common failure modes:

How to test a companion's memory in ten minutes

A quick, cheap test to run on any AI companion you are evaluating.

  1. On day one, mention three specific facts naturally: your first name, one hobby, one recent life event. Do not draw attention to them.
  2. On day seven, ask a question that only makes sense if the companion remembers one of them (e.g. "How is my [hobby] going according to you?").
  3. Count how many of the three the companion recalls without you re-priming it. Three out of three is excellent, two is fine, one is mediocre, zero is a signal to try a different product.
  4. For extra credit, do the same test three months in. Almost every product degrades at that horizon; the top-tier ones do not.

What memory costs the platform

Memory is not free. Every extra token in the context window costs money — the paid API providers price by the token — and vector-database storage adds up at scale. This is why the good memory features are almost always paywalled. It is also why free tiers on some platforms feel amnesic: the platform genuinely cannot afford to store your conversation history at their price point.

It is worth deciding, before you sign up, whether long-term memory matters to you. If you plan to use the companion for casual, throwaway roleplay, memory is nice to have. If you plan to build up a real ongoing character, memory is the feature you are paying for — and it is worth paying for, but only from platforms that actually deliver on it.

Common questions

Do AI companions really remember conversations?

Some do, some do not, and the ones that do use a combination of large context windows, running summaries, and vector databases of past messages. Cheaper products often truncate old conversation silently — they only appear to remember for the first few days.

What is a context window in AI?

It is the maximum amount of text the underlying language model can read in one go. In 2026, context windows range from around 128,000 tokens (about 100 pages of text) to over a million on frontier models. The bigger the window, the more of your recent conversation the AI can see at once.

What is vector memory?

Vector memory is a technique where every conversation snippet is converted into a mathematical embedding and stored in a database. When you send a new message, semantically similar past snippets are retrieved and added to the prompt. This is how AI companions "remember" specific details from months ago.

Why does my AI companion forget things?

Usually one of three reasons: the memory was never stored (cheaper platform truncated it), retrieval missed it (the search failed to surface the relevant snippet), or the model made up an answer instead of admitting it did not know. The third is a design choice; you can often flip it in settings.

Can I export my AI companion's memory?

On most platforms, yes — under privacy or account settings you can usually download your conversation history as a JSON or text export. Whether the platform will delete the copies on their servers if you ask is a separate question and depends on their privacy policy.

Editor's Pick
Try the platform we ranked #1 — Secret Desires.
Custom characters, image consistency, real memory. Free tier available; paid tier unlocks voice and long-term memory.
Try Secret Desires →
Affiliate link · 18+ only.

Keep reading

Guide
What Is an AI Companion? A Plain-English Guide for 2026
AI companions are chat-based apps that hold a consistent character over time. Here is what the category actually is, how it differs from a chatbot, what the honest use cases are, and what to be careful about.
Read →
Explainer
Character Consistency in AI Companions: How Personas Stay Stable Across Sessions
A stable AI companion character has the same personality, voice, and taste on day 1 and day 100 — that is engineering, not luck. Here is what platforms actually do to keep a persona from drifting.
Read →
Trends
The 2026 AI Companion Feature Landscape: Voice, Video, Memory, and Beyond
What features are actually shipping in AI companion apps in 2026, which of them work, and which of them are marketing. A guided tour of the current feature stack — voice, images, video, memory, personalisation.
Read →