Claude Platform Docs

Delete a memory

$ ant beta:memory-stores:memories delete
DELETE/v1/memory_stores/{memory_store_id}/memories/{memory_id}

Delete a memory

Parameters
--memory-store-id: string⁠Path parameter

The ID of the memory store that holds the memory (memstore_...).

--memory-id: string⁠Path parameter

The ID of the memory to delete (mem_...).

--expected-content-sha256: optional string⁠Query parameter

Delete the memory only if its current content_sha256 equals this value, given as 64 lowercase hexadecimal characters. Omit it to delete unconditionally.

If the hashes differ, the request fails with HTTP status 409 and nothing is deleted.

--beta: optional array of AnthropicBeta⁠Header parameter

Optional header to specify the beta version(s) you want to use.

--workspace-id: optional string⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
beta_managed_agents_deleted_memory: object{ type: "memory_deleted", id }

Tombstone returned by Delete a memory. Deleting a memory does not erase its version history: its versions remain listable via List memory versions while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).

type: "memory_deleted"
id: string

ID of the deleted memory (a mem_... value).

Delete a memory
ant beta:memory-stores:memories delete \
  --api-key my-anthropic-api-key \
  --memory-store-id memory_store_id \
  --memory-id memory_id
Returns Examples
Response 200
{
  "id": "id",
  "type": "memory_deleted"
}