Slopfluencer

Notes › AI › Agents

Agent memory

Agent memory is everything an AI agent carries from one conversation to the next. A language model on its own remembers nothing between sessions. Each new conversation starts from the model's training and whatever text is placed in front of it. Memory is the set of files, databases and search tools that put the right past information back in front of the model when it needs it.

Without memory, an agent has to be told a person's preferences, procedures and past decisions in every session. Products handle this with anything from plain text files the agent reads at startup to vector databases, knowledge graphs and background jobs that summarize old conversations.

My view, argued in Plain files and search beat memory systems, is that a few plain files plus search over past transcripts cover nearly all of it, and that most elaborate memory systems spend effort before anyone knows what will be needed.

Background

Before agents, the same problem existed for people under the name personal knowledge management. I spent years moving between note-taking tools, built two of my own, and wrote in 2022 that I couldn't settle on one.[16] I later settled on plain Markdown files in Obsidian, a note editor that stores notes as ordinary files.[17] That habit carried over. When I started building agents in 2026, I gave them a folder of Markdown files with metadata at the top of each file, which both the agent and I could read and edit.[18]

The question changed shape with agents. A person's notes are for that person to reread. An agent's memory has to be found and used by a model in the middle of a task, often without the person knowing it was needed. That makes retrieval, choosing what to show the model, the main design problem.

Kinds of memory

Most designs separate three kinds of information. The split borrows loosely from psychology, which distinguishes memory for facts (semantic), for skills (procedural) and for past events (episodic).

Preferences and facts are stable information about the person and their work: how they like code written, which tools they use, what a project is for. These usually live in a short instruction file the agent reads at the start of every session. In coding tools this is often called AGENTS.md; in my setup each long-running bot keeps a memory.md for small reminders.[7]

Procedures describe how to do recurring tasks, such as deploying a site or writing up an experiment. These are written as skills, instruction files the agent loads when a task calls for them. Skills can be written by people or by the agent itself. I ran a nightly job that read the day's sessions and extracted new skills, and a weekly job that deleted skills nobody had used.[5]

Episodic history is what happened, including past conversations, decisions and failed attempts. This is the largest store and the hardest to use, because most of it is irrelevant to any given task.

I sum up the requirement as preferences, workflows and the past, and each already has a simple implementation.[1][2]

How it works

Retrieval-augmented generation

The most common approach to episodic memory is retrieval-augmented generation (RAG). Text is cut into chunks, each chunk is turned into an embedding, and the embeddings are stored in a vector database. At question time the query is embedded too, and the closest chunks are added to the prompt. The name comes from a 2020 paper by Lewis et al., which paired a text generator with a dense vector index of Wikipedia and found that the combined model answered open-domain questions better than a model relying on its trained weights alone.[13] The paper's framing still shapes the field. It calls the model's weights parametric memory and the index non-parametric memory, which is the same split agent memory products make today. Graph-based variants extract entities and relationships into a knowledge graph instead of, or as well as, chunks.

RAG has known limits. A 2025 paper showed a mathematical one. An embedding is a fixed-length list of numbers, and the length caps how many different combinations of documents a search can return as the top results. Strong embedding models failed a simple test built to hit that limit.[8] Another found that many RAG errors happen because the retrieved text was not enough to answer the question, and that large models tend to answer anyway instead of saying so.[9] Many memory systems also process everything in advance, running a background step that summarizes and reorganizes memories before any task asks for them. Anthropic calls this step "dreaming"; in November 2026 it described dreaming as how Claude organizes what it has learned and corrects its mistakes.[20] My objection is that this duplicates data that already exists and pays for work most of which will never be used.[3]

Search over raw history

The alternative is to keep history as plain text and let the agent search it with ordinary tools, such as grep, the standard Unix text-search command, or a command that searches past agent conversations. Coding agents already spend a large share of their effort this way; one analysis found that about half of a coding agent's tool calls are reads and searches.[11] In my experience, searching past sessions directly is the most valuable memory an agent has.[4] A session search tool was one of the first plugins I added to my own workbench in August 2026,[14] and my bots now keep a small memory file for reminders and rely on searching their past threads for almost everything else.[7]

