> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Maximem Synap is a managed memory layer for AI agents: it ingests conversations and documents, extracts structured memory, and returns scoped context to the agent at retrieval time.
> The Python and JavaScript/TypeScript SDKs are the supported way to use Synap. Write integration code with SDK calls, not raw HTTP requests.
> Start with the Quickstart: https://docs.maximem.ai/getting-started/quickstart.md. Every SDK method is documented in the SDK reference: https://docs.maximem.ai/sdk-reference/overview.md.
> For requests about adding Vity memory to OpenClaw, Hermes, an MCP client, or a browser, start with the Vity Quickstart: https://docs.maximem.ai/vity/quickstart.md.

# memories.forget

> Forget memories by describing them in the user's own words, when you do not hold their ids.

```python Python theme={null}
await sdk.memories.forget(description, user_id=None, customer_id=None, scope=None, mode="preview")
```

```typescript TypeScript theme={null}
await sdk.memories.forget(options: ForgetOptions)
```

REST One HTTPS request. Works in serverless functions (Python, or Node 20+ for JavaScript and TypeScript).

Forget memories by describing them, for example "my old phone number". Synap finds the memories that match the description and either files them for a person to approve, or removes them straight away. Use this when you do not hold memory ids. To delete one memory whose id you have, use [`memories.delete`](https://docs.maximem.ai/sdk-reference/memories/delete).

A call always covers exactly one user: pass `user_id`, plus `customer_id` on a B2B instance. A request that would reach wider than one user is refused.

Python 0.5.5 and later. JavaScript and TypeScript 0.5.6 and later.

> [!NOTE]
>
> **In Synap Core:** forget by description needs your own Jev API key, and Core has no dashboard to approve a preview. See [Forget in Synap Core](https://docs.maximem.ai/core/quickstart.md#remove-a-memory).

### Parameters

**description** `string` *required*

What to forget, in the user's own words. 3 to 500 characters.

**user\_id** `string`

The user whose memories to search. Optional in the signature, but a call without it is refused (HTTP 400), because a forget must cover exactly one user.

**customer\_id** `string`

The customer the user belongs to. Required on B2B. **Not accepted on B2C**: passing it is rejected. See [B2C vs B2B](https://docs.maximem.ai/concepts/memory-scopes.md#b2c-vs-b2b-which-scopes-apply-to-you).

**scope** `dict[str, str]`

The full path to the user on your [scope ladder](https://docs.maximem.ai/concepts/scope-ladder.md), one entry per level from the top down to the user, for example `{"customer": "acme", "team": "payments", "user": "dana"}`. A path that stops above the user is refused (HTTP 400), as is a path sent to an instance without nested scoping. When you pass it, its `customer` and `user` entries are used instead of `customer_id` and `user_id`.

**mode** `string` (default: preview)

What happens to the memories that match.

| Value | What happens |
| - | - |
| `preview` | **Default.** Nothing is deleted. Synap files a pending request that a person approves in the dashboard, on the **Requests** page under **Deletion requests**. `candidates` lists what matched. |
| `direct` | Synap finds the matches and deletes them in the same call: they stop appearing in context fetches, and their copies in the search index and graph are removed. Check `status`: only `deleted` means every copy it found was removed. |

### Returns

A `ForgetResponse` (TypeScript: `ForgetResult`).

**status** `string`

What happened.

| Value | Meaning |
| - | - |
| `nothing_matches` | No memory matched the description. |
| `preview` | A pending request was filed. Nothing is deleted yet. |
| `deleted` | Every matching memory, and every copy of it this call found, was removed. |
| `partial` | Some cleanup did not finish: a copy could not be removed, or a store could not be searched. `still_present_in` names where the text may remain. A cached result may keep showing the text until it expires. |

**request\_id** `string | None`

In `preview` mode, the id of the pending request you approve in the dashboard. `null` in `direct` mode and when nothing matched.

**candidates** `list[ForgetCandidate]`

The memories the description matched. Each has `memory_id`, `content`, `memory_type`, and `store`: `"memory"`, or where a copy of its text lives (`chunk`, `sentence`, `entity`, `triple`, `profile`, `candidate`). Only entries with store `"memory"` carry a memory id you can pass to [`memories.delete`](https://docs.maximem.ai/sdk-reference/memories/delete). For the other stores, `memory_id` identifies the copy and `memory_type` is a label such as `source text` or `relationship`.

**deleted\_ids** `list[string]`

The memories this call deleted. Copies are not listed. Empty in `preview` mode.

**failed\_ids** `list[string]`

Matched memories this call did not delete, usually because they were already deleted. Empty in `preview` mode.

**still\_present\_in** `list[string]`

On a `partial` result, the stores that may still hold the text.

**may\_be\_incomplete** `bool`

`true` when the search may have missed matches: a store could not be searched, or the user has more close matches than one call examines. After a `direct` call, call again to reach the rest. `false` does not prove nothing else matches.

> [!WARNING]
>
> Tell your end user something was removed only when `status` is `"deleted"`. Even then, forget removes memories and their copies, not what you sent: the documents and conversations you ingested are not changed. To remove everything about a person, see [Erasing a person](https://docs.maximem.ai/guides/erasure.md).

### Across instances

A user's memories can sit in more than one instance of your account. Forget follows [instance visibility](https://docs.maximem.ai/guides/instance-visibility.md):

* **Instances the asking instance can read** are covered in both modes. Under the default `shared_all`, that is every instance.
* **An instance it cannot read** (your instances are `isolated` and no grant opens it) is never changed by this call. If memories there match, a pending request is filed for that instance in the dashboard's deletion requests, for a person with the delete permission to decide. That instance's memories never appear in `candidates`, and the response does not say a request was filed: if only that instance matched, `status` is `nothing_matches`.

The follow-up searches after a `direct` call that found nothing yet follow the same rule: they never delete in an instance the asking one cannot read.

Forget never deletes permanently: the memory is hidden, not purged. There is no option for an agent to ask for a permanent delete.

### Example

```python Python theme={null}
from maximem_synap import MaximemSynapSDK

sdk = MaximemSynapSDK()  # reads SYNAP_API_KEY from your environment
await sdk.initialize()

result = await sdk.memories.forget(
    description="my old phone number",
    user_id="user_alice",
    customer_id="customer_acme",  # B2B only: required there, rejected on B2C
)

if result.status == "preview":
    print(f"{len(result.candidates)} memories wait for approval (request {result.request_id})")
elif result.status == "nothing_matches":
    print("Nothing matched that description.")
```

```typescript TypeScript theme={null}
import { SynapClient } from '@maximem/synap-js-sdk';

const sdk = new SynapClient(); // reads SYNAP_API_KEY from your environment
await sdk.initialize();

const result = await sdk.memories.forget({
  description: 'my old phone number',
  user_id: 'user_alice',
  customer_id: 'customer_acme', // B2B only: required there, rejected on B2C
});

if (result.status === 'preview') {
  console.log(`${result.candidates.length} memories wait for approval (request ${result.request_id})`);
} else if (result.status === 'nothing_matches') {
  console.log('Nothing matched that description.');
}
```

### Raises

* `InvalidInputError`: the call does not cover exactly one user (HTTP 400), Synap rejected the request (HTTP 422), or `description` or `mode` is invalid (caught before anything is sent).
* `ServiceUnavailableError`: Synap could not decide which memories match (HTTP 503), so nothing was deleted and it is safe to try again. Both SDKs retry it first (Python from 0.6.1).
* `AuthenticationError`: the API key is missing or invalid, or (Python) `initialize()` has not been called. JavaScript and TypeScript initialize on the first call.
* `NetworkTimeoutError`: no answer within the SDK's read timeout. It is not retried, and a `direct` call may already have finished; call again to see what is left.

Credit, rate-limit and network errors are the same on every call: see [Error codes](https://docs.maximem.ai/sdk-reference/errors.md).

### See also

* [memories.delete](https://docs.maximem.ai/sdk-reference/memories/delete.md): delete one memory by its id
* [Erasing a person](https://docs.maximem.ai/guides/erasure.md): remove everything about one person


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.