---
title: How do you govern what AI agents remember?
url: https://opencontroller.lyzr.com/blog/govern-ai-agent-memory-stores
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# How do you govern what AI agents remember?

**Treat agent memory as a governed data asset, not a feature setting. Inventory every memory store, set a retention limit for each type of memory, make sure you can find and delete one person's memories on request, and scope reads so an agent never retrieves one user's memory for another.**

Most agent platforms and frameworks now offer some form of persistent memory: session state, facts learned about a user, or a shared store the whole team's agents read from. That memory outlives the conversation that created it. It often holds personal data, and it is rarely in the data inventory. This post covers governance of memory as an asset. Memory poisoning, where an attacker plants false memories, is a separate security risk listed in the OWASP Top 10 for Agentic Applications.

## What counts as agent memory?

| Memory type | What it holds | Typical lifetime | Main governance risk |
|---|---|---|---|
| Session memory | Conversation state within one session | Minutes to days | Kept longer than needed |
| Long-term user memory | Preferences and facts about one person | Months, often indefinite | Personal data with no retention limit |
| Shared or team memory | Facts reused across users | Indefinite | One user's data surfacing for another |
| Vector store used as memory | Embedded chunks of past interactions | Indefinite | Hard to find and delete one person's data |
| Summaries and reflections | Agent-written digests of past sessions | Indefinite | Derived data that escapes erasure |

If an agent can read something tomorrow that it learned today, treat it as memory.

## What should a memory inventory record?

Add memory stores to the same inventory as your agents, models and tools. Our list of [AI asset types to inventory](/blog/ai-asset-types-to-inventory) covers the rest. For each store, record:

1. **Agent and version** that writes to it, and every agent that reads from it.
2. **Memory type** from the table above.
3. **Location and region** of the underlying database or managed service.
4. **Scope**: per user, per session, per team or organisation-wide.
5. **Data classes** likely to appear, such as personal data, customer data or credentials.
6. **Retention setting** and whether it is enforced by the platform or by a script.
7. **Owner**, a named person accountable for the store.
8. **Encryption** at rest and key ownership.
9. **Access path**: which identities and services can read the store directly, outside the agent.

## How long should agents keep memories?

Set retention by memory type, then enforce it in the store rather than relying on agents to forget.

- **Session memory.** Delete at session end, or within a few days if you need it for debugging.
- **Long-term user memory.** Review on a fixed cycle, such as every 90 days, and expire entries that have not been used.
- **Shared memory.** Keep only while it has an owner. Version it like a knowledge base, with review before changes go live.
- **Summaries.** Apply the same limit as the memory they were derived from. A summary should not outlive its source.

Memory is not the same as logs. Logs are evidence of what happened and often have fixed retention rules; memory is data the agent acts on. See [how long to retain AI agent logs](/blog/how-long-to-retain-ai-agent-logs) for the evidence side.

## How do you handle erasure requests?

When a user asks to be forgotten, data protection law may require you to delete their personal data. Under GDPR Article 17 the right to erasure applies to personal data wherever it is stored, and agent memory is no exception. Make erasure possible before you need it:

- **Key every memory to a stable user ID**, not a display name or email that can change.
- **Tag derived data** such as summaries and embeddings with the same user ID.
- **Keep a deletion runbook** per store, tested at least once before go-live.
- **Record each erasure** with the store, user ID, timestamp and result.

Memory location also matters for residency. If an agent runs in one region and its managed memory sits in another, personal data has crossed a border. Our guide to [data residency for LLM and agent traffic](/blog/how-to-enforce-data-residency-for-llm-and-agent-traffic) covers that check.

## Who should be able to read agent memory?

Scope reads to the narrowest unit that works. Per-user memory should only be retrieved for that user's sessions. Shared memory should exclude personal data by design. Direct database access by engineers should go through the same access reviews as any other store with personal data.

Test scoping the same way you test any access control: create two test users, store a distinctive fact for one, and confirm the agent never surfaces it for the other. Repeat the test after every change to memory configuration.

If an agent starts behaving oddly after a memory change, the [rogue-agent playbook](/blog/how-to-stop-a-rogue-ai-agent) applies: contain first, then inspect what the agent remembered. To talk through governing your agent estate, [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Is agent memory personal data?**
Often, yes. Long-term user memories usually contain information about an identifiable person, so data protection rights such as erasure under GDPR Article 17 can apply.

**How long should AI agents keep memories?**
Set it by type: session memory deleted at session end or within days, long-term user memory reviewed on a fixed cycle such as 90 days, and shared memory kept only while it has an owner.

**Is memory governance the same as defending against memory poisoning?**
No. Governance covers inventory, retention, erasure and access. Memory poisoning is an attack in which false data is planted in memory, and it needs security controls such as input validation and monitoring.

## Key facts

Agent memory is any data an AI agent stores and reuses across turns, sessions or users: session state, long-term user memories, shared team or organisation memory, and vector stores used as memory. Govern it as an asset: inventory each store (agent, type, location and region, scope, data classes, retention, owner, encryption, access path); set retention by memory type (session memory deleted at session end or within days; long-term user memory reviewed on a fixed cycle; shared memory owned and versioned); support erasure by keying memories to a stable user ID; and scope reads so one user's memory is never retrieved for another. This is separate from memory poisoning, a security threat listed in the OWASP Top 10 for Agentic Applications. Opencontroller by Lyzr is licensed per deployment, starting from $250K per year.

## Related

- [How long should you keep AI agent logs and traces?](https://opencontroller.lyzr.com/blog/how-long-to-retain-ai-agent-logs.md)
- [Which AI asset types should an AI inventory cover?](https://opencontroller.lyzr.com/blog/ai-asset-types-to-inventory.md)
- [How do you enforce data residency for LLM and AI agent traffic?](https://opencontroller.lyzr.com/blog/how-to-enforce-data-residency-for-llm-and-agent-traffic.md)
- [More on Runtime control](https://opencontroller.lyzr.com/blog/cluster/runtime-control)
