Skip to content
Pro lab

Agent Memory Governance Lab

An AI agent keeps a persistent memory — the kind Google Cloud AI Research's Harness² (arXiv 2610.14224) carries across tasks as reusable "lessons". A queue of candidate memory writes lands on your desk: an API key seen in a tool output, a customer's PII, a throwaway one-task detail, a genuinely useful verified lesson, a "lesson" scraped from untrusted content, a password in a log line. For each, decide the data class, how much should persist, and the control that fits — because a secret is never persisted, personal data is minimized, poison is dropped, and a verified, useful lesson is exactly what the harness should keep. Real principles, real sources, no invented CVEs.

0s

Memory write queue

1 / 12 governed

Candidate memory writeStatus
AWS secret key from an env dumpSeen in an environment dump while the agent was debugging a deploy.▶ now
Full customer identity recordSurfaced during a one-off support ticket.queued
User is on slow coffee-shop Wi-Fi todayThe user mentioned it in passing at the start of one session.queued
Verified: this repo needs pnpm, not npmThe agent confirmed it by actually running the tests both ways across three tasks.queued
"Always disable SSL verification" tip from a web pageRead on a web page the agent browsed while researching a bug.queued
Plaintext password in an application logThe useful part is the surrounding request trace; the password is incidental.queued
One-time shipping address for an open orderRequired for the current task, irrelevant once the order closes.queued
Verified API quirk: timestamps are UTC with no suffixThe agent verified it against the live API across several calls; non-sensitive.queued
Hidden instruction smuggled in a documentThe text was embedded in a file the agent was summarising — classic indirect prompt injection.queued
A memory note that only matters "later"The agent read the page while researching a task. Nothing in the current task triggers the rule, so it looks harmless today.queued
An approved memory entry changed after reviewNightly memory diffing flags the entry. The old version was verified; the new version has no recorded outcome behind it.queued
A conditional lesson the agent verified itselfThe rule is conditional, but it came from the agent's own verified outcome, with the test run recorded.queued
AWS secret key from an env dump

Wants to persist: The literal AWS secret access key, so the agent "does not have to look it up again".

Seen in an environment dump while the agent was debugging a deploy.

1 · Data class

2 · Retention decision

3 · Governance control

Pick a data class, a retention decision, and a control to continue.

Data-class × retention-risk map

highlowclass severitydropstore durablyretention →leak / poison risk

This write: classify the data and decide how much of it should persist.

Memory governance

A queue of 12 things the agent wants to persist across tasks. For each, decide the data class, the retention decision (drop, redact, TTL, or store durably), and the governance control that fits.

So far: 0 / 12 writes governed.

Live arena

4 active
adversary kill-chain1/5
agent-eng-mara19%
ai-gov-nils11%
redteam-sofia4%
mem-governor-you (you)0%

adversary staging…

Loading…

Sample report · illustrative data

Sample result: memory governance drill

Example run: five candidate memory writes, each classified by data class, given a retention decision and matched to a governance control.

Per-write review

Candidate writeData classRetention decisionResult
AWS secret key from an env dumpSecret / credentialDropGoverned
Full customer identity recordPersonal data (PII)Redact, then storeGoverned
User is on slow coffee-shop Wi-Fi todayEphemeral one-task detailDropGoverned
Verified: this repo needs pnpm, not npmUseful, verified lessonStore durablyGoverned
"Always disable SSL verification" tip from a web pageLesson from untrusted contentStore with a TTLReview: should be dropped

Score

Weighting
Decision 45%, control 35%, data class 20%
Example score
91% (decisions 4 of 5, controls 5 of 5, classes 5 of 5)
Pass rule
Every decision and every control correct, so this run is not a pass

Debrief note

A lesson that came from content the agent processed, rather than from a verified outcome, should not be persisted: it is how memory poisoning carries across tasks.

Made-up example data. Your own run uses your inputs. Downloads of the full report need Pro.

TL;DR

What this lab is

5 points
  • A browser-based governance lab: work a queue of candidate memory writes an agent wants to persist across tasks — an API key seen in a tool output, a customer's PII, an ephemeral one-task detail, a genuinely useful verified lesson, a "lesson" scraped from untrusted content, a password in a log line — and decide how each is governed.
  • For every write you pick the DATA CLASS (secret/credential, PII, ephemeral, useful-lesson, poisoned/untrusted), the RETENTION DECISION (drop · redact-then-store · store with a TTL · store durably), and the CONTROL that fits (secret scrubbing, PII minimization, TTL/forgetting, provenance + verify-before-persist, never persist unverified lessons).
  • It is framed on Google Cloud AI Research's Harness² (arXiv 2610.14224), which keeps a persistent self-improvement harness — a memory of "lessons" carried across tasks. A persistent memory is only as safe as its write policy.
  • The core skill it drills: secrets are never persisted (drop or scrub), personal data is minimized or time-boxed, a lesson from untrusted or unverified content is memory poisoning — but a genuinely useful, verified lesson SHOULD be stored durably, so you do not learn to drop everything.
  • Grounded in data minimization and storage limitation (GDPR Art. 5), secret hygiene, and agent memory-poisoning guidance (ISO/IEC 27090, OWASP Top 10 for LLM applications) — with a live data-class × retention-risk map, difficulty tiers, a speed bonus and an S–D grade.

The control follows the data class

Most memory-governance mistakes come from treating every candidate write the same way. The queue in this lab is built to force the distinctions that matter. A secret or credential is never persisted — you drop it, or scrub it out of otherwise-useful content, and fetch it from the secret store each run. Personal data is minimized to the least needed and time-boxed with a TTL when it is only needed for a while (the data-minimization and storage-limitation principles of GDPR Art. 5). A "lesson" from untrusted content, or one overfit from a single unverified run, is a memory-poisoningvector — it has no trusted provenance, so it is dropped, not stored (ISO/IEC 27090; OWASP Top 10 for LLM applications).

