Distill Memory

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

by nowledge-co1f4d7eb61466dbfc93ce8d7a0a806c4d4a196dd0No licenseListed Oct 9, 2026Updated Oct 9, 2026

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

AI-generated overview

Captures durable decisions, procedures, and insights as searchable memories in Nowledge Mem via MCP or CLI.

What it does
Guides an agent to proactively save durable facts, preferences, decisions, plans, procedures, and lessons as memories in Nowledge Mem. It provides MCP calls for adding memories and linking related memories, plus CLI commands for adding and updating memories. It also explains when to skip saving and how to choose between adding a new memory and updating an existing one.
When to use it
Use when a conversation produces a durable decision, repeatable procedure, debugging lesson, architecture constraint, or plan that future sessions should retain. It is meant for proactive capture rather than waiting to be asked.
Requirements
Requires access to Nowledge Mem through its MCP tools (memory_add, memory_relation_add, memory_update, memory_supersede) or the nmem CLI. Ships no scripts; instructions only.

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.

Source and attribution

Source:nowledge-co/communityinnowledge-mem-openhands-plugin/skills/distill-memoryat commit1f4d7eb

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal