Agent Brain Deep-Dive
Section 4 · Memory in AI Agents
Working, long-term, semantic and episodic memory.

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
- 1Working (short-term) memory: current conversation and recent tool results, in the context window.
- 2Long-term (persistent) memory: user profile, preferences and past interactions.
- 3Semantic memory: domain knowledge, docs and policies (a knowledge base).
- 4Episodic memory: what happened in the past — completed tasks, errors and lessons.
- 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.
More in Agent Brain Deep-Dive
Section 1 · Inside the Agent Brain
How AI agents break down complex problems.
Section 2 · Reasoning Patterns
ReAct, Plan-Execute, Reflection, Tree-of-Thoughts, Self-Consistency.
Section 3 · Planning Graphs Instead of Prompts
Stateful graphs that plan, decide and act.
Section 5 · Reasoning Engine
Think, observe, reflect and refine until confident.
Section 1.5 · How Agents Decide What To Do Next
The observe → decide → act → learn loop.