Core memory operations
Memory history
The lifecycle timeline of one memory, created, updated, deleted, plus every fact it taught the store, including facts that were later superseded.
/v1/memories/{memory_id}/history
SDK: korely.history(memory_id). Unlike
Get a memory, which returns
only the facts currently active, history returns the complete trail,
each created, updated, and deleted event,
and each fact this memory fact_extracted or, once superseded,
fact_invalidated. It is how you audit why the store believes what
it believes.
Authentication
HTTP header, required: Authorization: Bearer kor_live_.... The key needs the memories:read 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 (mem_ prefix), as returned by Add a memory or any read. |
Example request
curl https://api.korely.ai/v1/memories/mem_8f2c1a/history \ -H "Authorization: Bearer kor_live_..."Response
200 OK. The memory id and its events, sorted chronologically.
{ "id": "mem_8f2c1a", "events": [ {"event": "created", "at": "2026-03-01T09:14:22+00:00", "fact": null, "fact_id": null}, {"event": "fact_extracted", "at": "2026-03-01T00:00:00+00:00", "fact": "Giulia prefers async standups", "fact_id": "fct_a1"}, {"event": "updated", "at": "2026-03-02T11:02:10+00:00", "fact": null, "fact_id": null}, {"event": "fact_invalidated", "at": "2026-03-02T11:02:11+00:00", "fact": null, "fact_id": "fct_a1"} ]}| Field | Type | Description |
|---|---|---|
id | string | The public memory id (mem_ prefix), echoed back. |
events | array<HistoryEvent> | Chronologically sorted events. Each HistoryEvent has the four fields below. |
events[].event | string | One of created, updated, fact_extracted, fact_invalidated, deleted. |
events[].at | string · null | ISO 8601 timestamp of the event. null when no timestamp is available; such events sort last. |
events[].fact | string · null | The fact as a subject predicate object string for fact_extracted events; null otherwise. |
events[].fact_id | string · null | The fact id (fct_ prefix) for fact_extracted and fact_invalidated events; null otherwise. |
History shows superseded facts; Get a memory does not. Get a memory returns only
the facts currently active. History includes every fact this memory
ever produced, with its fact_invalidated event when a later
memory contradicted it, so you can see exactly when and why the store
changed its mind.
Errors
| Status | Code | Cause |
|---|---|---|
401 | invalid_key | Missing or invalid kor_live_ key in the Authorization header. |
403 | forbidden | The key lacks the memories:read scope. |
404 | not_found | Malformed memory_id, or no memory with that id exists in this account. |
429 | quota_exceeded | Monthly query quota reached. Resets at the next billing cycle, or upgrade. |
429 | rate_limit_exceeded | Per-second rate limit exceeded. Retry after the delay in the Retry-After header. |
Notes
- This is a read. Each call counts against your monthly query (read) quota.
- The
updatedevent is conditional. It appears only when the memory'supdated_atdiffers from itscreated_at, a memory written once and never edited has noupdatedevent. - Fact timestamps come from validity, not write time. A
fact_extractedevent'satis the fact'svalid_from; afact_invalidatedevent'satis the fact'sinvalid_at. - Undated events sort last. Events with no timestamp are ordered as if dated
9999-12-31, so they fall at the end of the timeline.
Related
- Get a memory, the current state, with active facts only.
- Get facts, query typed facts directly, with
as_oftime travel. - SDK reference,
korely.history(memory_id)in Python and Node.