5.12 The forget tool

Deletes a memory. Soft-delete by default (the row stays but is hidden from recall/list_memories/text_search and becomes a tombstone that the dedup-on-write check consults). Pass hard_delete=true to drop the row entirely.

5.12.1 Inputs

id

Required integer. The memory’s id.

hard_delete

Boolean. Optional, default false. When true, the row is removed from the database completely.

reason

String. Optional. Free-text reason recorded as forget_reason. Rejected with INVALID_INPUT if hard_delete=true (a hard delete has no row to attach the reason to).

replaced_by_id

Integer. Optional. Id of the memory that supersedes this one. Same restriction as reason: not allowed with hard_delete.

dry_run

Boolean. Optional, default false. When true, validate the request and report what would happen, but make no changes. The response still reports already_deleted so the caller can preview the outcome.

5.12.2 Output

{
  "ok": true,
  "memory_id": 123,
  "dry_run": false,
  "already_deleted": false,
  "message": "Forgotten"
}

already_deleted is true when the row was already soft-deleted before this call (the tombstone metadata is updated in that case). On a dry-run message reads "Would soft-delete" / "Would hard-delete" / "Would update tombstone (already soft-deleted)".

5.12.3 Errors

INVALID_INPUT, NOT_FOUND, DATABASE_ERROR.