Delete Long Term • AI Agent SDK

delete_long_term: Delete a specific long-term memory by ID.

delete_long_term

Method

</div>

This is a method of the Memory class in the memory module.

Delete a specific long-term memory by ID.

Works across all backends: SQLite, ChromaDB, Mem0, and MongoDB.

Signature

python
def delete_long_term(memory_id: str) -> bool

Parameters

ParamField str

The unique ID of the memory to delete

Returns

ResponseField bool

True if memory was found and deleted, False otherwise

Uses

  • delete_memory
  • conn.execute
  • conn.commit
  • delete
  • delete_one

Used By

Source

View on GitHub

praisonaiagents/memory/memory.py at line 1528