The Memory Problem and Conversation Memory

Module 9, Lecture 9.1 | Memory Systems

An agent that a person returns to across many sessions starts each session with an empty context, so nothing from earlier sessions carries over. This lecture introduces memory as the answer: a durable store, kept on disk outside the prompt, whose relevant parts are injected into the context when needed. Context lasts one session and costs tokens on every call; memory persists across sessions and costs tokens only for what is injected. Every memory system writes, curates, and retrieves, and retrieval works like RAG over the agent's own past. The lecture names four kinds of memory (conversation, episodic, semantic, and procedural), then builds the simplest one: a notes file the agent manages through save_note and read_notes tools. A tutoring agent shows the pattern: it records what the student finished, where they struggled, and what comes next. The system prompt tells the model when to read, when to write, and what to keep, and the harness loads the notes at startup and asks for an update before the context is lost.

Read the full lecture narrative

Additional Resources