ShoutAd.GonzaloGomezRufino

Blog · 25 November 2026

What an AI Agent Should Remember and What It Should Forget

Type “AI agent memory” into Google. The top results mix model context windows with “memory” as a full chat log. Lots of vague promises. Almost nobody says which fields are worth keeping, how long they last, and when to forget them.

I need this clear to design. An agent that remembers well performs and stays out of trouble. One that hoards rubbish answers worse and exposes data. We saw it in agents vs chatbots: an agent remembers. Here I get operational.

Essential memory fields

Identity and consent. Minimum: a stable identifier, consent status, and authorised scope. Without this, the agent should not persist anything else. Include when permission was obtained and for what. This is the root of responsible agent memory.

Operational preferences. Preferred output format, language, tone, and valid channels for notifications. Also detail thresholds. Not sensitive if designed well. Updated often and not worth keeping forever.

Current goals and constraints. What the user wants now, what the agent must not do, and which limits apply (budget, hours, jurisdictions). Keep a clear, updatable goal state. Do not build an infinite stack of past requests.

Summarised task history. Do not store raw chat. Store canonical summaries of what the agent did, with date, outcome, and next step. These let you resume work and audit. If there is no summary, the agent re-explores and costs rise.

Resource and connector state. Which integrations are active, with which permissions, last valid tokens, and scopes. This prevents failed attempts and expired credential errors. Technical information, not narrative.

Transient session context. A short-lived scratchpad with intermediate variables and live decisions. It lives briefly and dies when the task closes. It stops durable memory from getting polluted with details that only matter during execution.

Quality signals. Explicit feedback (“this helped”, “this did not”), success metrics by goal, and failure patterns. Not to profile users. To correct the agent. Store in aggregate and with care.

Exceptions and blocks. What was prohibited by the user or by policy. Recording blocks prevents repeat attempts and protects everyone. Keep them separate from preferences, so “I do not want” is not mixed with “I must not”.

Expiry and renewal: how each thing ends

Useful memory moves. Not everything lasts the same. The healthy approach is to set expiry by type and add explicit renewal. Also define decay rules: if an item is unused, it loses weight or gets deleted.

Identity and consent: they last while the relationship exists and consent remains valid. When the user withdraws permission, delete whatever depended on it. No exceptions.

Preferences: short expiry if unused. Example scenario: if a preference does not apply for several weeks, ask for confirmation before using it again. This avoids an old choice distorting current outputs.

Goals: they expire on completion or when the agreed work window ends. Typical scenario: if there is no activity during a predefined period, archive the goal and ask whether it still stands before acting.

Task summaries: keep them until the project closes or they lose operational value. Then archive or anonymise. If they are not consulted for a while, compact them further.

Resources and connectors: they expire on events (revocation, key rotation, permission changes). A fixed clock makes no sense. Infrastructure sets the rules here.

Transient context: it dies when the task ends, or earlier if the agent enters a new branch. Hoarding it only adds noise to retrieval and burns tokens without value.

Quality signals: keep them in moving windows and in aggregate. A single data point ages; the pattern matters more. Renewal happens when new feedback arrives.

Exceptions and blocks: they last while the policy or the request stands. Keep a record of origin and a way to appeal or update.

Why storing too much makes answers worse

First, noise. Semantic retrieval brings in chunks that look like the prompt. If there are too many, the risk of collisions rises: the agent blends old and new instructions and contradicts itself. The output turns muddled and less precise.

Second, drift. Old preferences without renewal push styles or choices that no longer reflect the user. You see it when the agent insists on formats or priorities nobody asked for today. The excess memory is at fault, not the model.

Third, cost. Indexing and querying more documents adds expense and latency. An agent with bloated memory answers worse and slower. If it also keeps raw chats, spend goes up and usefulness goes down.

Fourth, audit pain. A thousand messy entries are worth less than ten good summaries. The more chaotic the store, the harder it is to explain why the agent acted as it did.

Privacy: less is more

Over-storage increases the risk surface. There is more to protect, more to mask, and more to delete on request. Agent memory should follow minimisation: keep what is necessary, for the time necessary, with clear consent.

Separate personal data from operational state. Use selective anonymisation in summaries: keep the fact (“the budget was approved”) without the identifier unless it is needed. Record the legal or contractual basis for each data type.

One more point: the right to erasure. If the user asks to be forgotten, you must find what is derived. So trace dependencies: which summary used which source. Without that, partial deletion leaves shadows that are hard to explain.

How to decide what to delete

I ask three things: does it help me act better today? Can I explain it to the user straight? Do I have current permission to keep it? If any answer is no, I delete it or roll it into anonymous aggregate. Memory is not a historical archive; it is a work tool.

Practice helps. Set a TTL by field, ask for renewal when something ages, and prefer summaries over transcripts. Fewer documents, better typed. The agent retrieves cleaner, answers better, and reduces risk. And if something is critical, let it live in source systems, not in the agent’s memory.

I post working automations on @WhatsMarketing_es.

If you want me to look at your case, get in touch. I work from Buenos Aires, originally from Málaga, with clients in Mexico City, Argentina, the rest of Latin America and Spain.

← See all articles