Memento is the best mental model we have for LLM agents

Christopher Nolan's 2000 thriller about a man without short-term memory turns out to describe the architecture of every modern AI agent: frozen weights, vanishing context windows, and the tattoos, Polaroids, and notes they have to invent to function.

Christopher Nolan's *Memento* came out in 2000, twenty-two years before ChatGPT. Its protagonist, Leonard Shelby, lost the ability to form new long-term memories after a head injury. He hunts his wife's killer using tattoos for the most important facts, scribbled notes he learns to trust, and Polaroids of every person he meets with their name and role written in the margin. A quarter century later it is the best metaphor anyone has produced for how an LLM-powered agent actually works.

Frozen weights, ongoing inference

Leonard before the injury could absorb experience. Leonard after the injury can think, reason, and read people brilliantly, but the moment passes and the slate clears.

That is the lifecycle of every modern language model. Training runs the model through a corpus the size of the public internet and adjusts the billions of weights that encode what it knows. Then the weights freeze. Inference begins. From that moment forward the model is Leonard after the accident, still sharp, still capable, but unable to learn anything new from the conversations it has. Each new session starts from a blank slate, no matter how many millions of interactions came before.

The context window is short-term memory, and it leaks

In the film's short scenes, Leonard holds a conversation, plans the next move, follows a thread, for about fifteen minutes. Then the buffer overflows and everything not written down is gone.

LLMs are worse. They have no state at all. To maintain a conversation, the entire history must be re-sent on every turn, which means the context window is a hard ceiling on coherence. As a session approaches that ceiling, answer quality degrades. The model starts contradicting itself, losing earlier facts, missing the thread of what was being discussed. The only fix is what Leonard does: externalize. Summarize the conversation, move what matters into a separate store, start a new session, prime it from the notes.

This is why memory becomes the central engineering problem of agent design. The model cannot remember. The system around it has to.

Tattoos, the facts the agent will not allow itself to forget

Leonard's most important facts are tattooed onto his body. They cannot be changed, cannot be misplaced, cannot be argued with by tomorrow's version of himself. "John G. raped and murdered my wife" lives on his chest.

System prompts are tattoos. They are the rules the agent rereads at the start of every turn, the constitution, the persona, the absolute prohibitions. Good system prompt engineering is tattoo engineering. Only the things that must survive every context reset belong there, because every byte spent on a tattoo is a byte not available for short-term reasoning.

Polaroids, retrieval-augmented memory

Leonard photographs every person and writes their identity on the back. When he meets them again, he checks the photo before deciding whether they are friend or threat.

RAG, retrieval-augmented generation, is the Polaroid drawer. The agent does not remember the document, the customer's history, or last week's incident report. It looks them up, pulls the relevant snippets, and treats those snippets as if it remembered them all along. The quality of an agent's behavior is increasingly bounded not by the model but by the quality of its retrieval layer, its filing system for Polaroids.

The frozen worldview problem

Leonard remembers his life before the injury in vivid detail. Everything after is a void. His map of the world is locked to a date he cannot change.

So is the model's. Whatever the training cutoff was, that is when its built-in worldview ends. It does not know who released a model last month, which framework version is current, or which API endpoint was deprecated yesterday. Tools and search exist to paper over this gap, but the underlying knowledge is stuck, and the model often does not realize what it does not know.

Why this matters for anyone building with agents

The temptation when working with capable LLMs is to anthropomorphize. They feel like they remember. They speak as if they learn. They do neither. Every interaction is a fresh start for a frozen mind that has to be re-briefed on who it is, what it cares about, who you are, and what you were talking about thirty turns ago.

The teams shipping the best agentic products have internalized this. They design memory architectures first and reasoning chains second. They write system prompts as if they were tattoos. They invest in retrieval as heavily as in model selection. And when an agent fails in production, the first question they ask is rarely "is the model wrong." It is "what did the agent need to remember, and where did that memory live."

Leonard never finds out his own truth because his memory system is a fragile chain of artifacts he cannot fully trust. That is the failure mode every agent architect is fighting. Watching the film with that frame in mind is the cheapest hour of agent-architecture education available.

Source: IMDb — Memento (2000)