Skip to content

Search & MCP tools

Terminal window
agent-mem search "subtract import"
agent-mem search "what did we decide about the database last week"
agent-mem search "rate limit" --all-projects --limit 20
agent-mem search calc --json

Searches by words, by meaning (with the [semantic] extra) and through the graph of files and commands, from the current folder’s project (and the projects nested in it or around it). Then:

Terminal window
agent-mem show T1 M2 # the full entries
agent-mem view # the browser page

agent-mem setup … --write registers the MCP server with every agent. The agent is told to search first, open only what it needs, treat recalled text as data, and cite ids.

ToolUse it toExample
mem_search(query, limit=8, all_projects=false)find ids and one-line titlesmem_search("why did we drop postgres")
mem_timeline(id, before=3, after=3)see what happened before and after a request in its sessionmem_timeline("T41")
mem_get(ids)read up to 10 entries in full, with provenance and file statemem_get(["T41", "M7"])
mem_remember(text, kind, title, supersedes, global_scope)store a fact, decision, failed attempt or lesson explicitlymem_remember("Deploys go through make release", kind="decision")
mem_forget(id)delete a request or memory of this projectmem_forget("M7")
T1 · 2026-10-13 · claude · score 0.65
Add a subtract function to calc.py and run the tests
M2 · 2026-10-13 · decision · score 0.73
calc.py must stay free of third-party imports; tests run with `uv run pytest -q`.
Use mem_get with ids for details, mem_timeline for context.

What agents cannot do:

  • store a preference (preferences come only from what you type);
  • replace or delete your memories, or memories of another project;
  • see weak matches as confident ones: mem_search says “No confident match” and lists them separately.

Every tool the agent uses teaches agent-mem something: opening a memory or citing its id counts as used and ranks it higher next time. See Learning & Ranking.