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
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.
The customer the user belongs to. Required on B2B. Not accepted on B2C: passing it is rejected. See B2C vs B2B.
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.Returns
AForgetResponse (TypeScript: ForgetResult).
In
preview mode, the id of the pending request you approve in the dashboard. null in direct mode and when nothing matched.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.Matched memories this call did not delete, usually because they were already deleted. Empty in
preview mode.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.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
isolatedand 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 incandidates, and the response does not say a request was filed: if only that instance matched,statusisnothing_matches.
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), ordescriptionormodeis 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 adirectcall may already have finished; call again to see what is left.
See also
- memories.delete: delete one memory by its id
- Erasing a person: remove everything about one person