Learn AI /AI Agents and Automation /Long-term memory (in AI systems)
Long-term memory (in AI systems)
- Intermediate
- AI Agents and Automation
- Policy officers
- Human rights practitioners
Also called: persistent memory, memory store.
Back to the milestone you came from
In five seconds
What it is
Stored information an AI system can retrieve across separate sessions to personalise, continue tasks, or reuse past facts and preferences.
In plain words
It is like a saved notebook for an AI system. Some useful details from earlier interactions are written down somewhere outside the chat, so they can be brought back in a later session.
An everyday example
A café does not need to record every conversation with a regular customer. It may keep one useful note on an order card, such as “usually asks for tea without sugar”. On the next visit, staff retrieve that note when the customer gives their name. The note saves time, but it is not automatically true forever. If the customer changes their order, someone must update or remove it. An AI memory works similarly: it captures information, selects what may be useful later, stores it and retrieves it when a relevant new request arrives.
A warehouse logbook is usually written and read by people who understand the notes directly. In AI systems, memory often has to be transformed into a searchable format, and retrieval may be based on pattern matching rather than exact human judgement. Also, a human team can notice context that was never written down, while an AI system can only use what is retrieved into its current context.
Remember thisLong-term memory is persistent information retrieved across sessions, not a change to the model itself. It improves continuity, but stored items need controls for access, retention, correction and deletion.
Understand it
Understand it
Why it matters
A system with long-term memory can feel more useful because it does not start from zero every time. It can continue work across days, reuse stable preferences, and reduce repetitive prompting. But this same feature changes the risk profile. Once information is stored and reused, mistakes can persist, sensitive details can spread too far, and old assumptions can shape new outputs without being noticed. For policy, procurement, and human-rights work, the key questions are governance questions: what may be stored, for how long, with whose knowledge, under what access controls, and with what route for correction, deletion, and human review. If you ignore long-term memory, you may misunderstand what the system is actually using to produce an answer or action.
How long-term memory is saved and reused across sessions
Show that long-term memory is separate from one conversation: information is selected, stored, retrieved later, and then checked before use.
01
1. New interaction
A user asks for help or the system observes a task. Most of this material stays only in the current session unless something is chosen for saving.
Draw a box labelled 'Current session' with example text snippets inside. Add a small clock icon to suggest temporary use.
02
2. Select what to save
A rule or component decides whether a detail is worth keeping, such as a stable preference, a project fact, or a task summary.
Draw a decision/filter box labelled 'Save?' with three tagged examples passing through and crossed-out sensitive or trivial items blocked.
03
3. Store in memory
Chosen items are written to a separate memory store such as a database or file system, with labels or metadata to help later search.
Draw a cylinder or card stack labelled 'Memory store' containing short saved items and date tags.
04
4. Retrieve later
In a new session, the system searches the memory store for items relevant to the new request and brings back only some of them.
Draw a second 'Current session' box on the right. Show arrows from the memory store to this box, with only two highlighted notes moving across.
05
5. Use with checks
The model uses retrieved memory with the new input, but the result may still need validation because saved information can be wrong, old, or inappropriate.
Draw an output box labelled 'Draft or action' followed by a warning/check badge labelled 'Verify before use'.
A left-to-right flow diagram with five boxes connected by arrows. It starts with a user interaction, then shows memory selection, storage, retrieval during a later session, and final response with review. Read it as a process across time, not as one continuous chat.
Hover or tap each step to reveal one example of information that should be saved and one that should not; on keyboard focus, the same text appears below the diagram.
Describe this without the diagram
The diagram explains long-term memory as a five-step flow across time. First, a user interaction happens in a temporary session. Second, a filter decides whether any detail should be saved. Third, selected items are stored in a separate memory store, not inside the live chat itself. Fourth, during a later session, the system searches that store and retrieves only the items that seem relevant to the new request. Fifth, those retrieved items are used to help produce a draft or action, but a final check is needed because stored memory may be outdated, incorrect, or unsuitable to use.
With reduced motion: A static five-box flow appears left to right with arrows: current session, save filter, memory store, later retrieval, draft or action with verification. Retrieved items are shown as highlighted notes rather than animated movement.
In many AI systems, long-term memory means keeping selected information outside the model so it can be used again later, even after one chat or task has ended. That stored information might include a user preference, a project fact, a summary of past work, or a record of what happened in earlier steps.
What goes in is usually not the whole conversation. A separate part of the system chooses what to save, such as “send reports in French” or “the package should contain 240 boxes”. The information is then written to a memory store, which could be a database, a file, or another storage service.
What happens next is retrieval. When a new request arrives, the system searches that store for items that seem relevant and brings them back into the current working context. The model then uses that retrieved material along with the new prompt. This is different from the model’s training, which happened earlier and affects its general behaviour rather than one user’s stored information.
What comes out is a response or action that can reflect earlier interactions across time. This can make systems more useful, but it also creates risks. A saved detail may be wrong, outdated, biased, or too sensitive to store. That is why long-term memory needs clear rules about what may be saved, how long it stays, who can inspect it, and when a human should review or correct it.
How “The regular order card” maps onto the real thing
| In the story | In the AI system |
|---|---|
| shift logbook | persistent memory store |
| few lasting notes instead of every conversation | selective saving of useful information rather than storing all context |
| next shift retrieves relevant notes for today’s container | new session retrieves relevant memory for the current task |
| old note causing a repeated mistake | stale or incorrect memory influencing later outputs |
A worked example
A political affairs officer uses dummy material to test whether a drafting assistant can remember non-sensitive preferences across two sessions during a procurement evaluation.
Starting from: First session: “For statements for delivery, use short headings and apply the programme title exactly as it appears in the supplied terminology list.” Later session: “Prepare the next section using my saved drafting preferences.”
- The system captures the first conversation turn and the resulting draft settings.
- A selection rule identifies the heading style and terminology instruction as potentially reusable. It does not save the full dummy statement.
- The selected items are written to persistent storage with their source, scope and owner.
- In the later session, the request for saved drafting preferences triggers retrieval of the relevant items.
- The model receives the retrieved items with the new prompt and applies them to the draft. The officer can inspect, correct or delete the memory.
Result: The new section uses short headings and the supplied programme title. The system also shows which saved preferences it applied, allowing the officer to catch an obsolete term before the draft goes back into the clearance chain.
In a United Nations workplace
With a statement for delivery held in the translation queue, a political affairs officer joins a procurement unit’s controlled evaluation of a drafting assistant. Using dummy text, the officer checks whether the tool can carry forward agreed terminology and formatting preferences between sessions before close of business.
The test distinguishes long-term memory from ordinary chat context. The assistant selects a durable preference, stores it outside the model and retrieves it in a later session when the officer returns to the same type of artefact.
Before you try thisReal draft statements, negotiating positions, vendor submissions, pricing and evaluation material must not be entered into a tool that has not been approved for them. Any enabled memory must have access controls, retention limits and a way to inspect, correct and delete stored items, otherwise an outdated or wrongly attributed preference may keep resurfacing.
Where you may hear it
- A procurement unit’s controlled vendor demonstration
- An ICT governance board review of retention settings
- A front-office discussion before enabling a drafting assistant
- A data protection review of an agent’s memory store
Avoid confusion
Avoid confusion
Often confused with
Training
Training is the process of adjusting a model's parameters using data or feedback to improve performance on a learning objective.
Context window
The maximum amount of input and prior output a language model can use at one time while producing the next part of a response.
Memorisation
Memorisation happens when a model encodes information specific to individual training examples or small subsets of them.
Side-by-side
Common misconceptions
Common misconception: Long-term memory means the model permanently learned something new.
Correction: Usually it means the system saved information in an external store and retrieved it later. That can change a future response without changing the model’s underlying trained parameters. Training changes the model itself; memory changes what information is supplied to it at runtime.
Common misconception: If a system has memory, it remembers everything automatically.
Correction: Most systems cannot keep everything, and storing everything would often be risky or inefficient. Designers usually choose what to save, how long to keep it, and what to retrieve. Many details from a conversation may never enter long-term memory at all.
Common misconception: Stored memory is more reliable than the current conversation.
Correction: A saved item can be incomplete, outdated, wrongly extracted, or taken out of context. Retrieval can also bring back the wrong item. Memory can improve continuity, but it does not guarantee correctness.
Quick check
Which statement best describes long-term memory in many AI systems?
In many systems, long-term memory means persistent storage outside the model, later retrieved when relevant. It is not the same as a larger context window, automatic retraining after each message, or guaranteed accuracy.
Go deeper
Go deeper
The simple version
It is like a saved notebook for an AI system. Some useful details from earlier interactions are written down somewhere outside the chat, so they can be brought back in a later session.
The technical version
In many AI systems, long-term memory uses persistent storage outside the model, such as databases, document stores, key-value stores, or vector databases. A memory pipeline usually has four parts: capture, selection, storage, and retrieval. During capture, the system receives conversation turns, tool results, or task outcomes. During selection, the system uses rules, classifiers, or prompts to identify what is worth persisting, such as user preferences, entity facts, summaries, plans, or prior actions. During storage, those items are saved with metadata such as source, timestamp, permissions, and scope. During retrieval, the system uses keys, filters, search, similarity matching, or hybrid methods to fetch records relevant to a new request. The retrieved items are then inserted into the current context window or passed through tools for downstream use. This differs from short-term memory, which only holds information for the current interaction, and from training, which updates model parameters rather than storing per-user or per-task records.
Reviewed external resources
Primary sourceModel Context Protocol (opens in a new tab)Model Context Protocol
This link explains the Model Context Protocol and suits technical readers who want to understand how tools and external context can be connected to models.
Deeperlink checked 2026-07-31
EncyclopaediaLong-term memory (opens in a new tab)Wikipedia
This link gives a broad introductory overview of long-term memory concepts and suits readers who want a quick starting point.
Intermediatelink checked 2026-07-31
ArticleBuilding effective agents (opens in a new tab)Anthropic
This link explains how agents operate in practice and suits readers who want to see where memory fits into broader agent workflows.
Intermediatelink checked 2026-07-31
VideoVideo explanations: Long-term memory (in AI systems) (opens in a new tab)YouTube search
This is a YouTube search results page, so it helps readers browse different video explanations and teaching styles rather than relying on one source.
search results, not one pagelink checked 2026-07-31
DiscussionCommunity discussion: Long-term memory (in AI systems) (opens in a new tab)Reddit search
This is a Reddit search results page, so it helps readers see common questions, examples, and debates from practitioners, with the usual need for careful fact-checking.
search results, not one pagelink checked 2026-07-31
Where this came from
Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.
The one thing to remember
Long-term memory is persistent information retrieved across sessions, not a change to the model itself. It improves continuity, but stored items need controls for access, retention, correction and deletion.