Agent skill
search-memory
Search your knowledge base when past decisions, preferences, or procedures would improve the response. Covers memories from every AI tool you use.
Install this agent skill to your Project
npx add-skill https://github.com/nowledge-co/community/tree/main/nowledge-mem-pi-package/skills/search-memory
SKILL.md
Search Memory
When to Search
Strong signals:
- References prior work: "the approach we used", "like last time"
- Resumes a named feature, project, or migration
- Review, regression, release, docs-alignment, or integration-behavior task
- Debugging resembles a past fix or known root cause
- Asks for rationale: "why did we choose X?"
- Recurring theme discussed in earlier sessions
Contextual signals:
- Complex debugging (may match past root causes)
- Architecture discussion (choices may be documented)
- Domain-specific question (conventions likely stored)
- User mentions a timeframe: "last week", "back in January"
Skip when:
- Fundamentally new topic with no prior context
- Generic syntax or language questions
- User explicitly requests a fresh perspective
Retrieval Routing
1. Search memories (distilled knowledge)
nmem --json m search "3-7 word semantic query"
If the runtime already knows the active project or agent lane, add --space "<space name>".
2. Search threads (past conversations)
When the user asks about a prior session, discussion, or exact exchange:
nmem --json t search "query" --limit 5
3. Progressive thread inspection
If a thread looks relevant, load it incrementally:
nmem --json t show <thread_id> --limit 8 --offset 0 --content-limit 1200
Increase --offset only when more messages are actually needed.
For continuation-heavy engineering work, search near the start of the task rather than waiting for an explicit recall request.
Key Flags
| Flag | Purpose |
|---|---|
--mode deep |
Conceptual or weak first-pass results |
-l label |
Filter by label (multiple uses AND logic) |
-n limit |
Limit number of results (default: 10) |
--importance MIN |
Minimum importance score (0.0-1.0) |
--time RANGE |
Time filter: today, week, month, year |
Examples
# Semantic search with importance filter
nmem --json m search "database optimization" --importance 0.7
# Filter by labels
nmem --json m search "React patterns" -l frontend -l react
# Recent memories only
nmem --json m search "deployment fix" --time week -n 5
# Deep mode for conceptual queries
nmem --json m search "auth architecture rationale" --mode deep
Interpreting Results
Scores: 0.6-1.0 direct match. 0.3-0.6 related. Below 0.3, skip.
Found: Synthesize and cite when helpful. None: State clearly. Suggest distilling if the current discussion is valuable.
When NOT to Search
Do not search for every message. Search when there is a reasonable expectation that prior knowledge exists and would improve the response. One well-targeted search is better than three speculative ones.
Links
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
search-memory
Search your personal knowledge base when past insights would improve response. Recognize when stored breakthroughs, decisions, or solutions are relevant. Search proactively based on context, not just explicit requests.
check-integration
Check Nowledge Mem setup, detect your agent, and guide native plugin installation. Use when the user asks about setup, configuration, or when memory tools aren't working as expected.
distill-memory
Capture breakthrough moments and valuable insights as searchable memories in your knowledge base.
read-working-memory
Read your daily Working Memory briefing to understand current context. Contains active focus areas, priorities, unresolved flags, and recent knowledge changes. Load this automatically at the beginning of sessions for cross-tool continuity.
status
Check Nowledge Mem connection status, server version, CLI version, and configuration. Use when diagnosing issues or verifying setup.
save-handoff
Save a concise handoff summary only when the user explicitly requests it. Use this for resumable progress notes in generic agent environments where a real session importer is not guaranteed.
Didn't find tool you were looking for?