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 從公開儲存庫中收錄這些內容。

檢舉或申請下架