Memory
hm_update
Correct or extend an existing node or edge
hm_update changes an existing memory instead of creating a duplicate. It works on a node (by key) or on a single edge or hyperedge (by edge_id).
Update a node
| Parameter | Type | Description |
|---|---|---|
key | string | Required for a node update. The node to change. |
description | string | A new description. It replaces the old one: write what is true now (80–300 characters), never the old text plus an appended “UPDATE” paragraph. |
data | object | The node’s structured data. Replaces the existing data object entirely, so send every field you want to keep. Put history and corrections here. |
node_type | string | Move the node to another canonical type. |
search_text | string | Extra keywords to index. |
assets | string[] | Asset references. |
Fields you don’t send are left as they are. When the description changes, HyperMemory re-indexes the node for search and re-runs person and organization detection; any update sets enrichment_status back to pending.
Update an edge
| Parameter | Type | Description |
|---|---|---|
edge_id | string | Required for an edge update. The binary edge’s id, as returned by hm_get_nodes. Takes precedence over key. |
description | string | New wording of the relationship’s explanation. |
data | object | Structured facts about the connection, merged into the edge’s existing data. null clears it. |
edge_version | integer | Optional write_version you last read. If the edge changed since, the update is refused with edge_version_conflict (409), so concurrent writers don’t overwrite each other. |
An edge’s endpoints and relationship type are immutable. To change them — or to change a hyperedge, which can’t be updated in place — delete it with hm_forget and recreate it with hm_add_relationships.
Response
| Field | Description |
|---|---|
updated | The node key or edge id that was changed. |
edge_id | On an edge update, the edge that was changed. |
memory_version | The graph’s version after the write. |
replayed | true when this update had already been applied (safe retry). |
Examples
{
"key": "fact_launch_date",
"description": "Product launches on 2026-11-02, moved from 2026-10-01 after the security review.",
"data": {
"date": "2026-11-02",
"status": "scheduled",
"corrected": { "field": "date", "from": "2026-10-01", "verified_by": "release calendar" }
}
}
{
"edge_id": "6f1d2c0a-8b4e-5a37-9c21-3e7f5b9d0a14",
"edge_version": 3,
"description": "Alice has led Project Phoenix since its kickoff in January 2026."
}