Skip to content
Get started

Forget a memory

client.memories.forget(MemoryForgetParams { containerTag, id, content, reason } body, RequestOptionsoptions?): MemoryForgetResponse { id, forgotten }
DELETE/v4/memories

Forget (soft delete) a memory entry. The memory is marked as forgotten but not permanently deleted.

ParametersExpand Collapse
body: MemoryForgetParams { containerTag, id, content, reason }
containerTag: string

Container tag / space identifier. Required to scope the operation.

maxLength100
id?: string

ID of the memory entry to operate on

content?: string

Exact content match of the memory entry to operate on. Use this when you don’t have the ID.

reason?: string

Optional reason for forgetting this memory

ReturnsExpand Collapse
MemoryForgetResponse { id, forgotten }

Response after forgetting a memory

id: string

ID of the memory that was forgotten

forgotten: boolean

Indicates the memory was successfully forgotten

Forget a memory

import Supermemory from 'supermemory';

const client = new Supermemory({
  apiKey: process.env['SUPERMEMORY_API_KEY'], // This is the default and can be omitted
});

const response = await client.memories.forget({ containerTag: 'user_123' });

console.log(response.id);
{
  "id": "mem_abc123",
  "forgotten": true
}
Returns Examples
{
  "id": "mem_abc123",
  "forgotten": true
}