Context & facts
Close a fact
A fact stops being current and stays in history. Nothing is deleted: as_of a date before the closure still returns it, which is the reason the row is kept rather than removed.
/v1/facts/{fact_id}/forget
SDK: korely.forget_fact(fact_id, at=...). Use it when your agent
already knows a fact is finished. This call asks no model and uses
no write of your quota. Saving a sentence that contradicts the fact also
ends it, but that goes through the contradiction check, which asks a model
and may close a different fact. A fact written with
POST /v1/facts asks a model too.
Authentication
HTTP header, required: Authorization: Bearer kor_live_.... The key must carry the memories:write scope. Closing a fact does not count against the monthly write quota.
Request body
Optional. A bare POST closes the fact as of now.
| Field | Type | Required | Description |
|---|---|---|---|
at | string | Optional | ISO 8601 date or datetime the fact stopped being true. Not the date you noticed: set it to when the world changed, and as_of before that still returns the fact. Defaults to now. It may be in the future: the fact stays current until then. It may not be before the fact's valid_from. |
Any other field is refused with 422 invalid_request.
Example request
curl -X POST https://api.korely.ai/v1/facts/fct_3b9e1d7a5c2f4e8a9d6b0c1f7a2e4d85/forget \ -H "Authorization: Bearer kor_live_..." \ -H "Content-Type: application/json" \ -d '{"at": "2026-06-20"}'Response
200 OK.
{ "id": "fct_3b9e1d7a5c2f4e8a9d6b0c1f7a2e4d85", "status": "forgotten", "invalid_at": "2026-06-20T00:00:00+00:00", "audit_id": "aud_7c2f0e19a4b84d6c9a1e3f5b2d8c6a40"}| Field | Type | Description |
|---|---|---|
id | string | The fact id (fct_ and 32 hex characters). |
status | string | forgotten, or already_forgotten when the fact was closed already. |
invalid_at | string · null | ISO 8601, when the fact stops being true. |
audit_id | string · null | Id of the audit row recording the closure (aud_ prefix). |
Errors
| Status | Code | Cause |
|---|---|---|
401 | invalid_key | Missing or invalid kor_live_ key. |
403 | forbidden | The key lacks the memories:write scope. |
404 | not_found | The id is malformed, unknown, the fact is in another project or, for a key confined to some end users, belongs to another end user: No fact with that id. |
413 | payload_too_large | The body is larger than 2,097,152 bytes. Refused before it is read; nothing changes. On the Cloud a body over 1 MB gets a bare 413 first, without this code. |
422 | invalid_request | at is not an ISO date or datetime (at must be an ISO date (2026-06-01) or datetime), at is outside the moments that can be stored (at is outside the moments that can be stored: from 0001-01-02 to 9999-12-30, in UTC), at is before the fact's valid_from, or the body has an unknown field. |
429 | rate_limit_exceeded | Per-minute, per-hour or per-day request limit. Carries Retry-After. |
503 | unavailable | The key could not be checked because the database did not answer, or the request waited past one of the store's deadlines. Nothing changed; retry after the seconds in Retry-After. This call asks no model, so it never answers model_unavailable. |
408 | request_timeout | The body did not arrive whole within 30 seconds. Nothing changed; send it again. |
Notes
- Idempotent. Closing a fact that has already ended, or whose end is already at or before the
atyou send, changes nothing and answers"status": "already_forgotten". A fact whose end is still ahead is closed earlier, at theatyou send (or now). Withoutat, a fact dated in the future is closed at its ownvalid_from, which retracts it. - Scoped to your key's project. A fact in another project answers
404, the same answer as an id that never existed, so the two cannot be told apart. - Not a delete. The row keeps its dates and stays readable with
include_invalidated=true, and point-in-time reads before the closure are unaffected. It leaves Get facts, Get profile and the facts part of Get context at once. - Your word stays (since 1.0.14). A fact you forgot is not given back when the memory that had closed it is deleted, with or without
at. A forget never moves an end later: with anaton or after the end the judge gave, the answer isalready_forgotten, with that end ininvalid_at. - The memory stays. Closing a fact does not touch the memory that stated it: search, the memory list and Get context can still return that sentence. To remove the sentence, delete or erase the memory (Delete a memory). The value can also come back as a new fact if its memory is edited or the same sentence is saved again.
- A later value does not move your end (since 1.0.16). A value that begins after the end of a fact no longer moves that end later, whether you gave the end with
ator the judge gave it earlier. A value that begins before the end still closes the fact there. A fact whose end was moved before 1.0.16 keeps the end it has now: forget it again with youratto give it back the end you said. - Webhook and audit. A closure sends a
fact.invalidatedwebhook withfact_id,invalidated_by(nullhere) andat, at the moment of the call even whenatis in the future. Nothing is sent foralready_forgotten. The call writes one audit row, andaudit_idis its receipt.