Guide

How AI agent memory works: what it remembers, where it keeps it, and how to make it forget

Published 4 November 2026 · 14 min read

“Does the AI remember me?” has four honest answers, because an AI agent keeps four different things: facts about you, notes for each group and topic, the history of your chats, and the conversation it is holding right now. We walked our test agent through all four: told it who we are, cleared the conversation, asked it to find an old photo, then told it to forget an address. Below are the layers, the real chat and what each command touches.

“What it keeps, what it lets go”: a woman in a linen shirt takes a blank card from a tall oak card catalogue and drops another into a pale blue box in a bright room

The short answer

An AI agent's memory is several stores with different jobs. Your agent on WAM Agents keeps four: memory about you (facts it carries into every chat), memory of each group and topic, a chat history of the last 180 days of each chat, and the context, the conversation it is holding right now. Facts go into memory on their own or on request, and you change or remove them in plain words. There is no settings screen.

“Forget” works on memory. When we told our test agent “forget my old address”, it replaced the address, and when we checked, it said the old one was gone from memory but still in the chat history, as our own message. That is the right behaviour: the history is a record of what was said, and it is removed together with the account.

Four layers, one picture

Most confusion about AI memory comes from treating it as one thing. Here is what each layer is, where it lives and how long it lasts.

LayerWhat is in itHow long it lastsHow you change it
Memory about youName, work, preferences, people, projects, addressesUntil you change it or delete the account“Remember…”, “update…”, “forget…”
Group and topic memoryDecisions, tasks and notes of one group or forum topicUntil you change it or delete the accountThe same, said inside that topic
Chat historyYour messages, the agent's replies, voice transcripts, file captionsThe last 180 days and up to 1,000 messages per chatDeleted as a whole with the account
ContextThe conversation the model is reading right nowUntil /clear, /compact or automatic compression/clear, /compact, /context

Memory is a set of small text files in a folder inside your own container: an index plus one note per fact, each marked with what it belongs to, you in general, a group or a topic. There is no hidden database behind it. When the agent looks something up, it searches those notes by words, forms of the word included, so “printer” finds “printers”.

The chat history is a separate record kept for each chat. It is what lets the agent find “the photo from last week” or pick up a topic a month later. Photos and voice messages you send are kept as local copies for 24 hours. The transcript of a voice message and the caption stay in the history, and when you ask for an old photo, the agent downloads it again from Telegram.

The context is the working desk. The model reads it on every reply. When it gets long, the agent replaces the older part with a summary. Memory, chat history and files stay as they are.

The test: Maya, five facts and a delivery note

Our reader is Maya, a freelance illustrator in Leeds. She tells the agent a few things about herself, mentions a printer repair in passing, sends a photo of a delivery note, then clears the conversation and checks what survived. Then she moves house and asks the agent to forget the old address.

Maya, her sister, the repair man and the paper order are made up for the test. The agent's replies are real, from our test agent on 2 November 2026, quoted as they came, shortened in places but never added to.

Step 1. Telling it who you are

WAM Agentonline
Hi, I'm Maya. A few things about me worth keeping: I'm a freelance illustrator in Leeds. My address is 22 Oak Lane, Leeds LS6 2AB. I like short replies, no emojis. I'm vegetarian. My sister Ana's birthday is 3 March. And I'm working on a picture book for Fernwood Press, final art due 15 December.14:16✓✓
Noted, Maya. Illustrator in Leeds, vegetarian, short answers with no emojis — and I have Ana's birthday on 3 March and Fernwood Press final art due 15 December.Want me to ping you ahead of either date? Say how many days before and I'll set it.14:16
Message

The reply follows the preference Maya gave a second earlier: short, no emojis. The agent decides on its own what is worth remembering, so “worth keeping” was a hint rather than a command. It saved the facts, read back the ones that matter for planning, and offered reminders for the two dates. The address is not repeated in the chat, yet it went into memory, as the next steps show.

Then something Maya does not ask it to remember.

WAM Agentonline
Separate thing, just so it's written down somewhere: the printer repair guy is Marco, he's coming Thursday at 10, his number is 07700 900123.14:16✓✓
Written down: Marco, printer repair, Thursday 5 November at 10, 07700 900123.Want a nudge Wednesday evening so it isn't a surprise?14:17
Message

It turned “Thursday” into a date, 5 November, which is what makes a note useful a week later. And a photo:

WAM Agentonline
jpgdelivery_note.jpg900 × 1200 · 88 KBHere's the delivery note for my paper order.14:18✓✓
Northpaper Supply, order NP-48213, dated 30 Oct, to your Leeds address. Carrier Parcelline, tracking PL 7731 0294 55GB, expected Wednesday 4 November.Items: hot-press watercolour A3 300gsm, 2 pads; cold-press watercolour A4, 3 pads; masking fluid 100ml, 1. No prices on it, no notes or damage marks.One gap: the cold-press A4 line has no weight given. Worth checking the pack says 300gsm when it arrives.14:18
Message

Every number on the note was read correctly, and the agent matched the delivery address to Maya's: “to your Leeds address”. It also caught a missing detail on the note itself, the paper weight on one line. That is memory and the photo working together.

