forget
Archive, preview, or restore specific memory entries by key, pattern, recency, or episode IDs, with a Shadow Bin for safe undo.
Instructions
Universal Primitive: context-aware forgetting with Shadow Bin support.
Scope: exact one L4 key; fuzzy a pattern across L4, L3 and the graph;
recent everything newer than minutes; episode_ids exactly those
episodes.episode_id values; undo puts the archived_ids back where they
came from. Every scope reports what it touched, in entries / episodes /
graph_nodes / not_found.
dry_run=True matches and writes nothing — the same computation as the real
pass, so the preview cannot drift from it. Refused for recent, which has no
shadow bin.
undo refuses a purged row, a row whose archived kind is unknown, another
owner's id, and a row whose key is already back in the table — each with its
reason rather than a bare zero; dry_run=True shows what would return and
refuses the same rows. An id that two archived rows share is refused too, unless
memory_type names the one you want. The archive is not a backup:
restored_items names the fields a restored row could not bring back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | ||
| layer | No | user | |
| scope | No | exact | |
| dry_run | No | ||
| minutes | No | ||
| user_id | No | default | |
| shadow_bin | No | ||
| episode_ids | No | ||
| memory_type | No | ||
| archived_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||