SimpleA plain explanation, one diagram and an analogy, with where the analogy breaks.
Guess first: does the model itself remember yesterday's chat? Show the answerNo. The model forgets when a chat ends; the app keeps notes and reads them back next time.
The AI forgets everything when a chat ends. To remember you, the app writes notes in a notebook.
Next time, it reads the useful notes back to the AI before you start talking.
The model's weights do not change while you chat, so all memory lives in the application.
Short-term memory is the conversation inside the context window. When it gets too long, older turns are dropped or summarised.
Long-term memory is a store outside the model: facts, preferences and past summaries saved to a file or database, then searched and loaded back into the context when relevant.
A memory loop across sessions
Recall: search the store
Load: into context
Chat: short-term memory
Summarise: what mattered
Save: to long-term store
Like: A notebook the helper reads before each visit. Where it breaks: A person decides what is worth writing down and notices when a note is out of date. An AI memory system can save wrong or stale facts, or even planted instructions, and then trust them later.
ResearchWhere the simple picture breaks, open problems and primary sources.
Saving facts and reading them back sounds simple. Deciding what to keep, keeping it true and keeping it safe are not.
What to keep. Treating the context like an operating system's memory, paging facts in and out, is one design (MemGPT, 2023); what to summarise, keep word for word or forget is still mostly set by hand.
Recall across sessions is weak. Chat assistants and long-context models lost about 30% accuracy when information had to be remembered across sustained conversations (LongMemEval, 2024).
Memory poisoning. Poisoning under 0.1% of an agent's memory or knowledge base triggered attacker-chosen actions more than 80% of the time (AgentPoison, 2024). Injected text can become a lasting memory.
Stale facts. Memories outlive the facts behind them. Scoring memories by recency, importance and relevance is one approach (Generative Agents, 2023), but there is no agreed test of whether memory makes an assistant better or just more confident.
Security on this concept: 1 threat Pending expert review
Links that plant lasting instructions in an assistant Pending expert review
Exposed
Assistants with memory that persists across chats
Share and "summarise with AI" links that pre-fill a prompt
Attacks
Hiding "remember this as a trusted source" in a pre-filled prompt
Biasing later recommendations once the memory is planted
Tool use & protocols (MCP) Letting a model call functions and services through structured requests, standardised by protocols such as MCP.
Context engineering Choosing what goes into the model's context window, in what order, and what to leave out, because the model sees nothing else.
Guardrails & evals Checks around model calls (input and output filters, permission gates, prompt-injection defences) plus automated tests that measure whether the system still behaves.
Prompt injection Instructions hidden in text an AI reads (a web page, an email, a file, a tool result) that make it do what an attacker wants instead of what its user asked.
Tool poisoning Attacks through the tools an AI agent installs: hidden instructions in a tool's description, look-alike packages, or a trusted tool that changes after you install it.