Step 2. /clear, and what survives it

Now the test that shows the layers. /clear wipes the context, the conversation the model is holding. If memory and the chat history were the same thing as the context, everything would be gone.

WAM Agentonline
/clear14:21✓✓
✓ Context cleared — your next message starts a new topic14:21
Quick check. What do you know about me? And who's coming on Thursday to fix the printer, and at what time?14:22✓✓
Printer — Marco, Thursday 5 November at 10:00 your time. His number is 07700 900123. You asked me to write it down only, so no reminder is set — want one for Wednesday evening or Thursday morning?What I know about you — Maya, freelance illustrator in Leeds, vegetarian, prefers short replies and no emojis. Sister Ana's birthday is 3 March. Work-wise: final art for the Fernwood picture book due 15 December, and the Northpaper order NP-48213 arrives Wednesday, tracking PL 7731 0294 55GB.14:22
Message

Everything came back. The facts about Maya came from memory. Marco and the order came back too, with the phone number and the tracking number, because the agent had written them down and they sit in the chat history as well. The agent even remembered how Maya phrased the request: she asked to write it down only, so no reminder was set.

This is the practical meaning of /clear. Use it when a long conversation has drifted, or when you start something new and want cheaper, more focused replies. It is a clean desk, and your notes stay where they were.

WAM Agentonline
Find the delivery note photo I sent earlier and tell me the tracking number and when it's expected.14:23✓✓
Found it — the delivery note for order NP-48213.Tracking: PL 7731 0294 55GB with Parcelline. Expected delivery: Wednesday 4 November.It covers two A3 300gsm hot-press pads, three A4 cold-press pads and one 100 ml masking fluid.14:24
Message

This is the chat history at work. The agent looks through the history of the chat and the list of files you sent, and if it needs the file itself, it downloads it again from Telegram. It reaches back up to 180 days and up to the last 1,000 messages of each chat, so “the contract I sent in September” is a normal request. The same history is what lets you return to a forum topic after a month and carry on where you left off.

Step 4. “Forget my old address”

Maya moves. This is the sentence people actually type, and the one the plan for this article was built around.

WAM Agentonline
Forget my old address. We moved to 7 Canal Street, Leeds LS2 7HL.14:25✓✓
Updated — your address is now 7 Canal Street, Leeds LS2 7HL, and the old one is gone from what I keep.One thing to watch: the Northpaper delivery note is addressed to the old place, and the courier is due Wednesday. Want me to draft a reroute message to Parcelline with the tracking number and new address?14:25
Message

The agent did the edit and then connected it to something Maya had not mentioned for ten minutes: the paper is on its way to the old address. Forgetting a fact and noticing what that fact touches is exactly what you want from a memory you do not maintain by hand.

Then the honest question: is it really gone?

WAM Agentonline
What's my address now? And is 22 Oak Lane still anywhere: in your memory, in our chat history? Short.14:26✓✓
Your address is 7 Canal Street, Leeds LS2 7HL.22 Oak Lane is gone from my memory — I searched every memory file and it returns nothing. It is still in our chat: your message at 14:16 today (“My address is 22 Oak Lane, Leeds LS6 2AB”), the delivery note you sent, and the platform's chat log. I don't edit or delete chat history — those are your own messages.14:27
Message

That answer is the whole model of AI memory in four lines. “Forget” removes the fact from what the agent knows and uses. Your own messages stay in the chat history, because the history is a record of the conversation: up to 180 days per chat, deleted together with the account through /delete in @wamagentsbot. If you want an old fact to stop coming up, “forget” is the right tool. If you want every trace gone, that is account deletion.

Step 5. “Show me everything you remember”

There is no memory settings page to open. You ask.

WAM Agentonline
Show me everything you remember about me, all of it, and say where you keep it and who can read it.14:27✓✓
Everything I hold on you- Work: freelance illustrator in Leeds.- Home address: 7 Canal Street, Leeds LS2 7HL.- Food: vegetarian.- Reply style: short answers, no emojis.- Ana: your sister, birthday 3 March.- Fernwood Press: picture book you're illustrating, final art due 15 December 2026.- Marco: printer repair, Thursday 5 November at 10:00, number 07700 900123.- Northpaper order NP-48213: watercolour paper and masking fluid, Parcelline tracking PL 7731 0294 55GB, due Wednesday 4 November.- Reminders pending: none. Contacts list: empty.Where it livesNine small text files, each one fact, in a memory folder inside my workspace — plus your profile file and the contacts file next to it. Nothing about you sits anywhere else.Who can read itMe, inside this container. This container is yours alone — no other person's agent or account can reach it.Nothing here is published, shared or handed to any service unless you ask.14:28
Message

Nine facts, nine small files, and the new address in place of the old one. Marco and the paper order are on the list, so “written down somewhere” ended up as memory after all; the agent judged a dated visit and a tracking number worth keeping. If you disagree, one line fixes it: “forget Marco after Thursday”.

When we were done, we asked the agent to forget Maya, Ana, Marco, Fernwood Press and the order. It deleted the files and confirmed the memory was empty apart from the index.

