delete() removes a specific memory record by ID, and delete_all() removes all memories matching a scope.
Delete a single memory
Method signature
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
memory_id | str | Yes | The ID of the memory record to delete. |
owner_id | str | No | Owner identifier for additional scoping. |
Response
Basic usage
- Hosted (lyzr-adk)
- Open Source (lyzr-cognis)
Delete all memories for a scope
Method signature
owner_id, agent_id, or session_id must be provided.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner_id | str | Conditional | Delete all memories for this owner. |
agent_id | str | Conditional | Delete all memories for this agent. |
session_id | str | Conditional | Delete all memories for this session. |
Usage
Async usage
delete_all() is irreversible. Use Get Memories to review the records in a scope before calling it in production.