Skip to main content

delete_memory

Method
This is a method of the Memory class in the memory module.
Delete a specific memory by ID. This is the unified deletion method that searches across all memory types and all backends (SQLite, ChromaDB, Mem0, MongoDB). Particularly useful for:
  • Cleaning up image-based memories after processing to free context window
  • Removing outdated or incorrect information
  • Privacy compliance (selective erasure)

Signature

Parameters

str
required
The unique ID of the memory to delete
Optional
Optional type hint to narrow search: ‘short_term’, ‘long_term’ If None, searches all types.

Returns

bool
True if memory was found and deleted, False otherwise

Usage

Uses

  • delete_short_term
  • delete_long_term

Used By

Source

View on GitHub

praisonaiagents/memory/memory.py at line 1172

Memory Concept

Memory Overview

Memory Configuration

Session Resume