Search your memory

weavekeep search searches memory from the terminal, the same way your agent does with its recall tool. weavekeep recent lists recent sessions.

Terminal
weavekeep search cart rounding
Decisions and facts
  Cart totals round half-even                                          2h ago  4c9e21aa

Sessions
  2h ago           claude  you    the rounding in total.ts is off again        cb0c83ea
  yesterday 17:40  claude  agent  Fixed the cart total rounding bug in src/c…  a4f7eebe
  yesterday 17:38  claude  tool   Edit: {"file_path":"/home/you/projects/sho…  6c006a36

Results come in two groups, each best match first:

  • Decisions and facts: the text, when it was saved, and its short id.
  • Sessions: when, which agent, who it came from, the text, and its short id. "Who" is you (your prompt), agent (a reply), tool (a tool call or result), note (something saved with remember) or summary (a compaction summary).

By default, search looks in the project you are in, plus memory saved for every project. Inside a git repository, the project is the repository, even from a subfolder. Before it searches, it reads in any edits you made to that project's memory files.

When nothing matches, it says so and suggests --all.

Recent sessions

Terminal
weavekeep recent
Recent sessions in ~/projects/shop
  2h ago           claude  the rounding in total.ts is off again                 12 events  9c1d0e47
  yesterday 17:40  claude  fix the cart total rounding bug in src/cart/total.ts  48 events  7b20aa31

Sessions are listed by when they were last active, newest first. Each line shows the agent, the first prompt, how many events were recorded, and the session's short id. With --all, a project column is added. Notes you saved with remember are not a session, so they are not listed here; they show up in search.

Options

Both commands take the same options:

OptionWhat it doesDefault
--project <path>Look in this projectThe current folder
--allLook in every project. Cannot be combined with --projectOff
--limit <n>How many results10. Up to 50 for search, 200 for recent
--jsonPrint JSON instead of a tableOff
Terminal
weavekeep search "src/cart/total.ts" --limit 20
weavekeep recent --all --limit 20
weavekeep search stripe --json

--json prints full ids, full paths and ISO timestamps, so it is the right choice for scripts. Search results have "type": "fact" or "type": "event", and a corrections list appears when a typo was corrected. recent prints an array of sessions.

Short ids

Every item has a full id, like 01a1600e-1053-70e4-8e88-452e43d63996. Tables show the last 8 characters, 43d63996. Commands that take an id, such as weavekeep forget, accept the short id or the full one. If a short id ever matches more than one item, Weavekeep lists them and asks for more of the id.

What a search matches

Search is keyword search on your machine. With semantic search (on by default), it also finds memory by meaning; the rules below are for the keyword part, which always runs.

  • Any of your words. Every word you type is searched. An item that contains more of your words ranks higher, and a rare word counts for more than a common one: a file name, an identifier, a ticket number, or a word only a few items contain. Words that most items contain, like "the", "yes" or your project's name, count for almost nothing. Among equally good matches, newer items come first.
  • Short items say more. The same words in a short decision rank higher than in a long log or file.
  • Decisions and sessions together. The best decisions and facts and the best session items are mixed into one ranking; search then shows them in their two groups.
  • The matching part. For the agent's recall tool, each session item shows the part of its text that matches your words, not just its beginning.
  • Word beginnings. Words of 3 or more characters also match longer words: round finds rounding. Simple word forms match too.
  • Case does not matter.
  • Small typos are corrected. A word your agent has never written, like elevnlabs or voise, is also searched as the closest word it has written, elevenlabs or voice. Your words are still searched as you typed them. search lists the added words on its last line, Also searched for: elevenlabs, voice. Very short words, words with digits, and mistakes in the first letter are not corrected.
  • File names and paths. src/cart/total.ts is found by src/cart/total.ts, total.ts, cart or total.
  • Identifier parts. Parts separated by _, -, . or / match on their own: user_id is found by user and by id. Parts of camelCase names are not split.
  • Words made only of punctuation are ignored. At most 32 words are used.

For a very large item, such as a long tool result, only the first 1,024 characters are searched.

Short, concrete words work best: a file name, a function name, part of an error message.

On this page