Skip to main content

What it does

Removes a memory from active retrieval either by soft-archiving (default, recoverable) or permanent deletion (irreversible). Soft archive is the safe default; use permanent deletion only when you are certain the memory should be irretrievably destroyed.

Parameters

Returns

Field descriptions:
  • success — Whether the operation succeeded
  • action — The action taken: "archived" (soft-delete) or "deleted" (permanent)
  • archived — Whether the memory was archived (true) or permanently deleted (false)

Examples

Basic usage

Advanced usage

When to use this vs alternatives

  • crystal_forget — When you want to remove a memory from active recall (default soft-archive) or destroy it permanently
  • crystal_edit — When you want to modify a memory instead of removing it
  • crystal_remember — When you want to save a new memory

Error handling

Notes

  • Soft archive (default): Memory is marked archived=true but retained in the database. Soft-archived memories do not appear in recall results but can be recovered by an admin or via a separate unarchive operation.
  • Permanent deletion: Memory and all associated metadata are irreversibly removed. This action cannot be undone.
  • The reason field is optional but recommended for audit trails, especially for permanent deletions.
  • The channel field provides context but does not filter which memories can be deleted — it’s only for logging.
  • Archival operations update the memory’s archivedAt timestamp.
  • All deletion/archival operations are transactional.