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.
Effective context engineering for AI agents — Anthropic. Defines structured note-taking: the agent writes notes to memory outside the context window and pulls them back into the context later.
Memory tool — Claude docs. A file-based memory tool; when it is enabled, the API adds a memory protocol to the system prompt: check memory first, and assume the context can be reset at any time.
Claude Code memory — Claude Code docs. CLAUDE.md files and auto memory: a MEMORY.md index loaded at the start of every session, with topic files read on demand.
Effective harnesses for long-running agents — Anthropic. A coding agent works across many sessions by keeping a progress file and a feature list, which each new session reads before starting work.
LLM Powered Autonomous Agents — Lilian Weng, 2023. A widely cited survey of agent design; its Memory section maps sensory, short-term, and long-term memory onto agents.
Cognitive Architectures for Language Agents — Sumers et al., 2023. The CoALA framework, which organizes language-agent memory into working, episodic, semantic, and procedural memory.
MemGPT: Towards LLMs as Operating Systems — Packer et al., 2023. Manages memory tiers outside the context window, moving information in and out the way an operating system pages memory.
Memory overview — LangChain docs. Semantic, episodic, and procedural memory for agents, and the trade-off between writing memories during the conversation and in the background.