Skip to main content
DELETE
JavaScript
Remove one entry from a memory layer, leaving the layer and its other entries in place.
The layer’s info.entryCount drops by one, and an agent’s next get_memory for that key finds nothing.

Use the entry id, not the key

Address the entry by its mementry_... id in the path, not by its key. A key like policy/refunds has slashes, which break the URL path (the request does not reach the delete route), so a delete keyed on the key fails. Fetch the id from List memory entries if all you have is the key. Deleting an entry that is already gone is a 404, so the call is not idempotent; treat a 404 here as “already deleted.”

List memory entries

Find an entry’s mementry_... id from its key.

Create a memory entry

Add one back.

Delete a memory layer

Remove the whole layer and every entry at once.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required
Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

memoryLayerId
string
required

Memory layer ID. Accepts canonical memlyr_… form or external_id: form.

Example:

"memlyr_01HXKD2E5NQM3T9AYWCFFFBMJH"

id
string
required
Example:

"mementry_01HXKD2E5NQM3T9AYWCF5E52Z0"

Response