Memory architecture for agents

Agents need two kinds of memory: short-term (what's in the context window right now) and long-term (stored and retrieved later). Long-term memory comes in three flavours: episodic (past conversations and events), semantic (facts and knowledge) and procedural (how to do things: prompts, skills, tool instructions).

Everyday analogy

Your own memory: what you're thinking about right now (short-term), what happened at last week's meeting (episodic), facts you know (semantic), and how to ride a bike (procedural).

Example

A customer-service agent remembers that a customer complained about a late delivery last month (episodic), knows the refund rules (semantic), and follows the refund process (procedural).

📝Short-term memory• What's in the chat right now• Lost when the window fills• Like a sticky note🗄️Long-term memory• Saved facts and preferences• Stored in a database• Like a notebookVS
Agents need both: a working memory and a long-term memory.

Decisions to make

  • What to keep across sessions, and what to forget
  • How to find memories: search, embeddings or files
  • When the agent may update its own notes

Be careful

  • Don't store personal data without consent
  • Let users see and delete what's remembered
  • Old memories can be wrong; date them

Try it yourself

About 10 min

Decide what to remember

  1. Imagine a personal study-helper agent.
  2. List what it should remember long-term (your goals, level) and what to forget (one-off questions).
  3. Add one thing it must never store (passwords, health details).

What you should see: Good memory design is useful and respects privacy.

Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.

Build it for real · guided projectBuild an AI workflow that summarises feedback for youAbout 75 min · No coding needed · step by step
Test what you learned

Take a quick quiz, or look up any word in the glossary.