Event logs

A third design records everything as a log of events that are never edited, and answers each question by querying that log when the question arrives. An essay from the company Hatchery reported that an agent writing SQL queries over its own event log matched or beat published memory systems on agent-memory benchmarks, and that summarizing in advance added little as models improved.[10] This is close to the search approach, since both keep the raw record and spend effort only when a question arrives. It is an instance of the bitter lesson, the observation that general methods that use more computation tend to beat hand-built structure.

Learning from experience

Some research systems go further and distill lessons from past attempts. Google's ReasoningBank stores reusable reasoning strategies drawn from both successful and failed runs.[12] Skill extraction in my setup is a simpler version of the same idea, with a person able to read and delete what was learned. A different line of work trains the model instead of the store. EngramLab reported in November 2026 that reinforcement learning can teach a model how to use its own notes, and that this training was cheap compared to building the notes.[21] I called it an example of how memory research should be done.[22]

History and timeline

  • 2020: Lewis et al. publish the paper that names retrieval-augmented generation.[13]
  • May 2022: I write about cycling through note-taking tools without settling on one.[16]
  • Feb 2023: I describe a plain-file Obsidian setup.[17]
  • May 2026: I describe the knowledge base behind my agent: skills, a preferences file and shared Markdown notes.[18]
  • Jun 2026: I start nightly skill extraction from sessions[5] and look at designs that give each agent its own memory store, such as a git repository per agent, versioned like code.[6]
  • Jun 2026: I write that the ideal is to put everything into the agent's context, since every step that manages context for the agent leaves it less information, and predict that context management will disappear within a decade.[19]
  • Aug 2026: I add a session search tool to my workbench.[14]
  • Sep 2026: I start Spool, a local event bus that pulled my email, calendar, browser history, GitHub and X activity into one stream an agent could query. It gave an agent a rough sense of what I was doing, but no clear use for it emerged, and I later shelved it.[15]
  • Oct 2026: I settle on long-running bots with a small memory file and thread search.[7]
  • Nov 2026: I argue publicly that most memory systems are unnecessary.[1]

My position

Simple tools already cover most of what agent memory needs, and many memory systems add machinery the job does not require. Preferences go in one short file, procedures become skills, and the past is searched when a task needs it. I have built the heavier version. Spool pulled my email, calendar, browsing and other feeds into one stream on the theory that the more complete the context, the better an agent would decide on my behalf. An agent could query it and get a rough picture of my week, but no task I had needed it.[15] Bots that fetch from a source only when a task asks for it replaced it. The lesson I took is to pick the job before collecting the data. The full argument is in Plain files and search beat memory systems, and the case for teaching an agent deliberately is in An agent is only as useful as what it knows about you.

Criticism and counterpoints

Search works when the agent knows roughly what to look for. It works less well for connections nobody thought to ask about, which is what graph and summary approaches claim to surface. Raw transcripts also grow without limit, and searching them costs time and tokens on every task instead of once up front. Context windows are large but finite, and a search that returns fifty matching sessions still leaves the agent to choose among them.

The line between search and RAG is also blurrier than the debate suggests. Running grep over transcripts and pasting the matches into the prompt is retrieval followed by generation, so in the literal sense it is RAG. What the two camps disagree about is whether to build an embedding index and preprocess memories ahead of time, or to search the raw record when a question arrives.

Some knowledge never reaches a file at all. Decisions made in calls, in meetings or in someone else's tools leave no transcript to search, and a memory product that connects to meeting notes, email or team chat and records decisions from them as facts covers ground that search over an agent's own sessions cannot.

Keeping everything also has a privacy cost. A raw history holds whatever was said, including things a person would not want an agent to repeat, and deleting from many plain files is harder to audit than deleting from one store.

Open questions

  • At what volume of history does plain search stop being enough?
  • Will models that update their own weights, such as research on self adapting models, make external memory less important?
  • How should an agent forget? Skill pruning is a start; transcripts have no equivalent yet.

