v1

Update Memory

Replace a memory's text.

Its facts are extracted again from the new text and go through the same contradiction check as a new write: a value that changed supersedes the fact the old text stated, which stays in history (as_of before the edit still returns it). Like a new write, the reply says processing with facts: [] until the extraction has run.

expected_updated_at makes the edit conditional on the version you read: 409 stale_write, and nothing changes, when the memory moved since; 422 when it is not an instant (an empty string included).

patch/v1/memories/{memory_id}

Request

  • Base URL: https://api.korely.ai
  • URL: https://api.korely.ai/v1/memories/{memory_id}
  • Auth: HTTP bearer

Path parameters

memory_idstring required

Request body

contentstring required
expected_updated_atstring nullable

Optimistic concurrency: the updated_at you read (created_at while updated_at is null), sent back as the API returned it. The edit is written only if the memory is still at that version, to the microsecond, when it is written; otherwise 409 stale_write and nothing changes. A value that is not an ISO 8601 instant, the empty string included, is a 422 and nothing changes; leave the field out for an edit without the check.

Response

Successful Response

idstring required
contentstring required
user_idstring nullable required
agent_idstring nullable required
run_idstring nullable required
clientstring nullable

The tool that wrote it: the X-Korely-Client header of the write, or the name an MCP client gave when it connected. A label, not a namespace: no read is scoped by it and the agent cap does not count it.

kindstring

note, or session for the log of a work session (kind of the write).

metadataobject required
statusstring

Whether this memory's typed facts are queryable yet: 'processing', 'ready', or 'error'. Extraction runs after the write returns, so a read taken immediately can legitimately find no facts. Poll GET /v1/events or read the memory again: no webhook says that extraction finished (memory.created is sent when the memory is stored, before its facts).

created_atstring nullable required
updated_atstring nullable required
factsobject[]

Changes

No recorded changes to this operation across all 1 revision of this API.