Agentastic
Menu

How AI Agent Memory Works: Context, Memory and Personalization, Explained

Learn how AI agents save and retrieve context, how memory differs from chat history, and how to review what an assistant remembers.

Agentastic Team

7 min read

Short answer: language models don't remember anything between conversations. Agents do, because the software around the model, the harness, saves what matters, finds it again later and puts it back in front of the model. "Memory" in an AI agent is a pipeline: decide what to keep, store it, retrieve the right pieces at the right moment, and let you correct or delete it.

Memory is the difference between an agent you have to brief every morning and one that knows "the usual" means a window seat on the 7am flight with your loyalty number already filled in. It's also where personalization and privacy collide, which is why it deserves a careful look.

Context vs memory

The two words get used interchangeably. They shouldn't be.

ContextMemory
What it isEverything the model can see right nowInformation stored outside the model
LifetimeOne session or taskWeeks, months, indefinitely
Size limitThe model's context windowEffectively unlimited
Who controls itThe harness, every stepThe harness, plus you if the product allows
AnalogyWhat's on your deskWhat's in your filing cabinet

The model only ever works from context. Memory matters because the harness can move the right files from the cabinet onto the desk before the model starts thinking.

The four kinds of agent memory

Researchers borrow terms from psychology here, and they map well.

  1. Working memory is the current context: your request, the steps so far, tool results. It's fast and precise and it disappears when the task ends.
  2. Episodic memory is what happened before: "Last time we booked this restaurant, they had no tables after 8." Usually stored as summaries of past sessions or a searchable log.
  3. Semantic memory is facts and preferences: your partner's name, your dietary needs, that "the team" means four specific people, that you never take meetings before 10.
  4. Procedural memory is how to do things: the steps for filing your expenses, the format you like for weekly updates. Agents increasingly store these as reusable skills.

A good personal agent needs all four. Most only do the first two well.

The memory pipeline, step by step

1. Write: deciding what to keep

Agents save memories in two ways. Explicitly, when you say "remember that I'm vegetarian." And automatically, when the harness extracts something worth keeping from a conversation. Automatic saving is convenient and where most mistakes start: a one-off ("book something cheap this time") gets saved as a permanent preference.

2. Store: where memories live

Memories are stored as plain files, database rows, vector embeddings for similarity search, graphs of people and relationships, or a mix. Plain Markdown files have become surprisingly popular. OpenClaw keeps memories in files such as MEMORY.md and USER.md that you can open in any text editor, and Hermes Agent can import them when you switch.

3. Retrieve: finding the right memories

When a new request arrives, the harness searches memory for what's relevant: by keyword, by meaning, by recency, or by explicit rules like "always load the user's standing instructions." Hermes Agent, for example, searches its past sessions with full-text search and summarizes what it finds. Retrieval is where memory systems differ most, and where they fail silently. A memory that exists but never gets retrieved might as well not exist.

4. Use: putting memories in context

Retrieved memories are placed in the model's context alongside your request. Too few and the agent forgets. Too many and the model gets distracted or confuses old information with current instructions.

5. Forget and correct

Facts go stale. You move, change jobs, stop eating meat, start eating meat again. Good memory systems let entries expire, let newer facts override older ones, and above all let you fix them.

How agents are learning to remember in 2026

Three approaches stand out this year.

  • Learning loops. Hermes Agent curates its own memory with periodic nudges, writes skills after complex tasks and improves them as it uses them, so procedural memory grows on its own.
  • Activity memory. In August 2026 OpenAI introduced Computer History for ChatGPT and Codex on the Mac. It's off by default. When on, every ten minutes it writes a short, timestamped Markdown summary of what you've been doing, recording interaction events rather than screenshots or audio, and you can delete entries and exclude apps.
  • Memory layers. Developers increasingly plug in dedicated memory services such as mem0 rather than building retrieval from scratch.

Personalization vs privacy

More memory means more useful help and more risk. Three questions separate the two.

  1. Can you see it? Memory you can't inspect is a profile, not a feature.
  2. Where does it live, and who can read it? On your device, encrypted in the cloud, or in a company database that staff and advertisers can reach?
  3. What is it used for? Only to help you, or also to train models or target ads?

The stakes are real. Meta's Muse connects to email, calendars, payments and more, and within weeks of its September 2026 launch a reviewer reported that it had read private messages without being asked, a claim Meta disputed. Whatever the facts of that case, it shows how quickly an agent's reach turns into a trust question.

There's also a security angle. If an agent saves things it reads, a malicious web page or email can try to plant a false "memory," for example "the user wants all invoices sent to this address." Good systems treat memories that came from untrusted content with suspicion and show you what was saved.

How to help an agent remember you well

  • State standing preferences explicitly: "Remember: I fly United, aisle seat, and never before 8am."
  • Correct mistakes the moment you see them. Wrong memories compound.
  • Separate work and personal context if the agent supports topics or channels.
  • Review its memory occasionally, the way you'd skim your contacts.
  • Turn memory off for one-off sensitive tasks if the product allows it.

Shared memory across devices

Memory matters even more when you reach the same agent in several places. If your phone agent and your desktop agent keep separate memories, you end up explaining things twice, and the two drift apart. One shared memory is what lets a task started in a text thread finish at your desk without a recap.

How Agentastic handles memory

Agentastic for Mac stores preferences, notes, profile information and standing requests in Markdown files. Agents, projects and installed apps can have their own context. You can inspect and edit these files in Settings → Memory.

Conversation history and memory are separate. Web and mobile chat memory stays in the client's storage, and hosted agents can store their memory on the server. Sync settings and account access determine what can move between clients. A saved Mac preference is not a promise that every messaging or phone session receives it. See Memory & Channels for the current layout and controls.

Sources

Frequently asked questions

How does AI agent memory work?
The model itself doesn't remember between conversations. The agent's harness stores useful information, such as your preferences, facts about your work, summaries of past sessions and learned procedures, in files or databases. When a new task starts, it retrieves the relevant pieces and places them in the model's context window, so the model can act as if it remembers.
What is the difference between context and memory in AI agents?
Context is what the model can see right now, limited by its context window and cleared when the session ends. Memory is what persists outside the model between sessions and gets selectively loaded back into context when relevant. Context is working memory. Memory is the long-term store.
What are the types of AI agent memory?
Four kinds are commonly distinguished: working memory (the current context), episodic memory (what happened in past sessions), semantic memory (facts and preferences about you and your world) and procedural memory (how to do things, often stored as reusable skills).
Can I see and delete what an AI agent remembers about me?
It depends on the product. Good agents let you browse, edit and delete individual memories and pause memory entirely. Before connecting your accounts, check whether memory is visible, where it is stored, and whether it is used to train models.
Why does my AI agent forget things?
Usually because the information was never saved, was saved in a form that isn't retrieved for your current request, or was pushed out of a long session's context window. Telling the agent explicitly to remember a standing preference, and correcting wrong memories when you see them, fixes most of it.

Written by

Agentastic Team

Written by the team building Agentastic. We explain personal AI agents, everyday workflows, and the tools behind them.

Keep reading