Distill Memory

nowledge-co/community/nowledge-mem-openhands-plugin/skills/distill-memory

作者 nowledge-co1f4d7eb61466dbfc93ce8d7a0a806c4d4a196dd0无许可证收录于 2026年10月9日更新于 2026年10月9日

Capture breakthrough moments, architecture decisions, and valuable insights as searchable memories in Nowledge Mem.

AI 生成的概览

通过 MCP 或 CLI 将持久决策、流程和洞见保存为 Nowledge Mem 中可搜索的记忆。

功能
引导智能体主动将持久事实、偏好、决策、计划、流程和经验保存为 Nowledge Mem 中的记忆。它提供用于添加记忆和关联相关记忆的 MCP 调用,以及用于添加和更新记忆的 CLI 命令。它还说明何时不应保存,以及如何在新增记忆和更新已有记忆之间选择。
适用场景
当对话产生持久决策、可重复流程、调试经验、架构约束或未来会话需要保留的计划时使用。它用于主动记录,而不是等待被要求。
运行要求
需要通过其 MCP 工具(memory_add、memory_relation_add、memory_update、memory_supersede)或 nmem CLI 访问 Nowledge Mem。不附带脚本,仅为说明。

Distill Memory

Save proactively when the conversation produces a durable fact, preference, decision, plan, procedure, learning, event, or important context. Do not wait to be asked.

When to Save

Good candidates include:

  • decisions with rationale ("we chose SQLite with WAL mode because concurrent reader throughput is required")
  • repeatable procedures or multi-step deployment workflows
  • lessons from debugging, incidents, or root cause analysis
  • durable user preferences, style guidelines, or architecture constraints
  • plans that future OpenHands sessions or worker agents will need to resume cleanly
  • important context that would otherwise be lost when the agent session terminates

Skip routine fixes with no generalizable lesson, temporary work in progress, simple Q&A answerable directly from docs, and generic facts already widely known.

Usage

Via MCP (Preferred)

Add a new memory:

json
memory_add({  "content": "In OpenHands orchestrations, specialist worker nodes should pass NMEM_AGENT_ID to maintain identity-aware memory tracking.",  "labels": ["openhands", "architecture", "multi-agent"]})

Link related memories:

json
memory_relation_add({  "source_id": "<memory-1-id>",  "target_id": "<memory-2-id>",  "relation_type": "depends_on"})

Via CLI

Add new memory:

bash
nmem --json m add "Decision: use WAL mode for SQLite" --label architecture --label database

Update an existing memory:

bash
nmem --json m update <memory-id> --content "Updated rationale: ..."

Distill vs Update

  • Use memory_add (nmem m add) when the insight is genuinely new.
  • Use memory_update / memory_supersede (nmem m update) when refining, correcting, or replacing an existing memory.
  • Prefer adding meaningful labels (architecture, decision, openhands, convention) to assist subsequent graph discovery.

来源与署名

来源:nowledge-co/community位于nowledge-mem-openhands-plugin/skills/distill-memory提交1f4d7eb

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架