Endpoint
Request body
The unique identifier of the memory to forget
Whether to permanently delete the memory.
false(default): Soft delete - marks as deleted but keeps in databasetrue: Hard delete - permanently removes from database
Response
Whether the operation succeeded
The ID of the forgotten memory
Whether the memory was permanently deleted
Examples
Soft delete (default)
is_deleted=true) but remains in the database. It will not appear in search results.
Hard delete
Soft delete vs hard delete
Soft delete
- Sets
is_deleted=trueflag - Keeps data in database
- Hidden from search
- Can be recovered
- Used by scheduled maintenance
Hard delete
- Removes from database
- Permanent and irreversible
- Frees up storage
- Cannot be recovered
- Use with caution
When to use each
Soft delete (default) is recommended for:- Cleaning up outdated or incorrect memories
- Removing temporary context
- Letting scheduled maintenance handle final deletion
- Keeping audit trail
- Removing sensitive information
- Freeing up storage immediately
- Cleaning up test data
- When you’re certain the memory won’t be needed
Scheduled cleanup
The Re-indexing maintenance job runs monthly and:- Hard deletes all soft-deleted memories older than 30 days
- Archives stale memories (not accessed in 90 days)
Error responses
Error message if the request fails
400- Bad request (missing memory_id)401- Unauthorized (invalid or missing API key)404- Memory not found or access denied500- Internal server error
CLI equivalent
Related endpoints
- Get memory - Verify memory before deleting
- List memories - Find memories to delete
- Update memory - Modify instead of deleting