ML//agent//agent memory
Agent memory is the set of places where an AI agent keeps information it can use when deciding, and it is how a system built on a model with fixed weights remembers a user, a task in progress or last week's incident. It has three levels, and most confusions about what an agent knows come from mixing them up.
Agent memory is the set of places where an AI agent keeps information it can use when deciding, and it is how a system built on a model with fixed weights remembers a user, a task in progress or last week's incident. It has three levels, and most confusions about what an agent knows come from mixing them up.
Parametric memory is what the weights learned in training: language, general facts, coding habits. It is fixed at deployment, so it ends at the model's knowledge cutoff, and it cannot be inspected or corrected item by item.
Working memory is the context window of the current call: the instructions, the conversation, the tool results. It is precise and immediately usable, and it is gone when the call ends, because model APIs keep no state between requests; the application sends the history again every time.
External memory is whatever the system stores outside the model and brings back into context when relevant: files, a database, notes the agent writes for itself, documents in a vector database fetched by RAG. It is large, durable and editable, and it helps only if the right item is retrieved at the right moment.
Picture a maintenance agent at a water plant. It knows what cavitation is from its weights; it holds today's alarm log and the operator's question in its context; and it finds the report on pump 3's bearing replacement last March in the plant's records. MemGPT made the hierarchy explicit by paging items between context and archive, as an operating system pages between RAM and disk.
Writing to memory changes behaviour without changing the model.
An agent that saves a preference and reads it back acts differently tomorrow, yet nothing was learned in the training sense, and nothing transfers to a situation the stored note does not mention (online learning is the other path).
Memory fails in its own ways: a stale entry that was true last month, a retrieval that returns the wrong pump, a context so full that the relevant line is ignored. Many agent errors blamed on the model are memory errors (agentic system).
Choosing what to keep, summarize or forget is part of the design of the agent harness, and so is who may write to memory: a tool result that plants instructions in long-term memory is a path for prompt injection.