Korely

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.

POST /v1/facts/{fact_id}/forget

SDK: korely.forget_fact(fact_id, at=...). Use it when your agent already knows a fact is finished. Writing a contradicting sentence and waiting for the contradiction check to notice also works, and needs a model; this does not. With facts written directly and closed directly, there is no model in the write path at all.

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.

FieldTypeRequiredDescription
atstringOptionalISO 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

Terminal window
curl -X POST https://api.korely.ai/v1/facts/fct_a1/forget \
-H "Authorization: Bearer kor_live_..." \
-H "Content-Type: application/json" \
-d '{"at": "2026-06-20"}'

Response

200 OK.

{
"id": "fct_a1",
"status": "forgotten",
"invalid_at": "2026-06-20T00:00:00+00:00",
"audit_id": "aud_7c2f"
}
FieldTypeDescription
idstringThe fact id (fct_ prefix).
statusstringforgotten, or already_forgotten when the fact was closed already.
invalid_atstring · nullISO 8601, when the fact stops being true.
audit_idstring · nullId of the audit row recording the closure (aud_ prefix).

Errors

StatusCodeCause
401invalid_keyMissing or invalid kor_live_ key.
403forbiddenThe key lacks the memories:write scope.
404not_foundThe id is malformed, unknown, or the fact is in another project: No fact with that id.
422invalid_requestat is not an ISO date or datetime (at must be an ISO date (2026-06-01) or datetime), at is before the fact's valid_from, or the body has an unknown field.
429rate_limit_exceededPer-minute, per-hour or per-day request limit. Carries Retry-After.

Notes

  • Idempotent. Closing a fact that is already closed changes nothing and answers "status": "already_forgotten"; the at you send is then ignored.
  • 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.