Memories
Update a memory
Replace a note and choose its retention.
PUT
/
api
/
v2
/
memories
/
{id}
from hai_agents import Client
client = Client()
note = client.memories.update_memory(memory_id, value="Use a short table.", delete_after_min=1440)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const note = await client.memories.updateMemory({ id: memoryId, value: "Use a short table.", deleteAfterMin: 1440 });
curl -X PUT "https://agp.eu.hcompany.ai/api/v2/memories/$MEMORY_ID" -H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" -d '{"value":"Use a short table.","delete_after_min":1440}'
holo memories update "$MEMORY_ID" "Use a short table." --expires-in 1440
Path parameters
Request body
Minutes after this write before the note expires, from
1 to 2147483647. Omit to use the caller’s current privacy setting; with no retention limit, the note is kept. Pass null to keep it until explicit deletion. Every write restarts the window and chooses the retention again, including an update that omits this field.Response
200 with the updated memory object. The namespace and key stay unchanged.
from hai_agents import Client
client = Client()
note = client.memories.update_memory(memory_id, value="Use a short table.", delete_after_min=1440)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const note = await client.memories.updateMemory({ id: memoryId, value: "Use a short table.", deleteAfterMin: 1440 });
curl -X PUT "https://agp.eu.hcompany.ai/api/v2/memories/$MEMORY_ID" -H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" -d '{"value":"Use a short table.","delete_after_min":1440}'
holo memories update "$MEMORY_ID" "Use a short table." --expires-in 1440
Errors
404 if the note is absent or belongs to another organization. 422 for invalid input. See common errors.Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
note = client.memories.update_memory(memory_id, value="Use a short table.", delete_after_min=1440)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const note = await client.memories.updateMemory({ id: memoryId, value: "Use a short table.", deleteAfterMin: 1440 });
curl -X PUT "https://agp.eu.hcompany.ai/api/v2/memories/$MEMORY_ID" -H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" -d '{"value":"Use a short table.","delete_after_min":1440}'
holo memories update "$MEMORY_ID" "Use a short table." --expires-in 1440