---
title: "Agent Memory: What Outlives the Run"
description: "Agent memory is the knowledge that survives a run, not the working state inside one. This explainer separates the two, then maps the write path, the read path, and the database limits that cap recall."
---

# Agent Memory: What Outlives the Run

**Type:** [What is it?](https://yomu.fyi/visual-explainers/category/what-is-it.md)

![A what-is diagram of agent memory: a central concept panel separating run-bound state from durable memory, with write-path, read-path, and database-ceiling panels arranged around it in one top-to-bottom reading column.](https://yomufyi.s3.us-east-1.amazonaws.com/visual-explainers/0ddfc1d9-0726-465a-b2ee-7ea3214498ac/image-3f8ea82a-479e-4a7b-8d9d-c9dc9716be6f.webp)

> Agent memory is the knowledge that survives a run, not the working state inside one. This explainer separates the two, then maps the write path, the read path, and the database limits that cap recall.

## Explanation

Agent memory is the knowledge that outlives a single execution: past conversations, feedback, trajectories, and business context a later run can read. It differs from agent state, the working data a run holds while it executes, and that split decides what gets compacted and stored outside the context window. In practice memory has a write path, where enterprise data arrives through change data capture, chunking, embedding, and provenance stamps, and a read path, where recall must respect permissions and sensitivity labels. The database underneath sets the ceiling on isolation, hybrid search, and ACID guarantees, which is why memory is an infrastructure decision, not a prompt trick.

## FAQ

### Why is compaction lossy, and how early should an agent compact its context?

Compaction decides what to keep when the context window fills, so it discards information by construction and sets both token cost and reliability. Chroma's study found models become unreliable well before their advertised 200k-token window, and teams reported either compacting at 95% or proactively at 60%.

### What minimum bars must a database clear to serve agent memory in production?

The proposed criteria are per-agent branch isolation, serverless scale-to-zero, hybrid search, ACID guarantees, and unified platform access, because agents repeatedly read and write, resume tasks, and share state concurrently. A database missing more than one of these becomes a production risk, and plain Postgres supplies ACID but not branching or scale-to-zero.

### Does accumulating memory really improve an agent, or just make prompts longer?

Memory scaling argues performance improves when an agent accumulates past conversations, feedback, and business context in persistent external memory, read back through selective retrieval instead of a longer context window. In MemAlign experiments on Genie Spaces, labeled examples raised test scores from near zero to 70% while average reasoning steps fell from about 20 to 5.

**Tags:** [Agent Memory](https://yomu.fyi/topic/agent-memory.md), [AI Agents](https://yomu.fyi/topic/ai-agents.md), [Databases](https://yomu.fyi/topic/databases.md), [LLMs](https://yomu.fyi/topic/llm.md), [Postgres](https://yomu.fyi/topic/postgres.md), [Retrieval-Augmented Generation](https://yomu.fyi/topic/retrieval-augmented-generation.md)

## Related reading

### [Database for AI Agents: 5 Evaluation Criteria](https://yomu.fyi/post/database-for-ai-agents-5-evaluation-criteria.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Databricks Staff
- Published: Sep 18, 2026
- Type: Explainer

The post defines a database for AI agents as infrastructure for short-term, episodic, procedural, and operational memory, rather than merely a place to retrieve documents. It proposes five evaluation criteria for moving agent workloads from prototypes to production: per-agent branch isolation, serverless scale-to-zero, hybrid search, ACID guarantees, and unified platform access. The technical rationale is that agents perform repeated reads and writes, resume tasks, share state concurrently, and need current data across vector, keyword, and metadata retrieval; zero-copy branches, sub-second wakeups, and single-query hybrid search address specific operational constraints. It concludes that a database missing more than one minimum bar becomes a production risk, while standard Postgres alone supplies ACID but not branching, scale-to-zero, or unified operational and analytical access.


### [How Databricks Helps Baseball Teams Gain an Edge with Data & AI](https://yomu.fyi/post/how-databricks-helps-baseball-teams-gain-an-edge-with-data-ai.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Nick Ragonese, Wesley Pasfield
- Published: Sep 18, 2026
- Type: Explainer

Baseball teams can use Databricks to turn Statcast and team-derived pitch-level data into game-day plans for hitters, bullpen changes, pinch-hit choices, advance scouting, and roster decisions. Genie, on Unity Catalog, queries governed Delta tables and reusable Unity Catalog SQL functions for tendencies by count, handedness, pitch type, location, and base-runner state. A Multi-Agent Supervisor built with Agent Bricks and deployed on Model Serving simulates matchup pockets, compares reliever arsenals with hitter profiles, and produces explanations that staff distill into printed decision cards. For advance work, AI Search indexes pitcher and hitter embeddings to find similar arms, while Lakebase Postgres keeps reports, tags, and decisions close to the source data for shared operational memory.


### [Database Branching in Postgres: Git](https://yomu.fyi/post/database-branching-in-postgres-git.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Susan Pierce
- Published: Sep 18, 2026
- Type: Problem & solution

Shared staging databases often drift as schemas diverge, test data accumulates, and developers avoid creating isolated environments because traditional pg\_dump copies are slow and expensive. Databricks Lakebase Postgres addresses this with database branching, which creates fully isolated environments from a parent’s exact schema and data at a point in time. Branches use copy-on-write: they share underlying versioned storage until a branch changes, then record only new data, while each branch has independent compute and a separate connection string. Idle branches scale compute to zero, and storage cost tracks changes rather than the full database size. This supports per-developer, per-pull-request, per-test-run, and recovery workflows, including point-in-time branching within the restore window, with the source describing branch creation through the console, CLI, or API in under a minute.


### [Memory scaling for AI agents](https://yomu.fyi/post/memory-scaling-for-ai-agents.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: The Databricks AI Research Team
- Published: Sep 18, 2026
- Type: Explainer

Memory scaling is proposed as an agent’s performance improving when it accumulates past conversations, feedback, interaction trajectories, and business context in persistent external memory. Unlike model-parameter or inference-time scaling, it relies on selective retrieval to supply relevant information without filling long context windows. In MemAlign experiments on Databricks Genie Spaces, adding labeled examples raised test scores from near zero to 70%, about 5% above an expert-curated baseline, while average reasoning steps fell from about 20 to 5; filtered user logs produced similarly strong gains, exceeding 50% after 62 records. Production use requires storage and retrieval for episodic and semantic memories with organizational and user-level scoping, plus controls that preserve permissions and sensitivity labels.


### [Auth0 Agent Gateway: The Identity Control Plane for Customer-Facing AI](https://yomu.fyi/post/auth0-agent-gateway-the-identity-control-plane-for-customer-facing-ai.md)
- Company: [Auth0](https://yomu.fyi/company/auth0.md)
- Author: Andrés Aguiar
- Published: Sep 18, 2026
- Type: Announcement

Auth0 Agent Gateway is announced in beta as a Customer Identity and Access Management (CIAM) control plane for governing product-native, customer-facing AI agents in multi-tenant SaaS applications. It addresses a trust model involving organizations, delegated user access, customer consent, independently owned connected accounts, and cross-tenant data boundaries, rather than workforce-only identity. Positioned between an agent and its tools, the gateway evaluates each call using agent, user, and organization context; it uses Organizations, Agents as Principals, Token Vault, token exchange, tenant logs, and administrative controls. The described capabilities include short-lived agent-only tokens, user-scoped credentials, runtime tool authorization, audit logging with optional SIEM streaming, and an agent kill switch. Auth0 is seeking product and engineering teams to join the beta.


### [Agent Memory Inside the Harness](https://yomu.fyi/post/agent-memory-inside-the-harness.md)
- Company: [MongoDB](https://yomu.fyi/company/mongodb.md)
- Published: Aug 18, 2026
- Type: Explainer

The post distinguishes agent state, the run-bound working data of a single execution, from agent memory, knowledge that outlives the run and is read across sessions. Context compaction, which decides what to keep when the window fills, is lossy by construction and sets both token cost and reliability; Chroma’s study found models become unreliable well before their advertised 200k-token window, and teams compact at 95% or proactively at 60%. System prompts and skills must be versioned, governed infrastructure, not text files, with prompt registries and the SKILL.md standard for procedural memory, and skills are executable so they require sandboxing. Enterprise data enters memory through pipelines like change data capture, not migrations, with chunking, embedding, and provenance stamps. The database choice caps filtered recall under selective scoping, the consistency window, and temporal modeling, setting the ceiling for later decisions.
