📦 Moved to new directory. Last updated 12.2.2026. New location: claude-config/library/03-memory-state/deep-dives/state-22-gdpr-right-to-be-forgotten.html

Deep dive 22 of 27: GDPR Right to Be Forgotten

Nov 19, 2026 · Michael Chang · Status in NurseOps Now: 🟡 partly built

Show definitions in ( ) · hover a highlighted word for its meaning, click it for details · open with ?defs=1 to show definitions

Part of: Remembering the right things: state management in NurseOps Now, section Implementing Long-Term Memory: External Persistence Architecture (7.3) · All 27 solutions · ← TTL (time-to-live) expiration · Engineering Fix: Recursive Goal Injection →

Read in this order

  1. In plain words: what it is, without jargon
  2. The problem it solves: the problem, and the standard approach in my words
  3. How to implement it (ServiceApps): scenario, steps, code and real output
  4. In NurseOps Now: built or not, and where
  5. Trade-offs and Interview answer

In plain words

Under GDPR, a person can ask for their personal data to be deleted. For an AI assistant, that means finding and erasing that person's data in every store (chat memory, profiles, vector (text turned into a list of numbers so similar meanings sit close together) memory, logs) and proving it was done.

In plain terms: when a customer leaves and asks to be forgotten, you shred every copy of their file, not just the one on your desk.

The problem it solves

Persistence creates liability (saved data can leak personal details or secrets): memories spread (how far apart the scores of repeated runs are) across many stores, and forgetting one person means finding them all.

The standard approach (in my words): make sure the persistence layer complies with regulations like GDPR's right to be forgotten (a person's right to have their stored data deleted (from GDPR)).

How to implement it (ServiceApps)

Illustrative example: no ServiceApps (a company platform for IT tickets, HR requests and help-center articles) instance is connected, so the scenario and data are made up. The code is a self-contained sketch; it was run on that made-up data on Nov 19, 2026, and the output below is from that run.

The setting. ServiceApps (a company platform for IT tickets, HR requests and help-center articles) Assist, an AI helper inside a company's ServiceApps (a company platform for IT tickets, HR requests and help-center articles) portal. Employees ask it IT and HR questions; it answers from knowledge-base (KB (knowledge base: a library of help articles)) articles, looks up the employee's own tickets (incidents (a ServiceApps ticket for something broken) like INC0012345) and requests, and keeps one conversation per employee and ticket.

The scenario. Employee u42 leaves the company and asks for their assistant data to be erased.

Steps.

  1. Keep a map of every store that can hold user data.
  2. Tag every saved item with the user ID, so it can be found.
  3. Erase per store, then verify nothing is left.
  4. Record the erasure in an audit row (one line in the log of who did what, when) without personal data.

The code (Python):

stores = {"chat_memory": {"u42:INC0012345": ["..."], "u42:general": ["..."], "u77:general": ["..."]},
          "profiles": {"u42": {"contact": "email"}, "u77": {"contact": "phone"}},
          "vector_memory": [{"user": "u42", "text": "asset LT-4471"}, {"user": "u77", "text": "Berlin office"}],
          "logs": ["u42 asked about VPN", "u77 asked about leave"]}
audit = []

def forget(user):
    n = 0
    for k in [k for k in stores["chat_memory"] if k.startswith(user + ":")]:
        del stores["chat_memory"][k]; n += 1
    n += stores["profiles"].pop(user, None) is not None
    before = len(stores["vector_memory"])
    stores["vector_memory"] = [d for d in stores["vector_memory"] if d["user"] != user]
    n += before - len(stores["vector_memory"])
    before = len(stores["logs"])
    stores["logs"] = [l for l in stores["logs"] if not l.startswith(user + " ")]
    n += before - len(stores["logs"])
    audit.append({"action": "erase_user", "items": n})        # no personal data in the audit row
    return n

print("erased items:", forget("u42"))
print("anything left for u42?", any("u42" in str(v) for v in stores.values()))
print("u77 untouched:", list(stores["chat_memory"]), stores["profiles"])
print("audit:", audit)

Output (from running the code above):

erased items: 5
anything left for u42? False
u77 untouched: ['u77:general'] {'u77': {'contact': 'phone'}}
audit: [{'action': 'erase_user', 'items': 5}]

What to watch for.

In plain terms: one button that finds the person in every drawer, shreds each copy, and logs that it happened.

In NurseOps Now

Partly built: "Clear" deletes one AI Assist (the app's chat helper for staff questions) thread (one saved conversation, here one per user and case) and writes an audit row (one line in the log of who did what, when) (the parent post's demo). There's no single "erase everything for this user" across all stores. See Step 9.

Trade-offs

Interview answer

"To honor a deletion request, every store that can hold user data is tagged by user ID and listed, so one job can erase the person everywhere, verify nothing remains, and write an audit row (one line in the log of who did what, when) with no personal data. Most failures here are a forgotten copy, like a cache or a trace."

All data in this post is made up. No real people, tickets or patient data.

← Back to all 27 solutions in the state management blog

Key terms

Every highlighted word in this post links here. Click ↩ Back to return to the spot you came from.

AI Assist
The app's chat helper for staff questions.Used in: In NurseOps Now↩ Back to where you were
audit
A permanent record of who did what and when.Used in: Trade-offs↩ Back to where you were
audit row
One line in the log of who did what, when.Used in: How to implement it (ServiceApps), In NurseOps Now, Trade-offs, Interview answer↩ Back to where you were
incident
A ServiceApps ticket for something broken.Used in: How to implement it (ServiceApps)↩ Back to where you were
KB
Knowledge base: a library of help articles.Used in: How to implement it (ServiceApps)↩ Back to where you were
persistence creates liability
Saved data can leak personal details or secrets.Used in: The problem it solves↩ Back to where you were
right to be forgotten
A person's right to have their stored data deleted (from GDPR).Used in: The problem it solves↩ Back to where you were
ServiceApps
A company platform for IT tickets, HR requests and help-center articles.Used in: How to implement it (ServiceApps)↩ Back to where you were
spread
How far apart the scores of repeated runs are.Used in: The problem it solves↩ Back to where you were
thread
One saved conversation, here one per user and case.Used in: In NurseOps Now↩ Back to where you were
tool
A function the AI can call, such as policy search.Used in: How to implement it (ServiceApps)↩ Back to where you were
traces
Step-by-step records of each request: what ran, how long, what it cost.Used in: How to implement it (ServiceApps)↩ Back to where you were
vector
Text turned into a list of numbers so similar meanings sit close together.Used in: In plain words↩ Back to where you were