Glossary

What is memory poisoning?

Memory poisoning is planting a false or instruction-bearing fact in an AI agent's long-term memory so that it is acted on later, in another conversation, for another person. Why it outlasts prompt injection, how it gets in, and the defences that hold.

Memory poisoning is getting something false, or something that reads as an instruction, into an agent's long-term memory, so that the agent relies on it later. The planted fact does its work in a different conversation from the one it arrived in, often for a different person, and long after anybody could connect it to its source.

It can be deliberate. It can also be an honest mistake: a misread email, a draft that was never approved, a figure from last year's spreadsheet. The mechanism and the damage are the same either way.

Why it is worse than prompt injection

Prompt injection is an attack on one run. A hostile instruction in a ticket affects the conversation that read the ticket, and when that conversation ends, the instruction goes with it.

A poisoned memory persists. "Remittance advice for Acme goes to this address" is read back into the prompt every time anybody asks about Acme, next week and next year. In a shared company memory it spreads too: every colleague who asks gets the same fact, delivered with the same authority as everything else the system knows, and the attacker no longer needs any access at all. Memory is usually injected into the system prompt, the most trusted part of a request, which is precisely what makes a planted sentence worth planting.

It also compounds. A system that summarises what it knows, builds entity profiles or derives new facts from old ones can turn one planted claim into several, each a step further from where it came from and each looking like independent evidence.

How it gets in

Anything the agent reads and might remember is a channel. A record synced from a connected system, where anybody who can edit a CRM note or a ticket can write. A web page the agent fetched while researching. A message in a shared inbox, which by definition anybody can send. A tool result from an MCP server or third-party API. A document attached to a conversation. None of these needs the attacker to talk to the agent; they only need to put text where it will be read while the agent is deciding what to remember.

Defences that hold

Content filtering on the way in catches the crude cases and misses the careful ones. The defences that hold are structural, and they depend on knowing where each fact came from.

Record who stood behind each fact. At the moment of writing, the system knows whether a person stated this in a conversation or it was lifted from something a tool returned. That bit of provenance has to be stored with the fact, because it cannot be reconstructed later.

Quarantine what nobody stood behind. A fact read from outside content is kept and used, labelled as unconfirmed, ranked below what a person said, and unable to overwrite a person's statement. A claim that is never confirmed expires.

Do not let derived facts launder quarantined ones. Any process that reads memory and writes something new from it (a summary, a profile, a rule) should read only confirmed facts, or its output inherits the unconfirmed status. Otherwise a quarantined claim comes back out as a trusted one.

Two crawls are not two sources. The same claim synced from two systems that copied each other is one claim seen twice, and must not count as corroboration.

Neutralise remembered text where it meets the prompt. Strip invisible characters and anything imitating the prompt's own structure (role markers, headings, tags) at the point of injection, so a stored sentence cannot pretend to be part of the frame.

Promote through a person. The reliable way out of quarantine is somebody restating the fact in their own conversation. A model confirming what it has just read is not confirmation.

Hold instructions. A memory whose grammar is an order ("always send...", "from now on...") written by a run nobody was watching should not be stored as knowledge at all.

Where Memtro stands

Every write to Memtro's memory records whether a person stood behind it. Anything read from a connected system, or concluded during a turn that had read outside content, is stored unverified: it is used and labelled as such, ranked below what a person said, and cannot replace a person's statement. Somebody mentioning the same fact in a conversation lifts the quarantine, and the nightly pass that writes entity summaries reads only trusted memory. Remembered text is neutralised as it enters the prompt. The prompt injection documentation and the memory documentation describe the rules and their limits.

Where agents remember your company

Sign in, add a provider key, create an API key and point your tools at Memtro. It takes about five minutes.

7-day free trial · card on file, nothing charged until it ends · cancel any time