search

Installation
SKILL.md

Search memories

Call search_memories with the user's question. Treat --top-k, --category, --scope, and --run-id as tool arguments instead of including them in the query.

Omit top_k to use Mem0's configured default. Omit category to search every category; a category is a best-effort label Mem0 assigned when it saved the memory, so if a category search misses, repeat it without the category. Omit scope to use the configured default, normally repo: this repository's shared memory, which everyone who works in it contributes to, plus your own preferences.

Pass scope when the question needs something else: dir to narrow the shared memory to the directory you are working in (a package inside a monorepo), mine for your own preferences alone. Pass run_id with a Claude Code session ID to look at what one earlier session recorded, for example to pick up where a compacted or closed session left off. Return the tool's result directly.

Installs
14
Repository
mem0ai/mem0
GitHub Stars
64.8K
First Seen
Jun 12, 2026
search — mem0ai/mem0