Module 05 of 12

Memory & Context

Lessons

About This Module

A language model has no memory of its own: it only sees whatever is in its context window for the current request. That window acts as the agent's short-term memory, and it fills up fast as an agent loops, calls tools, and collects results. To remember things across sessions, an agent needs long-term memory: an external store that it writes to and reads from.

The first lesson is a quick overview of why agents forget and what agent memory is. The second compares short-term and long-term memory and looks at how they're implemented in Python. The last lesson introduces context engineering — the practice of choosing what goes into the context window, which matters more than prompt wording once agents run for many steps.

Keep in mind that more context isn't automatically better. A window crowded with old, irrelevant text can make an agent worse, so a lot of memory design is about deciding what to keep, what to summarize, and what to leave out.

Lessons

3 videos
01

Agent Memory Explained in 5 Minutes

A short explanation of why agents forget what they did several tool calls ago, why a bigger context window doesn't fix it, and what agent memory adds.

Video 5min
02

Short-Term vs Long-Term Memory in AI Agents

How memory works in AI agents, comparing short-term and long-term memory, with a look at how the different types are implemented in Python.

Video 14min
03

Context Engineering Clearly Explained

Why building agents shifts the focus from writing prompts to curating context, including sharing context between agents and selecting the right information to put in front of the model.

Video 12min