Core memory operations
Delete a memory
Soft-forget one memory and invalidate the facts it produced. Nothing is hard-deleted, the rows are kept as bi-temporal history and simply drop out of default reads. An audit row is written.
/v1/memories/{memory_id}
SDK: korely.delete(memory_id). Forgetting a memory sets its
deleted_at and invalidates every active fact derived from it
(their invalid_at is set). The rows are never physically
removed, they stay queryable through as_of so your timeline
keeps its history.
Authentication
HTTP header, required: Authorization: Bearer kor_live_.... The key must carry the memories:write scope.
Path parameter
This endpoint takes no query parameters and no request body, only the memory id in the path.
| Parameter | Type | Required | Description |
|---|---|---|---|
memory_id | string | Required | The public memory id to forget, e.g. mem_8f2c1a. |
Example request
curl -X DELETE https://api.korely.ai/v1/memories/mem_8f2c1a \ -H "Authorization: Bearer kor_live_..."Response
200 OK. A small receipt confirming the forget, with how many
facts were invalidated and the id of the audit row.
{ "id": "mem_8f2c1a", "status": "forgotten", "facts_invalidated": 2, "audit_id": "aud_5d3e9f"}| Field | Type | Description |
|---|---|---|
id | string | Public memory id (mem_) that was forgotten. |
status | string | Always forgotten. |
facts_invalidated | integer | Count of active facts from this memory that were invalidated (invalid_at set). |
audit_id | string | Public id of the audit row recording the forget (scope memory). |
Errors
| Status | Code | Cause |
|---|---|---|
401 | invalid_key | Missing or invalid kor_live_ key in the Authorization header. |
403 | forbidden | The key lacks the memories:write scope required to forget a memory. |
404 | not_found | The memory_id is malformed, or no such memory exists, or it was already deleted. |
429 | rate_limit_exceeded | Rate limit exceeded. Retry after the interval in the Retry-After header. |
Notes
- Soft delete, not erase. The memory's
deleted_atis set and its active facts are invalidated (theirinvalid_atis set). Because Korely is bi-temporal, the rows are kept, they just drop out of default reads and stay reachable viaas_of. - Write scope required. The key must carry
memories:write; a read-only key gets a403. - The request is always logged. The call is recorded for telemetry before the not-found check runs, so even a forget against an unknown id leaves a request log.
- Idempotent-ish. A second delete of the same memory returns
404,deleted_atis already set, so the memory is filtered out of the lookup.
Related
- Delete a memory, guide, the narrative walkthrough with context.
- Get facts, confirm which facts dropped out after a forget.
- Add a memory, the write path that created it.