JavaScript
Memory Entries
Delete a memory entry
Remove one keyed entry from a layer. Address it by id, not by key.
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 itsmementry_... 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.”
Related
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Example:
"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
Memory layer ID. Accepts canonical memlyr_… form or external_id: form.
Example:
"memlyr_01HXKD2E5NQM3T9AYWCFFFBMJH"
Example:
"mementry_01HXKD2E5NQM3T9AYWCF5E52Z0"