← All use cases
The scenario
Someone emails asking what you hold about them, and then asks you to delete it.
You have a deadline measured in days, and “it is spread across a memory system”
is not an answer you can send.
The whole thing turns on one earlier decision: whether writes were scoped. If
every memory about a person carries their scope, this is a runbook. If not, it
is a manual search you cannot certify.
Step 1 — Find everything about them
A scoped read is strict — it matches only memories carrying that scope, and
never untagged ones. That strictness is exactly what you want here: the result
is defensible rather than best-effort.
Step 2 — Give them a copy first
The subject is usually entitled to the data before it goes. Take the export
before deleting — see Export Your Memory for the full-space
bundle, and keep the scoped results above alongside it as the per-person record.
Step 3 — Delete, one by one, and keep the ids
Keep removed. The list of ids, with a timestamp, is what you attach to your
response to the request.
Step 4 — Prove it
Re-running the same scoped query and getting nothing is the evidence. Run it as
a test, not by eye.
Evals
- Write ten memories for one user and five for another.
- Run the runbook for the first. Confirm exactly ten ids come back.
- Confirm the second user’s five are untouched — the most important assertion
here, and the one a manual process gets wrong.
- Re-run the scoped query and assert empty.
Guardrails
Deletion is permanent and there is no undo. Export first, every time, and
have the exported bundle in hand before the first delete_memory call.
- Unscoped memories are invisible to this process. If you adopted scoping
late, memories written before it carry no
user_id and a scoped query will
never find them — meaning your deletion is incomplete and you will not be
told. Scope from day one, or backfill before you promise anything.
- A shared space needs the same runbook run by its owner. Deleting is
owner-only; a visitor cannot erase data from a space they were invited to.
- Consolidated observations are derived from raw facts. Removing the facts
is the operation that matters; re-check with a scoped read afterwards rather
than assuming a synthesis disappeared with its sources.
- This page is a runbook, not legal advice. What your obligations are, and
within what deadline, depends on your jurisdiction and your role as controller
or processor.
Built from
Both are complete, runnable scripts:
support_bot_scoping.py,
user_profiles.py.