Agent memory is a product decision, not a database choice
The hard part of agent memory is deciding what deserves to persist, who can use it, and how a person can take it back.
At 4:57 on Friday, Nora asks her travel agent to book a flight to Berlin.
The agent replies: “You do not take flights before 8 a.m., so I did not book that one.”
Nora did say that. Three months ago. It was a preference for ordinary business travel. This time, the 6:30 flight gets her to a customer meeting on time and costs $180 less.
The agent is not merely inconvenient. It is confidently wrong about Nora. That feels different. A search result can be bad. A system that remembers you badly feels as if it has been watching without understanding.
That is why agent memory is a product decision, not a database choice.
Most memory discussions begin with vector stores, embeddings, retrieval thresholds, and taxonomies. Those things matter once the product has answered four harder questions:
- What deserves to be remembered?
- Who owns a memory, especially when several people share an agent?
- How does a person see and correct what the agent believes?
- When does a memory stop being valid?
A vector store cannot answer any of them. It can find text that sounds similar to a query. It cannot know whether that text is Nora’s preference, a company rule, a one-off exception, or an embarrassing mistake copied into a summary.
The storage layer is usually the least interesting part.
Memory is not the same thing as context
A useful distinction comes first.
Context is information supplied for the current task. Nora’s departure time, destination, and passport requirements can all be part of the current request.
Memory is information carried from one task or session into a later one. “Nora prefers an aisle seat” is memory if the agent brings it up next month without being told again.
The distinction matters because context has a natural owner: the person or system that supplied it for this task. Durable memory needs a policy.
A vector store is a database that indexes numeric representations of text, called embeddings, so semantically similar items can be retrieved. It is good at answering “Which saved passages resemble this request?”
It is not good at answering “May this user see the passage?” or “Is this still true?”
Those questions require metadata and product rules. They also require restraint.
The useful companion piece on the kinds of memory production agents actually use covers the technical shapes of memory. This article is about deciding whether a particular piece of information should exist at all.
What is worth remembering?
The default answer should be: less than you think.
A product team often starts with an attractive promise: the agent will learn everything about the user and become more helpful over time. The write path then quietly becomes “save any sentence that looks personal.”
Soon the agent has hundreds of fragments:
- Nora is travelling to Berlin.
- Nora dislikes early flights.
- Nora has a client in Berlin.
- Nora once asked about a 6:30 flight.
- Nora’s old office was in Berlin.
- Nora prefers flexible bookings.
Some of these are stable preferences. Some are temporary facts. Some are merely conversation topics. A few may be sensitive. Retrieval sees text that is related. The product must decide which items deserve authority.
The promotion test
A good candidate for durable memory usually has three properties:
- It is useful across multiple future tasks.
- It is likely to remain true.
- The user would reasonably expect the agent to retain it.
“Use my work email for receipts” may pass. “I need to arrive in Berlin by 9 a.m. next Tuesday” usually does not. The second belongs in the current task, where it will naturally disappear when the task ends.
Explicit requests are the safest promotion signal. If Nora says, “Remember that I prefer aisle seats,” the product has permission to propose or save that preference.
Automatic extraction can still be useful, but it should be conservative. A single sentence should not silently become a permanent belief.
More memory, more collisions
The cost is not only storage. Every saved item creates another possible retrieval collision.
Suppose an agent has 20 carefully chosen records. It can inspect them without much confusion. Give it 2,000 fragments from old conversations and the retrieval problem becomes harder: more near-matches, more stale statements, more opportunities to treat a nearby sentence as the answer.
A larger memory is not automatically a smarter memory. It is often just a larger room in which the wrong note can be found.
Sensitive information deserves a higher bar. Do not infer a medical condition, financial hardship, political view, family situation, or identity attribute merely because a conversation hints at it. “The model noticed” is not consent.
If the product has a legitimate reason to retain such information, it needs a clear purpose, an explicit user-facing explanation, and controls designed for that sensitivity. The principles in agent data governance apply here more than any clever retrieval trick.
The product should also distinguish a preference from a constraint. “I like aisle seats” is a preference. “I cannot eat peanuts” is a constraint with much higher consequences.
The same memory mechanism should not treat them as equally safe to infer, equally safe to override, or equally safe to state with confidence.
Who owns a memory?
Ownership is not a field you add after choosing the database. It determines whether the agent is allowed to retrieve the record in the first place.
In a multi-tenant system, a tenant is a customer boundary such as a company account. A memory must be associated with an ownership scope inside that boundary.
Typical scopes include:
- one person;
- a team or workspace;
- an organization;
- a project;
- a particular conversation.
These scopes are not interchangeable.
Nora’s aisle-seat preference belongs to Nora. “The company allows refundable fares up to $800” belongs to the organization. “The Berlin customer visit is on Tuesday” may belong to a project or a task.
If the assistant stores all three as undifferentiated text, retrieval may return the right words to the wrong person.
Scope is access
A shared chat makes this worse. A statement made in a team channel may be visible to everyone in that channel today. That does not mean it should become a durable memory available to every employee forever.
Conversation visibility is an audience for an event. It is not automatically ownership of a future belief.
Imagine Leon asks the shared travel agent, “What does Nora usually prefer?” The agent should not answer from Nora’s private profile merely because both people use the same workspace.
The fact that Leon can access the bot is not proof that Leon can access every memory the bot can access.
Every memory record needs, at minimum, an owner or scope, an allowed audience, and a source. Permission filtering must happen before semantic retrieval.
It is not safe to retrieve ten similar records and remove the forbidden ones afterward if the forbidden text has already entered the model’s prompt, logs, or intermediate processing.
The same rule applies across tenants. A customer identifier in application code is not enough if the index or cache can return records without that identifier being enforced.
The safest design makes the tenant boundary part of the storage and retrieval path, then tests it as a product behavior.
Ownership also answers who may correct a memory. Nora can edit her personal travel preference. An authorized administrator may edit an organization policy.
A project member may update a project fact, but perhaps not change a company-wide approval rule. “The agent can edit its own memory” is not an ownership model. It is an invitation to confusion.
Can the user see what the agent believes?
If a memory can influence an answer, the user should have a practical way to inspect it.
Not a debug console. Not a support ticket. A normal product surface.
For Route, Nora’s memory page might show:
I prefer aisle seats.
Scope: Nora
Source: Nora told Route on 12 May
Last confirmed: 12 May
Review: 12 August
The useful controls are equally plain: edit, forget, pause personalization, and change scope where the user is allowed to do so.
Source and correction
The source matters because a user needs to judge why the system believes something. “I never said that” is a different problem from “I said that once, but it was temporary.”
Both are hard to fix if the product shows only a polished sentence with no origin.
Correction must be a first-class operation. If Nora says, “I now take early flights when I have a customer meeting,” the agent should not merely obey that turn and leave the old memory untouched.
It should offer a clear choice:
- apply this only to today’s booking; or
- update the preference for future bookings.
That small distinction prevents a common failure mode. The first symptom is usually not a database error.
It is the agent behaving inconsistently: it follows Nora’s new instruction in one conversation, then rejects it a week later because the stale memory is still present.
Do not make users learn a secret command such as “forget that.” A visible memory control is better than a magic phrase because it shows what can be changed and confirms what happened.
A correction buried in chat is easy to miss, difficult to audit, and often fails to update derived data.
This is part of agentic UX, not a privacy appendix. A user cannot meaningfully trust a system whose beliefs are invisible.
When should a memory expire?
Time is not the only thing that makes a memory stale, but time is a useful warning.
Some facts have a natural end date. “Nora is working from Berlin this month” should expire at the end of that assignment. Others need review rather than automatic deletion.
“Nora prefers aisle seats” may remain useful for years, but the product should still allow the user to confirm or change it.
Expiry and precedence
An expiry policy can use several signals:
- a fixed end date for a temporary fact;
- a review date for a longer-lived preference;
- an event that invalidates the memory, such as a role change or closed project;
- inactivity, where an unused preference becomes eligible for review;
- explicit deletion by the user.
A company approval threshold should usually come from the company’s policy system, not from a remembered sentence in a chat. If it must be cached, the cache should have a source and an invalidation path.
“Never expires” is not a policy. It is a future incident with excellent posture.
Recency and stability also conflict. The latest statement is not always the truth, and an old statement is not always authoritative.
Nora’s current request to book the 6:30 flight should outrank her old general preference. But it should not necessarily rewrite that preference. A one-time exception is not a durable change.
If she says, “I now prefer early flights,” that is stronger evidence of a lasting update.
A simple precedence rule is more useful than a single retrieval score:
current explicit request outranks authorized current policy, which outranks confirmed personal preference, which outranks inferred candidate.
Recency helps choose among comparable memories. It should not overrule scope or explicit intent.
The trust cost is asymmetric. A correct preference may save Nora 15 seconds of retyping. A wrong preference may make her miss a meeting, expose a private detail, or cause her to stop trusting the assistant entirely.
In low-stakes situations, the agent can quietly use a well-confirmed preference. In high-stakes situations, it should surface the conflict and ask.
A good response might be:
You previously asked me to avoid departures before 8 a.m. This request is for 6:30 a.m. Should I treat this as a one-time exception or update your preference?
That is slightly slower. It is also much less creepy than confidently refusing the flight.
“Forget it” must reach every copy
Deletion is not complete when one vector disappears.
A vector store may contain the embedding and metadata for Nora’s memory. A summary may contain a compressed sentence that repeats it. A trace is a record of the agent’s execution, often including messages, retrieved context, tool calls, and outputs.
The same personal fact can exist in all three.
Suppose Nora deletes her old office address. A complete deletion workflow must consider:
- the source memory record;
- its embedding and metadata;
- indexes and replicas;
- conversation or profile summaries;
- application caches;
- search or reranking caches;
- traces and logs;
- exported analytics;
- backups and disaster-recovery copies;
- retention by any external model or tool provider.
The deletion path
Deleting only the vector creates a particularly unpleasant illusion. The memory page says the address is gone, but the summary still supplies it to the model.
The agent then appears to “remember” something the product claims to have forgotten.
The reverse problem is possible too. A trace may retain the original utterance even after the user-facing memory has been deleted.
That trace may be useful for debugging, but usefulness is not a universal exemption from deletion obligations. If traces contain personal data, their retention, redaction, access, and deletion behavior need to be designed explicitly.
Agent observability should make failures diagnosable without turning every prompt into a permanent second database.
A production system should maintain a deletion map: for each memory type, where is the data copied, derived, cached, or exported?
“Forget” should revoke use immediately, so the agent stops retrieving the record while asynchronous cleanup runs. The interface should state what has been removed and what remains under a documented retention rule.
If backups expire after 30 days, say so. Do not promise instant physical deletion if the architecture cannot provide it.
Deletion can also be required across a tenant. If a company leaves a SaaS product, removing the obvious profile row is not enough if old summaries, indexes, and logs remain searchable.
Storage design matters here, but only because it supports the product promise. The promise comes first.
The honest case for a stateless agent
Many products do not need durable agent memory at all.
A stateless agent does not carry user-specific beliefs from one session to the next. It still has context during a task.
Route can receive the following in the current request:
- Nora’s origin;
- destination;
- dates;
- seating preference;
- account permissions;
- company travel policy.
It can do useful work without deciding that every sentence deserves a future life.
This approach is often better for customer support, internal search, document analysis, and transactional workflows. The product can pass explicit context from reliable systems:
- account settings from a profile database;
- current permissions from the identity system;
- project details from the project database;
- policy from the policy service;
- documents selected by the user.
A saved setting is not necessarily agent memory. “Always use my work email” can live in a normal, structured profile field.
Structured data is easier to validate, edit, authorize, expire, and delete than a prose fragment hidden among embeddings.
The strongest argument for memory is fair: continuity is valuable. If a user has explained their preferences ten times, forcing them to repeat everything makes the agent feel like a goldfish with an API key.
For coaching, long-running research, personal organization, and some creative tools, remembering may be central to the product.
The answer is not to ban memory. It is to make continuity an explicit product feature with boundaries.
Save fewer things. Use clear scopes. Show the user what persists. Require confirmation for sensitive or consequential beliefs. Prefer structured profile data when the fact has a fixed shape. Keep temporary task context temporary.
Memory should earn its place by providing repeated value that outweighs the cost of being wrong.
What to do on Monday
Start with one narrow job, not “make the agent remember everything.” For Route, that job might be recurring travel preferences.
Write a one-page memory policy before choosing a vector database.
State:
- what may be saved;
- what must never be inferred;
- which scope each item can have;
- who may read it;
- what makes it expire.
Put “less than you think” in the default column.
Then begin with explicit save. When Nora says, “Remember that I prefer aisle seats,” save a record with:
- an owner;
- scope;
- source;
- creation time;
- last confirmation;
- review or expiry rule.
Do not silently promote every personal-sounding sentence.
Build the memory view before the automatic extraction pipeline. Let Nora see the statement, its source, and its scope.
Give her:
- edit controls;
- forget controls;
- pause controls.
Make “one-time exception” different from “change my preference.”
Make retrieval obey authorization before similarity. A semantically perfect result from the wrong person or tenant is still a forbidden result.
Make the current request outrank an old preference, and ask when the conflict matters.
Finally, test the product with the failures users will actually notice:
- an old preference conflicts with a current request;
- a team member asks about another person’s private preference;
- a temporary fact survives past its end date;
- a user deletes a memory and the agent still repeats it from a summary;
- a tenant is deleted while traces and backups still exist.
Measure harmful recall, not just helpful recall. Track:
- correction rate;
- forgotten memories that reappear;
- permission failures;
- how often users disable personalization.
A memory feature that saves 15 seconds but creates one unforgettable wrong answer may be losing the product.
The database can wait. The memory policy cannot.