delete_memory
Permanently delete a memory from the workspace. You can only delete memories that were created using the same API key.Use Cases
- Remove outdated or incorrect information
- Clean up test memories
- Implement memory management interfaces
- Remove sensitive information
Parameters
string
required
UUID of the memory to delete. Must be a valid memory ID from a previous
save_memory or get_memories call.Response
boolean
Whether the operation succeeded
string
Success message confirming the deletion
Example Request
Example Response
Behavior
- Memory is permanently deleted from PostgreSQL
- Memory is removed from ChromaDB index in the background
- Deletion is immediate and cannot be undone
- Only memories created by the same API key can be deleted
Error Handling
Ownership
Memories are tied to the API key that created them. This ensures:- Security: API keys can only delete their own memories
- Accountability: You can track which API key created each memory
- Isolation: Different API keys don’t interfere with each other’s memories
Best Practices
- Verify ownership first: Use
get_memoriesto find memories you can delete - Confirm before deleting: Especially for important memories
- Clean up test data: Remove test memories after development
- Use update instead: Consider updating memories rather than deleting if you want to preserve history
