Skip to main content
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. 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.
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.

Parameters

string
required
What to forget, in the user’s own words. 3 to 500 characters.
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.
string
The customer the user belongs to. Required on B2B. Not accepted on B2C: passing it is rejected. See B2C vs B2B.
dict[str, str]
The full path to the user on your scope ladder, 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.
string
default:"preview"
What happens to the memories that match.

Returns

A ForgetResponse (TypeScript: ForgetResult).
string
What happened.
string | None
In preview mode, the id of the pending request you approve in the dashboard. null in direct mode and when nothing matched.
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. For the other stores, memory_id identifies the copy and memory_type is a label such as source text or relationship.
list[string]
The memories this call deleted. Copies are not listed. Empty in preview mode.
list[string]
Matched memories this call did not delete, usually because they were already deleted. Empty in preview mode.
list[string]
On a partial result, the stores that may still hold the text.
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.
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.

Across instances

A user’s memories can sit in more than one instance of your account. Forget follows instance visibility:
  • 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

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.

See also