memory

Forget Bulk

Delete every memory in one context that matches the filters (#1941).

Filters combine with AND: created_before (exclusive), created_after (inclusive), type, tags (any of). At least one filter or all: true is required. dry_run defaults to true and returns matched; with dry_run: false the matches are deleted the way /forget deletes one memory (soft delete, search point and graph edges removed) and deleted is returned. One request deletes at most 2,000 memories; remaining: true means more match — repeat the request with cursor set to the returned next_cursor.

Permissions are /forget's: write access to the context (uniform 404 otherwise), then the per-memory delete check — a memory the caller may not delete is skipped and not counted. Allowed while the workspace is over its Free capacity: deleting is how it gets back under the cap.

post/api/v1/memory/forget-bulk

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/api/v1/memory/forget-bulk
  • Auth: none declared

Headers

authorizationstring nullable

Request body

context_idstring uuid required

The context to delete from

created_beforestring date-time nullable

Only memories created before this instant (exclusive)

created_afterstring date-time nullable

Only memories created at or after this instant (inclusive)

typestring nullable

Only memories of this type

tagsstring[] nullable

Only memories carrying ANY of these tags

allboolean

Match every memory in the context (no filter)

dry_runboolean

Count the matches without deleting

cursorstring nullable

Resume point: the previous response's next_cursor, so rows this caller may not delete are not rescanned. Ignored on a dry run.

Response

Successful Response

statusstring
dry_runboolean required
matchedinteger nullable
deletedinteger nullable
remainingboolean nullable
next_cursorstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.