update
Update an existing memory by ID or similarity match. Supports partial edits without rewriting the full content.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | number | No* | Memory ID to update |
content | string | No* | Full replacement content |
append | string | No | Text to append to existing content |
prepend | string | No | Text to prepend to existing content |
find | string | No | Text to find (used with replace) |
replace | string | No | Replacement text (used with find) |
topic | string | No | Update topic |
source | string | No | Update source |
importance | number | No | Update importance (1-5) |
expires_in_days | number | No | Update expiration |
* Either id or similarity-based targeting is required.
Examples
Section titled “Examples”Update by ID
Section titled “Update by ID”{ "id": 42, "append": "\nUpdate: now using RS256 instead of HS256"}Find and replace
Section titled “Find and replace”{ "id": 42, "find": "HS256", "replace": "RS256"}Metadata-only update
Section titled “Metadata-only update”{ "id": 42, "importance": 5, "topic": "critical-architecture"}