Pattern 22 · Agents

Agent memory controls

An agent that remembers facts about people is useful until it remembers the wrong thing, and nobody can see or remove it.

By Alex StepikinUpdated November 20263 min readLive demo
Live demo · try it

An interactive mock built in plain HTML, CSS and JavaScript. Data is fictional; no model is called.

FitWhen to use it — and when not

Use it when

  • Assistants and agents that carry facts between sessions
  • Products where memory changes answers (tone, preferences, project facts)
  • Shared agents where one person's memories must not leak to another

Skip it when

  • Stateless tools where each request stands alone
  • Data that belongs in an explicit setting or profile field the user already edits

AnatomyThe parts of the pattern

  1. Saved noticeA small inline note when a memory is created, with Undo.
  2. Memory listEach memory as one plain sentence, with date and source chat.
  3. Edit and forgetCorrect a memory or delete it; forget all at once.
  4. ScopePersonal, project or workspace memory, shown as a label.
  5. PauseTurn memory off temporarily, e.g. a chat that should not be remembered.

GuidelinesDo & don’t

Do

  • Show the memory at the moment it is saved, not only in settings.
  • Link each memory to the conversation it came from.
  • When an answer used a memory, let people see which one.

Don’t

  • Store sensitive details (health, finances) without asking first.
  • Keep a "deleted" memory in the prompt or the index.
  • Use memory from one workspace in another.

In the wildReal-world examples

ChatGPT (memory)Claude (memory)Gemini (saved info)Windsurf (memories)

Products named for reference only — no affiliation, and the demo above is an original illustration, not a copy of their UI.

For engineersImplementation notes

  • Store memories as rows (id, text, scope, source_message_id, created_at) and build the prompt from them; avoid memory that exists only inside embeddings.
  • Delete means removed from storage, the vector index and caches; log the deletion, not the content.
  • Run a classifier before saving to skip sensitive categories or ask the user first.

See alsoRelated patterns

All 32 LLM UX patterns

Need this in your product?

I design interfaces for AI products and agents: approvals, run history, undo, and the small states people notice in daily use. A 1–2 day sprint reviews your app and redesigns one core flow in Figma, at a fixed price from $400 per day. Related case: Atlas, a control room for a fleet of AI agents.

Book a callSee the Atlas case

Create bold.
Deliver better.

See our workGet in touch