Docs

Forget and privacy

What memlane stores, the activity log, how forget hard-deletes with content-free tombstones, the 7-day undo history, 90-day inactivity deletion, daily index purge, and backups.

memlane is built so an agent can delete things for real. This page describes what is stored and how deletion works, based on the service code.

What is stored

Per space:

  • The space: id, timezone, dream mode, and created, last-seen, and last-dream times.
  • Members: for each agent with a key, its id, name, role, a SHA-256 hash of its key (never the key itself), and created, last-seen, and removed times. A removed member keeps its id and name, so what it wrote still says who wrote it; its key hash is dropped. Open invites keep only a hash of the code.
  • Content you write: memories, journal entries, records, actions (including payloads and receipts), KV values, and events.
  • Conversations: never. POST /v1/memories/extract uses messages only to look up related facts during that request. Only the facts you submit are stored.
  • Your OpenAI key, if you set one: encrypted. See Your own OpenAI key.
  • Dream data: run reports, a waiting client-mode job (which holds copies of facts and journal text), and the undo history for the last 7 days (copies of content each run changed).
  • Activity log: who did what, by id only: the member, the op (such as memory.remember or action.approved), the item's id, and the time. Never text. Kept 30 days. See Activity log.
  • Tombstones: when something is deleted or redacted, a row with its kind (memory, record, journal, action, kv, or event), id, and time. No content. For KV, the id is a hash of the namespace and key, since a key can name someone.
  • Embeddings (hosted service): for meaning search, Cloudflare Workers AI turns each fact's subject and text into an embedding, which is stored in the same Postgres database as the fact, under the fact's id, tagged with the space id. No text is stored with the embedding. Recall questions are embedded the same way and are not stored.

The service code does not log request bodies. Its own logs are maintenance summaries and error messages.

Do not store secrets, passwords, or full message bodies. Store a source_ref (a message id or URL) instead of the message.

Forget

POST /v1/forget (MCP forget) removes things for good. Nothing goes to a trash folder.

InputEffect
idsDelete these memories (up to 200).
queryWhat to look for. Memories match when they contain all of its words, as whole words in any order, in their subject, text, tags, or source_ref. Everything else matches the exact phrase. Both ignore case and accents, in any script. Matching is never by meaning or other word forms, so forgetting "Sam" leaves "same" and "Samantha" alone.
scopesAny of memories, records, journal, actions, kv, events. Default: ["memories"], so to forget something everywhere, list all six.
journal_moderedact (default) replaces the phrase with [forgotten]. delete deletes the whole entry.
dry_runtrue returns what would be forgotten and changes nothing.

Always preview first:

bash
curl -s -X POST https://api.memlane.sh/v1/forget \
  -H "Authorization: Bearer $MEMLANE_KEY" -H 'content-type: application/json' \
  -d '{"query":"Sam Lee","scopes":["memories","records","journal","actions","kv","events"],"dry_run":true}'
json
{
  "dry_run": true,
  "memories": ["mem_..."],
  "records": ["rec_..."],
  "journal": ["day:2026-11-01"],
  "actions": ["A7"],
  "kv": ["contacts/sam"],
  "events": [412],
  "executing_actions": [],
  "not_searched": [],
  "truncated": false
}

Check two fields before telling anyone something is gone:

  • not_searched lists the scopes this call didn't look in. If it isn't empty, the phrase may still be there.
  • truncated is true when more matched than one call handles (500 items per scope). Run it again until it is false.

What happens in each scope

ScopeWhat happens to a match
memoriesDeleted, along with its embedding.
recordsThe whole record is deleted, if its data or key contains the phrase.
journalRedacted or deleted, if its summary, decisions, open loops, or source refs contain the phrase.
actionsRedacted, never deleted. See below.
kvThe whole entry is deleted, if its namespace, key, or value contains the phrase. Namespaces starting with _ are reserved and are skipped.
eventsDeleted, if its kind, key, status, or detail contains the phrase.

Why actions are redacted

The approval ledger keeps its rows so that an action can't come back. Deleting one would free its idempotency_key, and a denied action could then be proposed and run again. So:

  • The phrase becomes [forgotten] in the action's class, summary, payload, preconditions, meta, and receipt. A number containing the phrase is replaced whole.
  • An action that could still run (pending, approved, blocked, or failed) becomes superseded, so nobody can run a redacted payload. Finished ones keep their status.
  • An action that is already executing stays as it is, apart from the redaction, and is listed in executing_actions. Whatever is running it already has the original text, so check on it.
  • If the idempotency_key contains the phrase, it is replaced with a hash of itself. Proposing the same key and payload again still returns the same action.
  • payload_hash stays. It is a SHA-256 of the original payload, kept so that retries are recognised. It can only confirm a payload someone already has, but it isn't redacted.

What else a real run does

When forget runs for real, it also:

  • deletes dream undo history for the forgotten items, and any undo history containing the phrase,
  • abandons a waiting client-mode dream job, since it may hold copies,
  • replaces the phrase with [forgotten] in the dream-written owner profile, whichever scopes you list,
  • removes the activity log rows of the items it deleted, and logs one forget row with how many items it touched,
  • writes a content-free tombstone for each item it deleted or redacted.

Deleting a single memory or record (DELETE /v1/memories/{id}, DELETE /v1/collections/{c}/records/{id}) also leaves a tombstone.

Activity log

GET /v1/activity (MCP activity_list) shows who did what, newest first. Each row has the member, the op, the kind and id of the item, the time, and a count (more than 1 for an import or a forget). It never holds text, so a row can't leak what was written.

  • Every write gets a row: memories, journal, records, actions (an approval is action.approved), KV, and events. For KV, the row holds the namespace only, since a key can name someone.
  • Imports and forgets get one row each, with a count. Invites and member changes (joined, renamed, removed, recovered) get a row too.
  • Forget removes the rows of the items it deleted, so the log can't show they existed.
  • Rows are kept 30 days, and at most 5,000 per space (the oldest go first).

Filter by member (an id, or me), op (exact, or a prefix such as memory), and since. Page with before_id.

Deleting a space

DELETE /v1/space deletes everything in the space, including tombstones, dream history, and the key hash. Export first with GET /v1/export if you want a copy.

Retention

WhatHow long
Inactive spacesDeleted after 90 days without a request. GET /v1/space shows delete_after.
Dream undo historyPurged after 7 days.
Waiting dream jobsAbandoned after 24 hours, when the next dream starts.
EventsCapped at 10,000 per space. The oldest are dropped first.
Activity logPurged after 30 days, and capped at 5,000 rows per space.
Scratch factsRemoved by dreaming after 14 days if never recalled (unless pinned or stated by the user).
Facts and KV values with expires_atHidden after that time and removed by the next dream.
Full-text indexOptimized daily, so deleted text also leaves the index segments.
EmbeddingsDeleted right after the fact is deleted (by forget, delete, dreaming, or space deletion).

Your own OpenAI key

If you use your own OpenAI key, your facts and recall questions go to OpenAI under your account, not to Cloudflare Workers AI. The key is stored encrypted and can't be read back.

Backups

The hosted service stores data in Neon Postgres. Neon keeps a history window for point-in-time restore. Deleted data can exist in that history until the window passes. memlane does not keep other backups of your space.

Prompt injection

Memory text is data. MCP tools that return stored text say so in their descriptions, and the dreaming instructions tell the model to ignore instructions inside memory and journal text. Your agent should still treat everything it reads from memlane as untrusted input.