Skip to documentation
Docs navigation
Docs/forgetMany()
MemoGrafterAgent

forgetMany()

Soft-forget several memories.

What it does

Soft-forget several memories.

When to use it

Use to soft-forget several known memory IDs in one storage operation.

Signature

TypeScript
forgetMany(memoryIds: string[]): Promise<number>

Parameters

memoryIds (string[]) — Memory records to change in one operation.

Result

The number of changed memory rows.

Behavior

Applies the same lifecycle transition as forget() and returns the number of rows that actually changed.

Side effects and completion

Historical rows remain stored for audit and memory-history reads.

Example

example.ts
const changed = await agent.forgetMany(memoryIds);