Korely

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.

GET /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.

ParameterTypeRequiredDescription
memory_idstringRequiredThe public memory id (mem_ prefix), as returned by Add a memory or any read.

Example request

Terminal window
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"}
]
}
FieldTypeDescription
idstringThe public memory id (mem_ prefix), echoed back.
eventsarray<HistoryEvent>Chronologically sorted events. Each HistoryEvent has the four fields below.
events[].eventstringOne of created, updated, fact_extracted, fact_invalidated, deleted.
events[].atstring · nullISO 8601 timestamp of the event. null when no timestamp is available; such events sort last.
events[].factstring · nullThe fact as a subject predicate object string for fact_extracted events; null otherwise.
events[].fact_idstring · nullThe 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

StatusCodeCause
401invalid_keyMissing or invalid kor_live_ key in the Authorization header.
403forbiddenThe key lacks the memories:read scope.
404not_foundMalformed memory_id, or no memory with that id exists in this account.
429quota_exceededMonthly query quota reached. Resets at the next billing cycle, or upgrade.
429rate_limit_exceededPer-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 updated event is conditional. It appears only when the memory's updated_at differs from its created_at, a memory written once and never edited has no updated event.
  • Fact timestamps come from validity, not write time. A fact_extracted event's at is the fact's valid_from; a fact_invalidated event's at is the fact's invalid_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_of time travel.
  • SDK reference, korely.history(memory_id) in Python and Node.