See also

Change log

  • 2026-12-03: Enriched with "dreaming", training models to use their notes, and my view that the ideal is to put everything in context.
  • 2026-12-03: Enriched with the 2020 RAG paper, a dated Spool entry and two new counterpoints.

Reading

References

  1. ^ Memory systems are mostly garbage (post, Nov 2026)
  2. ^ Memory systems are mostly garbage (@trashpandaemoji, Nov 2026)
  3. ^ RAG memory duplicates data and wastes tokens; agents grep fine (@trashpandaemoji, Nov 2026)
  4. ^ Grepping past sessions beats sophisticated RAG memory (@trashpandaemoji, Oct 2026)
  5. ^ Nightly skill extraction from past sessions (@trashpandaemoji, Jun 2026), since deleted
    I'm slowly starting to lean into automations a bit more. - Weekly skill to look at my past sessions and delete unused skills - Nightly skill to look at the past day's sessions to extract skills - Nightly loop for Neon Pilot that hardens the Neon Pilot codebase (code quality,…
  6. ^ Memory tied to the agent abstraction: one agent, one memory repo (@trashpandaemoji, Jun 2026), since deleted
    Memory seems to be tied to the agent abstraction, so 1 agent = 1 memory repo. Skills seem to be included in memory. I'm not fully bought in on the agent framing yet, but I get why they did it to tie it to memory. Memory looks like a git repo with skills, and markdown files like personas?
  7. ^ Bots with a memory file, thread search as the main memory (@trashpandaemoji, Oct 2026)
  8. ^ Weller et al., On the Theoretical Limitations of Embedding-Based Retrieval
  9. ^ Joren et al., Sufficient Context: A New Lens on Retrieval Augmented Generation Systems
  10. ^ Hatchery, The Bitter Lesson for Agent Memory
  11. ^ About half of a coding agent's tool calls are reads and searches (@EntireHQ, May 2026)
  12. ^ ReasoningBank: agents that learn from past successes and failures (@GoogleResearch, Apr 2026)
  13. ^ Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  14. ^ A local event bus as a single stream of context about me (@trashpandaemoji, Sep 2026), since deleted
    I'm starting to experiment with this idea. I built a local event bus that gets data published to it from various sources. My email and calendar, browser history, github, twitter interactions, and various random sources like hooking it up to my meshtastic node and arxiv. The goal is to try to get as much context into a single source, a single stream of context that I would receive. My hunch is that, if it hits my eyeballs or concerns me, then I want events fired into this event bus. So far its pretty interesting but no major use case as fell out of it yet. An agent is able to query the data and get a general, rough sense of what I'm currently doing and what interests me. A rough first use case is to have a persistent agent wake up and inspect the event bus every so often and keep notes and keep an eye out for anything particularly interesting. I don't really have a specific need yet though. Still exploring this space. The rough feeling I have is that if I have a single place where an agent can look to gather context about me that's as complete as possible, it can do a better job making decisions on my behalf.
  15. ^ Note taking hell (post, May 2022)
  16. ^ How I use Obsidian (post, Feb 2023)
  17. ^ Personal Agent's knowledge base (post, May 2026)
  18. ^ Ideally everything goes into the agent's context (@trashpandaemoji, Jun 2026), since deleted
    At the end of the day its just context management and a way to chain operations to reduce the amount of context and agent turns. IMO the optimal case is if we're able to put everything into the agent's context if intelligence and context length wasn't an issue. Every "dumb" operation we try to do or have the agent do to manage its own context reduces the amount of information it has to work with. I think in a decade you'll be able to just dump everything into the model and context management will be a thing of the past.
  19. ^ How dreaming helps Claude organize what it has learned (@AnthropicAI, Nov 2026)
  20. ^ RL complements text-based memory by teaching models to use their notes (@EngramLab, Nov 2026)
  21. ^ This is how you do quality memory research (@trashpandaemoji, Nov 2026)