
How AI Agent Memory Works: MemGPT & Memory Types
Michael Ryan, a computer science PhD student at Stanford, explains how AI agents are given memory in this lecture from Stanford's CS329Z: Engineering AI Agents. He breaks memory into four types, working, episodic, semantic, and procedural, and covers storage approaches including files, databases, and knowledge graphs. Ryan walks through architecture patterns used in practice, including skill libraries like Voyager, tiered memory systems like MemGPT, reflective consolidation methods, and maintenance approaches such as A-MEM and Mem0. The talk closes with a look at memory benchmarks used to evaluate these systems and open research problems, including forgetting, privacy risks, and the danger of over-personalization. The course is taught by Diyi Yang, Michael Ryan, and John Yang, and this session runs just over an hour, grounded throughout in specific published systems rather than general description of AI capabilities.