v4

OpenAPI 3.1.02026-08-01420618.8 KB
Content Management

Forget memories matching a prompt/query

Agentic mass-forget. Given a prompt or query, a tool-calling agent searches the container's memories and soft-deletes everything matching the target. Use dryRun to preview first.

post/v4/memories/forget-matching

Request body

querystring

Natural-language instruction ('forget everything about Project Titan') or a bare topic ('Project Titan'). The service searches the container's memories and selects matches to forget. Provide either query or ids.

idsstring[]

Forget exactly these memory ids, with no semantic search. Ids are validated against the containerTag, so unknown or out-of-scope ids are ignored. Provide either query or ids.

containerTagstring required

Container tag / space the forget operation is scoped to.

dryRunboolean

When true, returns the memories that WOULD be forgotten without mutating anything. Defaults to false (forgets for real).

thresholdnumber

Minimum cosine similarity a memory must have to be considered. Lower = wider net. Defaults to 0.5.

maxForgetinteger

Maximum number of memories this call may forget. Defaults to 100, max 500.

reasonstring

Optional reason stored as forgetReason on each memory.

Example request

{
  "query": "forget everything about Project Titan",
  "ids": [
    "abc123",
    "def456"
  ],
  "containerTag": "user_123",
  "threshold": 0.5,
  "maxForget": 100,
  "reason": "project cancelled"
}

Response

Forget operation completed (or previewed)

dryRunboolean required

Whether this was a preview (no mutation) or a real forget

countnumber required

Number of memories selected / forgotten

forgetBatchIdstring nullable required

ID tagged on every memory forgotten in this call (null on dryRun)

summarystring required

The agent's one-line summary of what it did