Skip to main content

Update Memory

Modify the content of an existing factual memory

Updates the content of a specified memory node. The API automatically detects the node type and formats the content.

Method and endpoint

PATCH https://dashscope.aliyuncs.com/api/v2/apps/memory/memory_nodes/{memory_node_id}

Request parameters

ParameterTypeRequiredLocationDescription
memory_node_idstringYesPathMemory node ID
custom_contentstringYesBodyUpdated memory content
memory_library_idstringNoBodyMemory library ID
meta_dataobjectNoBodyMetadata. The update is incremental, and unspecified keys remain unchanged
skill_namestringConditionally requiredBodyIf the node is a skill, skill_name, skill_description, and skill_tags are all required
skill_descriptionstringConditionally requiredBodySkill description. Required under the same conditions as skill_name
skill_tagsarray[string]Conditionally requiredBodySkill tags. Required under the same conditions as skill_name

Response

FieldTypeDescription
request_idstringRequest ID

Request example

curl --location --request PATCH 'https://dashscope.aliyuncs.com/api/v2/apps/memory/memory_nodes/42dfc089dfa7409889966960a95c3b7e' \
  --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "custom_content": "Updated memory content",
    "memory_library_id": "memory_library_001",
    "meta_data": {"location_name": "Hangzhou"}
  }'

Response example

{
  "request_id": "cc2690f9f2b3485a93013e5705c91241"
}
To delete a memory, use Delete Memory.
Managed Agent API
Flow Agent API
Sandbox API
RAG API
ParseX API
Security API
Framework Integration