Update Memory
Manually update the content, title, or status of an existing memory. Supports all memory categories, including fact memories, preference memories, Event Memory, and Profile attribute values.
POST
import os
import requests
import json
# Replace with your API Key
os.environ["MEMOS_API_KEY"] = "YOUR_API_KEY"
os.environ["MEMOS_BASE_URL"] = "https://memos.memtensor.cn/api/openmem/v1"
data = {
"memory_id": "mem_event_001",
"title": "Camping at West Lake with Chen Mo",
"content": "Last Saturday I went camping by West Lake with my friend Chen Mo. The weather was great and we watched the stars together at night."
}
headers = {
"Content-Type": "application/json",
"Authorization": f"Token {os.environ['MEMOS_API_KEY']}"
}
url = f"{os.environ['MEMOS_BASE_URL']}/update/memory"
res = requests.post(url=url, headers=headers, data=json.dumps(data))
print(f"result: {res.json()}")
# Ensure MemOS is installed (pip install MemoryOS -U)
from memos.api.client import MemOSClient
client = MemOSClient(api_key="YOUR_API_KEY")
res = client.update_memory(
memory_id="mem_event_001",
title="Camping at West Lake with Chen Mo",
content="Last Saturday I went camping by West Lake with my friend Chen Mo. The weather was great and we watched the stars together at night."
)
print(f"result: {res}")
curl --request POST \
--url https://memos.memtensor.cn/api/openmem/v1/update/memory \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"memory_id": "mem_event_001",
"title": "Camping at West Lake with Chen Mo",
"content": "Last Saturday I went camping by West Lake with my friend Chen Mo. The weather was great and we watched the stars together at night."
}'
{
"code": 0,
"data": {
"success": true
},
"message": "<string>"
}Authorizations
Authorization
string
header
required
Token API_key, available in API Console > API Keys
Body
application/json
memory_id
string
required
Memory ID, from the id field returned by search/memory or get/memory.
content
string
The updated memory content.
title
string
The updated memory title.
Response
application/json
Successful Response
code
number
API status code.
data
object
Show child attributes
message
string
API response message.
import os
import requests
import json
# Replace with your API Key
os.environ["MEMOS_API_KEY"] = "YOUR_API_KEY"
os.environ["MEMOS_BASE_URL"] = "https://memos.memtensor.cn/api/openmem/v1"
data = {
"memory_id": "mem_event_001",
"title": "Camping at West Lake with Chen Mo",
"content": "Last Saturday I went camping by West Lake with my friend Chen Mo. The weather was great and we watched the stars together at night."
}
headers = {
"Content-Type": "application/json",
"Authorization": f"Token {os.environ['MEMOS_API_KEY']}"
}
url = f"{os.environ['MEMOS_BASE_URL']}/update/memory"
res = requests.post(url=url, headers=headers, data=json.dumps(data))
print(f"result: {res.json()}")
# Ensure MemOS is installed (pip install MemoryOS -U)
from memos.api.client import MemOSClient
client = MemOSClient(api_key="YOUR_API_KEY")
res = client.update_memory(
memory_id="mem_event_001",
title="Camping at West Lake with Chen Mo",
content="Last Saturday I went camping by West Lake with my friend Chen Mo. The weather was great and we watched the stars together at night."
)
print(f"result: {res}")
curl --request POST \
--url https://memos.memtensor.cn/api/openmem/v1/update/memory \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"memory_id": "mem_event_001",
"title": "Camping at West Lake with Chen Mo",
"content": "Last Saturday I went camping by West Lake with my friend Chen Mo. The weather was great and we watched the stars together at night."
}'
{
"code": 0,
"data": {
"success": true
},
"message": "<string>"
}