An AI memory layer is a component that stores information between sessions and returns it to a model, assistant or agent on demand.
Large language models are stateless. Each request starts from zero, and anything the model should know has to be placed in the prompt. A memory layer sits between the user and the model and does that placing. It writes down facts, decisions and preferences as they appear, stores them somewhere durable, and retrieves the relevant ones when a new question arrives. The store can be a hosted API, a database, or plain files on disk.
Memory layers differ in three ways. Where the data lives (a vendor's cloud or the user's machine). What gets stored (verbatim text or a model-written summary). Who can read it (one chat app, or any tool that speaks a shared protocol). Hosted products such as Mem0 and Zep store AI-extracted memories behind an API. File-based products keep human-readable notes that the user can open, edit and back up like any other document.