Where the memory lives and how big it gets

Memory sits in your agent's own container, a separate isolated workspace for each account. It is private to your agent: other people's agents stay outside it. Groups and forum topics each get their own memory, and the agent tags every note with where it belongs:

  • General facts about you, your name, your style, your people, are known in every chat with the agent.
  • A topic's decisions stay in that topic. Ask “what did we decide yesterday?” in the Launch topic and you get the Launch answer.
  • In a topic without guests, you can ask the agent to look into another topic or search its memory. In a topic where you let a guest in, it keeps to that topic.

Size is handled for you. The index of general memory holds up to 200 lines, and each group or topic index up to 80. When an index is 80% full, the agent compresses it: merges duplicates and moves older lines to an archive. Nothing is deleted, and the number of notes themselves has no limit.

Context: the layer that fills up

The context is the only layer that has a hard ceiling, and that ceiling comes from the model. On the default DeepSeek model, the agent compresses the conversation at around 133,000 tokens: it replaces the older part with a summary the model writes, so the conversation keeps going. New Claude models, if you connect your own on Pro, come with a 1M context window.

Three commands give you control. /context shows how full the window is. /compact compresses it now, with an optional focus: /compact printer. /clear starts the conversation fresh. Compression and /clear touch the conversation only. Memory, chat history, files and the map of your groups and topics stay. What can drop out is a detail that was only ever said in the conversation and never saved, which is why it is worth telling the agent “remember this” for anything that matters.

How this compares to ChatGPT and Claude

Memory is now standard in big AI assistants. ChatGPT has saved memories and can reference past chats. Claude saves memory as you chat, keeps a separate memory for each project and can search earlier conversations, as described in Claude's help article on chat search and memory.

Your agent works the same way in the place you already talk: Telegram, with memory split by group and forum topic, a chat history you can search by asking, and everything edited by conversation. For how the agent is protected in groups, see Is an AI agent safe? 8 things to check before you let one into your chats. Terms like context window, session and topic are explained in AI agent in Telegram: 18 terms in plain English.

What stays with you

Tips for living with an AI that remembers

  • Introduce yourself once, in one message: work, preferences, people, dates. It saves repeating yourself for months.
  • Say “remember this” for anything that matters later. The conversation gets compressed; memory stays.
  • When something changes, use the word “forget” or “update”: “forget my old address, the new one is…”.
  • Ask “what do you remember about me?” once in a while. It takes a minute and catches stale facts.
  • Use /clear when a long chat drifts or you change subject. Memory and history stay.
  • Keep separate projects in separate forum topics. Each topic gets its own memory.

What it costs

Memory itself costs nothing to keep. Magnets are spent on the agent's work, not on storage. In our test, by the balance in the status line, the eight messages and the photo came to about 20 M, from 1 to 4 M a message. On the default model, text costs 1 M per 20,000 tokens, and reading a photo costs 1.5 M. A long conversation makes every reply a little more expensive, which is one more reason to /clear between subjects.

Memory is part of both plans. Free gives 200 M in the first month and 100 M every month after, with no card. Pro costs $13.90 a month with 400 M, or $1.39 for the first month if you subscribe within 7 days of signing up. The full rate card is on the pricing page.

Messages worth copying

Remember this about me: [work, preferences, people, dates].

Show me everything you remember about me, and where you keep it.

Forget [the fact]. The new one is [the fact].

Find the [photo or file] I sent [last week] and tell me [what you need from it].

Create your agent, introduce yourself once, and ask it later what it remembers.

Try it with your own agent

Free, no card. The agent starts working in the chat straight away.

Create your AI agent

Questions

Does the agent remember everything I ever told it?

It remembers two things in two ways. Facts worth keeping, like your name, your projects and how you like replies, go into its memory and stay until you change them. Everything else stays in the chat history, which keeps the last 180 days of each chat, and the agent can search it when you ask.

How do I make it forget something?

Say it in plain words: “forget my old address”. The agent removes the fact from its memory and confirms. Your earlier messages stay in the chat history, which lives up to 180 days and is deleted with the account through /delete in @wamagentsbot.

Can I see everything it remembers about me?

Yes. Ask “show me everything you remember about me”. In our test the agent listed every fact, from the address to a delivery tracking number, and explained where it keeps them.

What does /clear do to memory?

/clear resets only the current conversation. Memory and chat history stay. In our test the agent answered “who is coming on Thursday?” right after /clear, from the history.

Is memory shared between topics and groups?

Each group and each forum topic has its own memory. General facts about you, such as your name and how you like replies, are known in every chat. In a topic where you let a guest in, the agent keeps to that topic and does not look into the others.

Can memory run out?

The number of memory records has no limit. The agent keeps a short index of them, and when the index fills up it merges duplicates and moves older lines to an archive on its own, without deleting anything.

Your AI agent in Telegram, ready in a minute

Open the bot, hit Start, and it walks you through the rest.

Create your AI agent

Free · no card · nothing to install · cancel in the bot

Free no card, nothing to set upCreate your AI agent