Patch Memory
client.memories.update(stringmemoryID, MemoryUpdateParams { metadata, text } body, RequestOptionsoptions?): MemoryItem { id, memory, agent_id, 7 more }
PATCH/v1/memories/{memory_id}/
Update memory text — supersedes old + creates new.
Metadata-only patches (no text) are rejected with 400; the
row’s metadata is derived from extraction and isn’t editable from
the API yet.
Patch Memory
import XtraceMemoryManager from 'xtrace-memory-manager';
const client = new XtraceMemoryManager({
apiKey: process.env['XTRACE_MEMORY_MANAGER_API_KEY'], // This is the default and can be omitted
orgID: process.env['XTRACE_MEMORY_MANAGER_ORG_ID'], // This is the default and can be omitted
});
const memoryItem = await client.memories.update('memory_id');
console.log(memoryItem.id);{
"id": "id",
"memory": "memory",
"agent_id": "agent_id",
"categories": [
"string"
],
"conv_id": "conv_id",
"created_at": "created_at",
"metadata": {},
"score": 0,
"updated_at": "updated_at",
"user_id": "user_id"
}Returns Examples
{
"id": "id",
"memory": "memory",
"agent_id": "agent_id",
"categories": [
"string"
],
"conv_id": "conv_id",
"created_at": "created_at",
"metadata": {},
"score": 0,
"updated_at": "updated_at",
"user_id": "user_id"
}