Module 15
The Memory Layer in AI Agents
Language models forget everything between calls, so agents need memory you design: a short-term window for the current conversation and long-term stores for facts, past events, general knowledge and know-how. You set up Mem0, build a policy-driven memory store on a vector database, and see how deep agents use plans, subagents and file-system scratchpads to stay on track through long research tasks.
By the end of this module you can
- explain short-term, factual, episodic, semantic and procedural memory, and say where each lives in an agent.
- configure Mem0 with your own extractor, embedder and vector store, and wire it into a Claude agent.
- design write, read and forgetting policies for agent memory, including pinning, recency and importance scoring.
- protect memory against personal-data leaks and memory poisoning with rules enforced in code.
- build a small deep agent that plans, delegates to subagents and keeps its notes in files.
Lessons
4 in this module- 01Short-term, long-term, episodic and semantic memoryExplain why LLMs forget, name the kinds of memory an agent needs, and build a sliding short-term window plus a tiny long-term store.
- 02Mem0 setup and configurationInstall and configure Mem0 with a chosen extractor model, embedder and vector store, then use it to add, search, inspect and delete memories for a Claude agent.
- 03Vector-database-backed memoryBuild agent memory on a vector database with explicit write, read and forgetting policies, pinned safety facts, and privacy rules enforced in code.
- 04Deep agents and deep research agentsExplain why single-loop agents fail on long tasks and build a small deep agent that plans, delegates to subagents and keeps its notes in a sandboxed file-system scratchpad.