DELETE /memory/
Delete a specific memory by its unique identifier.Path Parameters
The unique identifier of the memory to delete.
Response
Indicates whether the operation was successful.
Confirmation of the deletion operation.
Example Request
Example Response
Error Responses
Error message describing what went wrong.
DELETE /memory/user/
Delete all memories for a specific user. This is a destructive operation that removes all stored memories associated with the user ID.Path Parameters
The unique identifier of the user whose memories should be deleted.
Response
Indicates whether the operation was successful.
Confirmation of the deletion operation.
Example Request
Example Response
Use Cases
User Account Deletion When a user deletes their account, remove all their memories:Selective Deletion
Currently, the API doesn’t support selective deletion by memory type (e.g., delete only SHORT_TERM memories). To achieve this, you would need to:
- Search for memories with the specific type filter
- Delete each memory individually using
/memory/{memory_id}
Error Responses
500 Internal Server Error- Invalid Memory ID: The provided memory doesn’t exist (single delete)
- User Not Found: No memories found for the user ID (user delete)
- Database Connection: Failure to connect to the vector store
- Partial Deletion: Some memories deleted but operation failed partway through
Implementation Details
- Single Delete Source:
backend/main.py:332 - User Delete Source:
backend/main.py:344 - Cascade Deletion: Removes vectors from Supabase and relationships from Neo4j (if enabled)
- Atomic Operations: Single deletes are atomic; user deletes may be partial on errors