Layered diagram showing short-term and long-term AI agent memory stores

Giving an AI Agent Memory: Three Patterns That Actually Work

"Give the agent memory" sounds like one feature, but in practice it's three different problems with three different solutions, and most implementations only solve one of them.
💬 Session Memory: Just Context

Remembering what happened earlier in the same conversation is the easy case — it's just context window management, summarization when it gets long, and nothing more exotic than that.

📂 Episodic Memory: Searchable Past Events

Remembering specific past interactions across sessions ("last time we talked about X, you said Y") needs a retrieval layer — store structured records of past sessions, retrieve relevant ones by similarity or metadata when a new session starts.

🧠 Learned Preferences: The Hard One

Remembering general facts and preferences that should apply going forward (not a specific past event, but a standing rule) requires actively writing and maintaining a structured profile — this is the pattern most "AI memory" products are actually promising, and it's the one that needs the most deliberate engineering, not just a vector database.