Skip to content
Nitmonk
Agent Brain Deep-Dive

Section 4 · Memory in AI Agents

Working, long-term, semantic and episodic memory.

Section 4 · Memory in AI Agents — infographic explaining Working, long-term, semantic and episodic memory.
Section 4 · Memory in AI Agents — visual explainer by Nitmonk.

Memory gives agents superpowers — continuity, personalization and learning. The right memory, at the right time, makes an agent brilliant. This breaks down the types of agent memory and how they're used.

In simple terms

Working, long-term, semantic and episodic memory each play a role in a smart agent.

How it works

  1. 1Working (short-term) memory: current conversation and recent tool results, in the context window.
  2. 2Long-term (persistent) memory: user profile, preferences and past interactions.
  3. 3Semantic memory: domain knowledge, docs and policies (a knowledge base).
  4. 4Episodic memory: what happened in the past — completed tasks, errors and lessons.
  5. 5A memory manager decides what to store, recall and forget each turn.

Key points

  • Different memories map to different stores (in-context, vector DB, knowledge base, event store).
  • In every turn: get input → load relevant memories → construct context → reason → update memory.
  • Best practices: store only what's valuable, summarise, respect privacy, set TTLs.
  • LLM is smart, but memory makes it useful over time.

Why it matters

Memory is what makes agents continuous, personalized and able to learn from experience — turning a stateless model into an assistant that improves with use.

Frequently asked questions

What are the four memory types?
Working (short-term), long-term, semantic (knowledge) and episodic (experience).
What does a memory manager do?
It decides what to store, what to recall and when to forget, each turn.