Memory
Facts saved outside the chat and reloaded into later ones, so the model appears to remember you after the conversation resets.
See it
What it is
Memory is facts stored outside the conversation and loaded back into a later one. It matters because the model has none: a context window is working memory that evaporates when the chat ends, and nothing is written to the weights. So 'it remembers me' is always a database plus two decisions you have to design, what gets written and what gets read back.
The usual flavors, cheapest first: replay the whole transcript (fine until it stops fitting), keep a rolling summary, extract durable facts into a small user profile, or embed past turns and pull the relevant ones back by similarity. Agents add a fourth: a scratchpad file the agent writes and re-reads, which is memory you can open in an editor. Retrieval is the hard half. Saving everything is easy; surfacing the one line that matters at the right moment is the actual product.
Gotcha: memory poisons. A fact captured wrong once ('user prefers Python') gets replayed forever and quietly outranks what the user just said, and stale facts age badly with no expiry. Show the stored list, make every item deletable, timestamp it, and keep it small. Second: anything auto-saved is stored personal data, with the deletion and consent obligations that come with it.
Ask AI for it
Add cross-session memory to this assistant. After each conversation, run a small extraction call that returns a JSON array of durable facts about the user (stable preferences, constraints, project details), and explicitly excludes one-off task chatter, secrets, and anything the user said 'just for now'. Store each fact with an id, the text, the source conversation, and a created_at timestamp; dedupe against existing facts by embedding similarity and overwrite instead of appending when a new fact contradicts an old one. At the start of every conversation, load at most 20 facts into the system prompt under a 'Known about this user' heading. Ship a settings screen listing every stored fact with its date and a delete button, plus a 'forget everything' action.