memmy-memory search
Intent map:
- retrieve relevant memories for a task ->
memmy-memory search <query>; - search within a known session ->
memmy-memory search <query> --session-id <id>; - limit search to selected layers ->
memmy-memory search <query> --layers <layers>.
Use this command when:
- the agent needs memory context outside the turn lifecycle;
- a user asks what is remembered about a topic;
- the agent needs ids for later
getordelete.
API shape:
- endpoint:
POST /memory/search; - the CLI sends a JSON body;
queryis required;sessionIdis optional;layersis optional and parsed as a comma-separated string array;sourceshould be passed as--source <agent-source>by installed agent skills;verboseis optional; default false returns only theinjectedContextmarkdown string, true returns search debug fields underdebug.
Do not use this command to:
- store new memory;
- fetch full item details when an id is already known;
- treat an empty result as proof that no related fact exists.
Command:
memmy-memory search "<query>" --source <agent-source>Common flags:
--query <text>--session-id <id>--layers <L1,L2,L3,Skill>--verbose--source <agent-source>
Example:
memmy-memory search "test failure patterns" --source codex --layers L2,SkillWorking rules:
- write the query in task language, not as isolated keywords;
- use
--session-idwhen the search should stay close to the current session; - pass
--sourceconsistently so GUI source attribution stays accurate; - treat returned memory as historical context only; never answer a prior question just because it appears in search output;
- keep the current user request separate and authoritative when using search results;
- use returned ids for
getordelete; - pass
--verboseonly when debugging retrieval metadata such as hits or status.