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

ParameterTypeDescription
keystringRequired for a node update. The node to change.
descriptionstringA new description. It replaces the old one: write what is true now (80–300 characters), never the old text plus an appended “UPDATE” paragraph.
dataobjectThe node’s structured data. Replaces the existing data object entirely, so send every field you want to keep. Put history and corrections here.
node_typestringMove the node to another canonical type.
search_textstringExtra keywords to index.
assetsstring[]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.

If the node was wrong, say in data what was corrected and how it was verified — for example {"corrected": {"field": "launch_date", "from": "2026-10-01", "to": "2026-11-02", "verified_by": "release calendar"}}. Later sessions can then trust the correction.

Update an edge

ParameterTypeDescription
edge_idstringRequired for an edge update. The binary edge’s id, as returned by hm_get_nodes. Takes precedence over key.
descriptionstringNew wording of the relationship’s explanation.
dataobjectStructured facts about the connection, merged into the edge’s existing data. null clears it.
edge_versionintegerOptional 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

FieldDescription
updatedThe node key or edge id that was changed.
edge_idOn an edge update, the edge that was changed.
memory_versionThe graph’s version after the write.
replayedtrue 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."
}

Equivalents

curl -X POST https://api.hypermemory.io/api/v1/memory/update \
  -H "Authorization: Bearer $HYPERMEMORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"fact_launch_date","description":"Product launches on 2026-11-02, moved from 2026-10-01 after the security review."}'