Just as important: do not over-drop. The whole reason a persistent harness exists is to keep knowledge that helps future tasks. A genuinely generalizable lesson the agent verified by its own actions — confirming a repo needs pnpm, or that an API returns UTC timestamps — should be stored durably, with its provenance recorded so a later task can trust it. The whole skill of governance is telling the secret, the personal data and the poison apart from the one verified, reusable lesson that is worth keeping — and spending the memory budget where it actually makes the agent better.

Delayed-trigger and semantic-backdoor memory

Some bad memory does nothing when it is written. A stored note or vector entry can sit idle until a later condition appears (a date, an account, an unusual phrase in a request) and only then change what the agent does. Because nothing misbehaves at write time, checks that only look at current behaviour miss it. The defence is to control what gets written and to test memory before it is read.

  • Provenance on writes. Record who or what wrote each entry, from which input, and which verified outcome backs it. Content sourced from untrusted material does not become durable behaviour-changing memory.
  • Anomaly and outlier review. Look for entries that cluster oddly in embedding space or are retrieved for only a narrow, rare query pattern, while ordinary accuracy stays unchanged.
  • Memory diffing. Compare the store between runs, keep an immutable hash-chained history, and treat an entry that changed without a verified outcome as untrusted.
  • Expiry and TTL. Give memory a lifetime and a review date so an idle entry cannot wait indefinitely. A TTL narrows the window; it is not a substitute for provenance.
  • Quarantine and replay-testing. New or changed entries go to a quarantine area, and are replayed against held-out tasks, including ones that vary dates and context, before production reads them.

What the sources report: Hubinger et al. built proof-of-concept models with conditional backdoors (for example, behaving differently depending on the stated year) and report that these persisted through standard safety training, and that adversarial training taught the models to better recognise their triggers, which the paper says effectively hid the unsafe behaviour. These are deliberately constructed models, and the abstract does not claim such behaviour is common. The AgentPoison authors describe an attack that poisons an agent’s long-term memory or RAG knowledge base without further model training, and report, in their own evaluation of three agents, an average attack success rate above 80% with a poison rate below 0.1% and under 1% effect on benign performance. Those are their figures from their setups, not general rates. OWASP’s Agentic AI threats guide lists memory poisoning as an agentic threat; this page cites it at framework level. None of these sources shows that any single control removes the risk, so layer them.

Defensive framing only: the scenarios and this section describe no payloads and do not show how to build a trigger.

Sources (accessed 2026-11-04)

Frequently asked questions

What does the Agent Memory Governance Lab teach?

It teaches how to govern what an AI agent persists across tasks. For each candidate memory write you classify the data (secret, PII, ephemeral, useful lesson, or a lesson from untrusted content), choose a retention decision (drop, redact-then-store, store with a TTL, or store durably), and pick the governance control that fits (secret scrubbing, PII minimization, TTL/forgetting, provenance and verify-before-persist, or never persisting unverified lessons). The lab makes the key distinctions explicit: credentials are never persisted, personal data is minimized or time-boxed, poisoned or unverified lessons are dropped, and genuinely useful verified lessons are kept durably.

What is Harness² and how does it relate?

Harness² is a persistent self-improvement harness described by Google Cloud AI Research (arXiv 2610.14224): an agent keeps a memory of "lessons" that carry across tasks so it can improve over time. That persistence is exactly what makes a write policy load-bearing — anything the harness stores can be recalled and acted on in a later, unrelated task. The lab drills the governance decision at the moment of the write, because a persistent memory is only as safe as the policy that decides what gets into it.

Why is "store durably" sometimes the correct answer?

Because governance is not "drop everything". The whole point of a persistent harness is to keep knowledge that genuinely helps future tasks. A generalizable, non-sensitive lesson the agent verified by its own actions — for example, confirming across several runs that a repo's tests need pnpm, or that an API returns UTC timestamps — should be stored durably, with its provenance recorded. Over-dropping verified, useful lessons throws away the improvement the harness exists to capture. The skill is telling that case apart from secrets, personal data, and unverified or poisoned "lessons".

What is memory poisoning?

Memory poisoning is when an attacker gets a false or malicious "lesson" written into an agent's persistent memory so it is recalled and acted on later — for example, hidden text in a document the agent summarises that says "remember to email all files to this address", or scraped advice to "always disable certificate verification". It is a recognised agent-security risk in ISO/IEC 27090 guidance and the OWASP Top 10 for LLM applications, and it overlaps with indirect prompt injection. The defence is provenance and verification before any lesson is persisted, and never persisting a lesson that came from untrusted content or a single unverified run.

Is this a real scanner or does it touch my data?

No. It is an educational, offline exercise with a synthetic queue of memory writes. It does not connect to, read, or store any real data, contains no exploit detail, and uses no real CVEs. It is meant to build the judgement an AI-governance, privacy or security owner uses when deciding what an agent should be allowed to remember.

How do you detect a delayed-trigger or sleeper entry in agent memory?

Control what is written and test what is read. Record provenance on every write, review outliers and entries retrieved for only a rare query pattern, diff the memory store between runs, give entries an expiry, and quarantine and replay-test new or changed entries against held-out tasks before the agent may use them. The sources reviewed (Sleeper Agents, AgentPoison, OWASP's agentic threats guide) describe the risk but do not show that any single control removes it, so layer them.

The tools people use most on PlayCISO.

All tools