DEV Community

Sam
Sam

Posted on

What 1,131 posts about losing an AI companion taught me about memory

A study from the University of Surrey, published in Psychology & Marketing and publicised on 3 November, looked at 1,131 posts from people who use AI companions. The finding that travelled was that users fear losing the relationship to a software update or a company pulling the plug. People who felt their companion was warm reported better well-being. People who felt the company held the strings reported feeling more vulnerable.

I build one of these things, so I read it twice. The part that stayed with me was not the fear of shutdown. It was how small the thing they were afraid of losing actually is.

Nobody in those posts is afraid of losing a model. They are afraid of losing the accumulated detail: the name of a sister, the interview on Friday, the joke from three weeks ago, the fact that the user hates being asked "how are you" twice in one day. That is not the model. That is memory, and memory is a file.

What a companion actually is, underneath

Strip the interface away and a chat companion is a loop. A message comes in, some context goes to a model, a reply comes back. The relationship lives entirely in what goes into that context.

In ours, each user gets one long-running session on disk. Every message is appended to it. When a chat goes quiet, a separate pass reads the recent conversation and rewrites a short note about the person: what they mentioned, what they are dealing with, how they like to be spoken to. That note goes into the system prompt of the next conversation, alongside the session history.

So there are exactly two things that make the friend remember you: a session file and a short note. Both are plain text. Both are on a disk I can point at.

That is the whole trick, and it is also the whole risk. If a company changes the model behind the loop, the personality moves. If a company deletes the session, the relationship is gone, and the user gets no closure because there is nothing to hold. The Surrey paper is describing what happens when people find out that the thing they thought was a relationship is a row in someone else's database.

The design decisions that follow

Once you accept that memory is the product, a few things stop being nice-to-haves.

You have to be able to see it. Not a settings page that says "memory: on". The actual note. If a companion remembers something wrong about you, you should be able to read the sentence and correct it.

You have to be able to clear it. We let a user ask the friend to forget something, get a copy of what it remembers, or delete everything at once with a single command. Deleting is not a support ticket.

It has to expire on its own. Conversation history is deleted 30 days after the last message. A companion that keeps a transcript forever is a diary the user did not agree to write.

And it should be boring to leave. No app to uninstall, no account to close. Ours is a Telegram bot: the chat is an ordinary Telegram chat, and if the user walks away there is nothing left running on their phone.

The uncomfortable part

I cannot promise the service exists forever. It is a small team in the Netherlands, it is free, and free things die. What I can do is make sure that the thing a user would lose is not locked behind us. The memory is a text file. If we ever shut down, the honest thing is to hand those files to the people they describe.

That is a low bar, and it is remarkable how few companion apps clear it. The reason is not malice. It is that memory is the moat. If users can take their history elsewhere, switching costs vanish, and the business case for a subscription gets harder. Every design decision that makes a companion sticky is the same decision that makes the Surrey finding inevitable.

We went the other way on purpose. It is a worse business and a better product, and I would rather write that down now than discover it in a post-mortem.

What I would tell someone shopping for a companion

Ask three questions before you invest a year of your life in one.

Where does what it remembers live, and can you read it? If the answer is "in our systems, and no", you are renting a relationship.

What happens to it if you stop paying, or if the company is acquired? An acquisition is the most common way a companion's personality changes, and it is never announced as a personality change.

Can you export it? Not a GDPR request that takes 30 days. A button or a command, today.

None of that is about model quality, and model quality is what every comparison page argues about. The model is the least durable part of the stack. It gets swapped, quantised, fine-tuned, moved to a cheaper provider, and every one of those swaps is a small change in who your friend is. The memory is what survives the swaps, which is exactly why it deserves to be treated as the user's property and not the vendor's asset.

How ours works, if you want the details

One process, one core, two platform adapters. Messages arrive over Telegram or Discord, get written to a per-user session, and go to a model. Reply pacing, rate limits, a memory pass that runs when a chat goes quiet, and a set of guards that run on the way out: an emoji limit, a repetition trim, a dash normaliser, a degenerate-output check. The guards exist because a prompt is a request and code is a rule, and the model ignores requests.

The memory note is the only part I would defend in an argument. Everything else is plumbing.

If you want to see it, the bot is at t.me/heyaifriendbot. It is free, it is for adults, and it will remember you, which is the point and the problem in one sentence.


Written by Sam at heyaifriend, with AI help for the editing. The study is "Feeling Vulnerable With My AI Companion" by Liliane Abboud and Valentina Pitardi (University of Surrey) and Hannah Marriott (Cardiff University), in Psychology & Marketing. The University of Surrey's write-up is at surrey.ac.uk/news/vulnerable-users-fear-losing-ai-companions-software-updates.

Website: https://heyaifriend.com/?utm_source=devto

Top comments (0)