Skip to content

On this page you will learn how to delete one record or every record taken from one document, what the server returns, and why you should not pass both parameters at once.

The running example: docs/deploy.md was rewritten, and the team wants to remove every fact saved from its old version.

forget performs a soft delete: the record gets a deletion timestamp, no longer shows up in search, and its knowledge-graph links are removed. There are two modes:

  • by memory_id: one record;
  • by source_id: every active record from that source in the workspace (cascade).
ParameterTypeDefaultDescription
memory_idstring or nullnullID of the record to delete.
workspacestring"default"Workspace that holds the record.
source_idstring or nullnullSource whose records should all be deleted.

At least one of memory_id and source_id is required.

Delete by memory_id:

FieldDescription
idRecord ID from the request.
forgottentrue if the record was found and deleted; false if it does not exist, is already deleted, or is not visible to you.
workspace, tenant_id, api_versionService fields.
atOperation time, ISO 8601.

Delete by source_id:

FieldDescription
source_idSource from the request.
forgotten_countNumber of records deleted (may be 0).
workspace, tenant_id, api_versionService fields.
atOperation time, ISO 8601.

Delete every fact from the old version of the document:

arguments
{
"source_id": "docs/deploy.md",
"workspace": "default"
}
{
"api_version": "1.0",
"source_id": "docs/deploy.md",
"tenant_id": "t-3f9a",
"workspace": "default",
"forgotten_count": 3,
"at": "2026-10-05T10:02:41.118204+00:00"
}

Delete one record:

arguments
{ "memory_id": "4d428a41-e7b0-4f81-a886-f40c6f6c766c" }
{
"api_version": "1.0",
"id": "4d428a41-e7b0-4f81-a886-f40c6f6c766c",
"tenant_id": "t-3f9a",
"workspace": "default",
"forgotten": true,
"at": "2026-10-05T10:03:05.540911+00:00"
}
TextCause
Either memory_id or source_id must be providedNeither memory_id nor source_id was passed.
workspace '…' was deleted and cannot be reusedThe workspace was deleted.
403 Forbidden: workspace access denied for projectThe workspace belongs to another project.
MCP rate limit exceeded, project call limit exceededToo many calls per minute.
[MMW Notice]: …No subscription, grace period (deleting is not allowed, read-only) or suspended account.

A record that does not exist is not an error: you get forgotten: false or forgotten_count: 0.

  • Only what you can see. In an organization, forget touches only records you can read under the visibility rules. Other people’s drafts are not deleted even if they share the source_id.
  • Only the key’s project. Records of other projects are out of reach.
  • Soft delete. A record cannot be restored over MCP. For full deletion of account data, see Data and deletion.
  • remember never deletes anything on its own: removing outdated facts takes an explicit forget.