update method replaces the content of a stored memory record. Use it to correct a fact, refine a preference, or reflect a change in user context.
Method signature
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
memory_id | str | Yes | The ID of the memory record to update. |
content | str | Yes | The new content to replace the existing memory. |
owner_id | str | No | Owner identifier for additional scoping. |
Response
Returns the updatedCognisMemoryRecord.
| Field | Type | Description |
|---|---|---|
id | str | Memory record ID. |
content | str | The updated memory content. |
version | int | None | Incremented version number. |
is_current | bool | None | Always true for the updated record. |
updated_at | str | None | Timestamp of the update. |
Basic usage
- Hosted (lyzr-adk)
- Open Source (lyzr-cognis)
Async usage
memory_id for a specific record, use Get Memories or Search Memories first, then pass the returned ID to update. Previous versions of the memory are retained and accessible via get() with include_historical=True.