Deletes memories by search query or memory ID with confirmation before removal. Use when removing outdated information, incorrect memories, sensitive data, or c
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-forget-160a7f747fe1 ,按照其中的说明把「forget」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Delete specific memories from Mem0.
The user provides either:
/mem0-forget travel plans/mem0-forget <memory_id>If no argument, ask: "What should I forget? Provide a search query or memory ID."
If memory ID provided (looks like a UUID or hex string):
mem0_memory tool with action="search" and the ID as query, or look it up directly.Found: "<memory content first 120 chars>" (created <date>)If search query provided:
mem0_memory tool with action="search", query=<user's query>.Found <N> memories matching "<query>":
1. <content, 120 chars> [<category>] [ID: <short_id>]
2. ...
Ask: "Delete which memories? Enter numbers (e.g., 1,3,5), 'all', or 'cancel'."
For a single memory ID, ask: "Delete this memory? [y/N]"
Never delete without confirmation. This is destructive.
For each confirmed memory, use mem0_memory tool with action="delete" and the memory ID.
Deleted <N> memories.
If any deletions failed, report which ones and why.