A memory layer is the component of an AI system responsible for storing and retrieving information so that a model can draw on more than just its immediate input. It extends a language model beyond its context window, giving an application continuity and the ability to recall relevant facts, past interactions, and accumulated knowledge.
In practice the memory layer is usually built around a vector database. Information is embedded and stored, and when it becomes relevant the layer retrieves it by semantic similarity and supplies it back to the model. This is what lets an assistant remember earlier parts of a long conversation, recall a user’s preferences, or pull in knowledge it was never trained on.
It is helpful to think of the memory layer as searchable memory rather than perfect recall. A vector database retrieves relevant slices of the past on demand, but a complete memory layer typically adds more around it — deciding what is worth storing, summarising long histories, weighing recency and importance, and combining structured and semantic data — so the system surfaces the right memories, not merely the most textually similar ones.