跳到正文
Skillpedia
智能体30k · #9347

forget

它能做什么

这项技能从 agentmemory 中移除选定的记忆。它会先向你显示匹配项,只删除你确认的那些。

适用场景

  • ✓当你想从 agentmemory 中删除某条已保存的记忆时。
  • ✓当你出于隐私原因想移除敏感信息时。
  • ✓当你想删除某条已不再正确的旧笔记时。

技能链接

https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/forget/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/forget/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Search with memory_smart_search, the user's text as query, targetLayer: "memory", limit: 20, and the requested project/agent scope. These are selected relevance matches, not an exhaustive inventory.
  2. 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".
  3. On confirmation, call memory_governance_delete with memoryIds as a comma-separated string and optional reason (default plugin skill request).
  4. 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.
  5. Lessons are separate: delete one with memory_lesson_delete and its lessonId; memory_governance_delete does not touch lessons.
  6. Check deleted, notFound, and failed in 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.
  • memoryIds holds real ids from the search, never a bare sessionId.
  • 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能