Get the FREE Ultimate OpenClaw Setup Guide β†’

memory-recall

npx machina-cli add skill zilliztech/memsearch/memory-recall --openclaw
Files (1)
SKILL.md
1.9 KB

You are a memory retrieval agent for memsearch. Your job is to search past memories and return the most relevant context to the main conversation.

Project Collection

Collection: !bash ${CLAUDE_PLUGIN_ROOT}/scripts/derive-collection.sh

Your Task

Search for memories relevant to: $ARGUMENTS

Steps

  1. Search: Run memsearch search "<query>" --top-k 5 --json-output --collection <collection name above> to find relevant chunks.

    • If memsearch is not found, try uvx memsearch instead.
    • Choose a search query that captures the core intent of the user's question.
  2. Evaluate: Look at the search results. Skip chunks that are clearly irrelevant or too generic.

  3. Expand: For each relevant result, run memsearch expand <chunk_hash> --collection <collection name above> to get the full markdown section with surrounding context.

  4. Deep drill (optional): If an expanded chunk contains transcript anchors (JSONL path + turn UUID), and the original conversation seems critical, run:

    memsearch transcript <jsonl_path> --turn <uuid> --context 3
    

    to retrieve the original conversation turns.

  5. Return results: Output a curated summary of the most relevant memories. Be concise β€” only include information that is genuinely useful for the user's current question.

Output Format

Organize by relevance. For each memory include:

  • The key information (decisions, patterns, solutions, context)
  • Source reference (file name, date) for traceability

If nothing relevant is found, simply say "No relevant memories found."

Source

git clone https://github.com/zilliztech/memsearch/blob/main/ccplugin/skills/memory-recall/SKILL.mdView on GitHub

Overview

memory-recall is a memsearch-based memory retrieval agent. It searches past memories to surface historical context, past decisions, debugging notes, and prior conversations that inform the current question. It returns concise, relevant chunks with source references to help you reconnect with project knowledge.

How This Skill Works

Technically, it runs memsearch search with a user query using top-k 5 and JSON output for a specified collection. It evaluates results for relevance, expands each relevant chunk with memsearch expand to fetch full context, and optionally uses memsearch transcript for deeper turns if needed. The final output is a curated, traceable summary of memories.

When to Use It

  • You need historical context from earlier sessions to answer the current question.
  • You require debugging notes or patch history to diagnose a bug.
  • You need design decisions or project knowledge stored in memories.
  • You see a [memsearch] Memory available hint and want to fetch related context.
  • You want to maintain continuity by revisiting prior conversations before proceeding.

Quick Start

  1. Step 1: Run memsearch search "<query>" --top-k 5 --json-output --collection <collection> (or uvx memsearch if not found).
  2. Step 2: Evaluate the results and skip clearly irrelevant chunks; identify the most relevant ones.
  3. Step 3: Run memsearch expand <chunk_hash> --collection <collection> for each relevant chunk, then return a concise summary with sources.

Best Practices

  • Craft a precise query that captures the core intent of what you’re seeking.
  • Prefer top-k 5 to balance relevance and performance.
  • Evaluate results for relevance before expanding any chunks.
  • Expand only the most relevant chunks to avoid noise and overload.
  • Always include source references for traceability so you can verify context.

Example Use Cases

  • Recall decision rationale for a feature X from past sessions to justify current design choices.
  • Retrieve debugging notes and patch history for bug Y to reproduce and fix the issue.
  • Revisit architecture notes from a previous sprint to align on a design direction.
  • Pull prior conversations to maintain continuity in a long-running task across sessions.
  • Trigger memory recall when the chat shows [memsearch] Memory available hints to surface related context.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers β†—