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).
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 minDecide what to remember
- Imagine a personal study-helper agent.
- List what it should remember long-term (your goals, level) and what to forget (one-off questions).
- 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.