JavaScript
Memory Layers
Delete a memory layer
Remove a layer and its entries. Detach it from every variation first.
DELETE
JavaScript
Permanently delete a memory layer and every entry inside it.
So detach the layer from every variation first, then delete it. The variation’s
Episodic layers are system-managed and cleaned up by Cadenya; you delete the skills layers you created, not the episodic ones it maintains.
Entries go with it; assignments block it
The layer’s entries are deleted along with it, no need to empty it first. A layer with entries deletes cleanly. What does block the delete is an assignment. While any variation still has the layer attached, the delete is a400:
info.memoryLayerAssignments is where you see what still holds it.
A layer can get stuck in this state if you deleted the agent that held the assignment rather than removing the assignment: agent deletion does not always clean up the memory-layer assignment, which leaves the layer reporting “assigned” with no live variation to detach from. Deleting the variation directly, or removing the assignment, avoids this.
Related
Remove a memory layer from a variation
Detach it first so the delete succeeds.
Get a memory layer
Check
entryCount before you remove it.Delete a memory entry
Remove one entry instead of the whole layer.
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"