forget
它能做什么
这项技能从 agentmemory 中移除选定的记忆。它会先向你显示匹配项,只删除你确认的那些。
适用场景
- ✓当你想从 agentmemory 中删除某条已保存的记忆时。
- ✓当你出于隐私原因想移除敏感信息时。
- ✓当你想删除某条已不再正确的旧笔记时。
技能链接
https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/forget/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请删除我保存旧 API 密钥的那条笔记,但先给我看匹配项,让我确认。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会搜索匹配的记忆,并列出它们的 ID 和范围,同时隐藏敏感值。在你确认之后,它只会删除你批准的记忆 ID。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
The user wants to remove data from agentmemory: $ARGUMENTS
Quick start
memory_smart_search { "query": "old api key in config", "targetLayer": "memory", "limit": 20 }
Show the matches, get a yes, then:
memory_governance_delete { "memoryIds": "abc12345,def67890", "reason": "user privacy request" }
Expected output:
Found 2 matching memories. Confirmed. Deleted 2 memories.
Why
This is destructive and irreversible. Show exactly what will be deleted and get an explicit yes before calling delete. Delete by memory ID, never a bare session.
Workflow
- Search with
memory_smart_search, the user's text asquery,targetLayer: "memory",limit: 20, and the requested project/agent scope. These are selected relevance matches, not an exhaustive inventory. - Show what matched: memory ids, titles, and scope. Redact secret values. Ask for explicit confirmation. Do not proceed on silence or a vague "sure, whatever".
- On confirmation, call
memory_governance_deletewithmemoryIdsas a comma-separated string and optionalreason(defaultplugin skill request). - Observation or whole-session erasure is not supported by this operation.
Explain that limit before proceeding; never label selected memory deletion
as a complete session wipe. Do not pass observation IDs or a
sessionId. - Lessons are separate: delete one with
memory_lesson_deleteand itslessonId;memory_governance_deletedoes not touch lessons. - Check
deleted,notFound, andfailedin the response. Report actual deletions and unresolved IDs separately. Recheck the selected IDs before retrying a failed request; an interrupted response may hide a completed write.
Anti-patterns
WRONG: search returns matches, you immediately call memory_governance_delete
without showing them or waiting for a yes.
RIGHT: list the matches, ask "Delete these 2? (yes/no)", and only delete after an explicit yes.
Checklist
- Matches were shown to the user before any delete.
- An explicit yes was received, not assumed.
memoryIdsholds real ids from the search, never a baresessionId.- Final message states the actual count deleted.
See also
remember: the write side; forget is its undo.recall: find the exact memory id before deleting.
Troubleshooting
See TROUBLESHOOTING.md if memory_smart_search or memory_governance_delete is not available.
常见问题
删除可以撤销吗?
不可以。删除是永久性的,因此智能体会先要求你明确确认。
它能删除整个会话吗?
不能。这里不支持按整个会话或按观察内容删除,只会移除选定的记忆。
已保存的经验教训怎么办?
经验教训与记忆分开处理。
详情
作者的原始描述
Delete selected durable memories from agentmemory after showing them and getting explicit confirmation. Use when the user says "forget this", "delete memory", "remove that note", or wants to scrub specific data for privacy.
repo: rohitg00/agentmemory
热度
- GitHub 星标
- 30k
- 排名
- #9347
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agentmemory-agents
30k帮你的智能体把 agentmemory 记忆服务器连接到 Claude Code、Cursor 和 Codex 等编程工具。
agentmemory-architecture
30k解释 agentmemory 如何为编程智能体存储、搜索和管理记忆,从记录到回忆的整个过程。
agentmemory-config
30k帮你的智能体设置并检查 agentmemory 记忆服务器,包括端口、配置和功能开关。
agentmemory-hooks
30k帮你的智能体自动从编程会话中记录有用的笔记,而不需要你逐条手动保存。