Skip to content
Get started

Forget a memory

memories.forget(MemoryForgetParams**kwargs) -> MemoryForgetResponse
DELETE/v4/memories

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

ParametersExpand Collapse
container_tag: str

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

maxLength100
id: Optional[str]

ID of the memory entry to operate on

content: Optional[str]

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

reason: Optional[str]

Optional reason for forgetting this memory

ReturnsExpand Collapse
class MemoryForgetResponse:

Response after forgetting a memory

id: str

ID of the memory that was forgotten

forgotten: bool

Indicates the memory was successfully forgotten

Forget a memory

import os
from supermemory import Supermemory

client = Supermemory(
    api_key=os.environ.get("SUPERMEMORY_API_KEY"),  # This is the default and can be omitted
)
response = client.memories.forget(
    container_tag="user_123",
)
print(response.id)
{
  "id": "mem_abc123",
  "forgotten": true
}
Returns Examples
{
  "id": "mem_abc123",
  "forgotten": true
}