mem0-forget

Deletes mem0 memories by search query or memory ID with confirmation prompts.

64.5k|7.6k|Updated Jun 20, 2023
One-click install
npx skills add https://github.com/mem0ai/mem0 --skill mem0-forget
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mem0-forget
Source: https://github.com/mem0ai/mem0/tree/main/integrations/mem0-plugin/.opencode-plugin/opencode-skills/mem0-forget
Command: npx skills add https://github.com/mem0ai/mem0 --skill mem0-forget

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Removing outdated, incorrect, or sensitive memories from a mem0 memory store requires careful lookup and confirmation to avoid accidental data loss, which this Skill handles through a guided deletion workflow.

Core Features & Use Cases

  • Query-Based Deletion: Search memories by natural language query, review a numbered list of matches, and select which entries to delete.
  • Direct ID Deletion: Delete a specific memory by its ID after verifying its content and creation date.
  • Session Undo: Undo recently added memories from the current session using the MEM0_SESSION_ID environment variable filter.
  • Use Case: After an experiment stores incorrect architectural decisions in mem0, run a search for the relevant topic, review the matched memories, confirm the selection, and remove only the wrong entries.

Quick Start

Ask the assistant to forget memories about a specific topic, for example by saying: forget the memories about the auth module decisions.

Frequently Asked Questions about mem0-forget

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delete memories from mem0 by search query?▼

Provide a search query describing the memories to remove. The skill calls search_memories with your user and app filters, shows a numbered list of matches with content previews, and deletes only the entries you confirm by number.

How do I undo recently added memories in mem0?▼

Say undo last N memories or undo last write. The skill reads the MEM0_SESSION_ID environment variable, searches memories tagged with that session ID, sorts them by creation time, and deletes the confirmed entries.

Does mem0 deletion require confirmation before removing memories?▼

Yes, deletion always requires explicit confirmation. For search results you enter item numbers, all, or cancel; for a single memory ID you confirm with y or N. The skill never deletes without this step because the operation is destructive.

What happens if MEM0_SESSION_ID is not set when undoing memories?▼

The undo feature cannot find session-scoped memories without MEM0_SESSION_ID. The skill informs you that no recent memory IDs are tracked and suggests browsing recent memories or searching by query instead.

Can I delete a mem0 memory directly by its ID?▼

Yes, pass the memory ID as the argument. The skill verifies the memory exists with get_memory, shows a content preview and creation date, then asks for confirmation before calling delete_memory.