{
  "id": 281010,
  "title": "Agent Memory: Short-Term, Long-Term and What's Just a Database",
  "url": "https://urgent.news/2026/08/07/agent-memory-short-term-long-term-and-whats-just-a-database",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-07T21:20:53.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/multigrid/agent-memory-short-term-long-term-and-whats-just-a-database-4ole"
  },
  "original_language": "en",
  "account": "A model possesses no inherent memory. Instead, it operates using a context window that is repeatedly sent in full on each request and subsequently erased. The term \"memory\" associated with agent functions is merely a decision-making process about what to include in this window and where the rest of the information is stored. The use of metaphors like \"short-term\" and \"long-term\" from cognitive psychology is misleading, as there is no automatic transfer of data between storage locations or a forgetting curve.\n\nWhen assessing agent memory, it is advisable to consider three technical questions: when the data is written, when it is retrieved, and what determines its removal. Anything that claims memory status without answering these questions is essentially a vector database with aspirations beyond its capabilities.\n\nThere are three distinct memory patterns:\n\n1. The Transcript: This is the complete history of every action taken by the model, written automatically and read in its entirety with each request. It expires when it reaches the context limit through a compaction process. This memory type is the most expensive, as its cost increases quadratically with the number of steps.\n\n2. The Fact Store: This type of memory is written either manually by the agent or through a post-run extraction process. It is read by a retrieval system, typically using a top-k approach. The data expires based on various criteria such as time-to-live (TTL), supersession, or may persist indefinitely. It is commonly referred to as long-term memory.\n\n3. External State: This refers to the actual changes made by the agent, such as editing a file, updating a database, or modifying a task list. It is read by the agent when needed and expires when the related information is altered. Unlike the previous two types, this is not considered memory, as it is reliable and requires no embedding model or retrieval tuning.\n\nEffective compaction policies should be established to determine what information should be dropped first. Prioritize removing old tool outputs, superseded results, and middle reasoning steps. Maintain the system prompt, original task, and the final two steps, as dropping these can lead to the agent finishing a task adjacent to the one initially requested.\n\nFor a fact store implementation, consider creating a table with columns that facilitate maintainability. Incorporate provenance, supersession, and self-contained sentences. Facts should be limited to five per request to avoid unnecessary costs. Additionally, implement safeguards to prevent the agent from writing facts about unverified content, maintaining source information, and regularly reviewing and updating the memory store.",
  "summary": "A model has no memory. It has a context window, which is re-sent in full on every request and forgotten completely between them. Everything marketed as agent memory is a decision about what to put in that window and where the rest is kept. The metaphor is doing damage Borrowing “short-term” and “long-term” from cognitive psychology implies a consolidation process that does not exist. Nothing…",
  "key_points": [
    "Agent memory operates through context window, not inherent data storage.",
    "\"Short-term\" and \"long-term\" are misleading metaphors for memory.",
    "Three memory patterns: Transcript, Fact Store, and External State."
  ],
  "editors_take": null,
  "illustration": "https://urgent.news/ill/281010.png",
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}