Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gentleman-Programming/engram/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Delete an observation by ID. Supports both soft delete (default, marks as deleted but keeps data) and hard delete (permanent removal).Parameters
Observation ID to deleteGet the ID from:
mem_searchresultsmem_get_observationresponsemem_timelineresults- TUI observation view
42If
true, permanently deletes the observationDefault: false (soft delete)- Soft delete: Sets
deleted_attimestamp, observation remains in database but excluded from search/context - Hard delete: Permanently removes the row from the database
Response
Confirmation message indicating deletion mode
Usage Examples
Soft Delete (Default)
mem_searchresultsmem_contextresultsmem_timelineresults- TUI views (unless “show deleted” is enabled)
Hard Delete
When to Use
Soft Delete
Soft Delete
Use soft delete when:
- Removing test data
- Hiding observations without losing history
- Cleaning up noise from search results
- Temporarily excluding data (reversible)
- Reversible — can restore by clearing
deleted_at - Maintains audit trail
- Safer for accidental deletions
Hard Delete
Hard Delete
Use hard delete when:
- Removing sensitive data that must be purged
- Database cleanup to reduce size
- Permanently removing incorrect data
- GDPR or data retention compliance
- Actually removes data from disk
- Reduces database size
- Ensures data is gone
- Irreversible
- No audit trail
What Happens on Delete
Soft Delete
- Sets
deleted_attimestamp to current time - Observation remains in
observationstable - Excluded from:
- Search queries (
WHERE deleted_at IS NULL) - Context queries
- Timeline results
- Default TUI views
- Search queries (
- Can be shown with “show deleted” filter in TUI
- Database size unchanged
Hard Delete
- Row is permanently removed via
DELETE FROM observations WHERE id = ? - FTS5 index entry is removed
- No way to restore
- Database size reduced (after
VACUUM)
Validation
ID must exist
ID must exist
Soft delete is idempotent
Soft delete is idempotent
Soft-deleting an already soft-deleted observation succeeds (updates
deleted_at timestamp).Hard delete is idempotent
Hard delete is idempotent
Hard-deleting a non-existent observation fails with “observation not found”.
Bulk Deletion
For bulk deletion (not available via MCP), use the CLI or HTTP API:- CLI
- HTTP API
Restoring Soft-Deleted Observations
Soft-deleted observations can be restored manually:There’s no MCP tool for restoring deleted observations — use the SQLite CLI or a database browser.
Privacy Considerations
For GDPR compliance or data purging:- Hard delete the observation
- Run
VACUUMon the database to reclaim space:
Database Size Management
After hard deletes, reclaim disk space:Related Tools
mem_update- Update observations instead of deletingmem_search- Find observations to deletemem_get_observation- View observation before deleting