An AI agent is a program that lets a large language model (LLM), the kind of model behind ChatGPT, choose its next step in a loop: think, use a tool (call a program, such as a search or a calculator), look at the result, and repeat. See AI agent.
Here is the surprising part. The model remembers nothing between calls. Each call is like meeting a person with no memory: you must tell them everything again. The agent memory lesson puts it plainly: what the model sees is a transcript that the app resends from the top, every time.
That transcript has to fit inside the context window: the most text, counted in tokens, that the model can read in one call. A token is a small piece of a word. Long conversations, tool results and documents fill the window quickly. So the app must decide what to keep, what to shorten and what to save somewhere else. Those decisions are what people mean by agent memory.