Open source · MIT · zero dependencies

Memory your agents call as a tool

Mnemo indexes every Claude Code, Codex, OpenCode and Pi session on your machines. Any agent can look up what another already worked out, on this laptop or a box three hops away, and read only as much as it needs.

$curl -fsSL https://szupzj18.github.io/mnemo/install.sh | sh
Get started
claude code · laptop
you    ▸ sglang OOMs on the GPU box again. What did we change last time?

claude ▸ search_sessions("sglang oom")
           3 hits · codex · devbox-a/gpu-box · Sep 22
                    claude · local · Sep 18

claude ▸ get_context(hit 1, host="devbox-a/gpu-box")
           --mem-fraction-static 0.88 → 0.80
           "OOM gone at batch 64; throughput −3%"

claude ▸ Codex lowered --mem-fraction-static to 0.80 on gpu-box on Sep 22
         (reached through devbox-a). Your launch script still says 0.88.
         Want me to apply the same change?
Claude Code · MCP server + skillCodex · MCP serverPi · extensionOpenCode · MCP serverAny MCP client · stdio JSON-RPCScripts · mnemo search --json
Demo

Two agents, two machines, one search.

An agent asks what another agent already did, on another device. The answer comes back ranked, with the agent, device and date attached.

Retrieval efficiency

Less digging, same answers.

Grep hands an agent gigabytes of unranked JSON to narrow down. Mnemo hands it the few messages that matter, ranked, with the agent, device and time attached.

grep over raw logs
$ grep -r "<common term>" ~/.claude ~/.codex ~/.pi
{"type":"assistant","message":{"content":[{"type":"tool_use","id":"toolu_01H…
{"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_0…
{"timestamp":"2026-09-12T03:14:07.992Z","type":"response_item","payload":{"t…
{"type":"assistant","message":{"id":"msg_01","content":[{"type":"text","tex…
{"parentUuid":"4be1…","isSidechain":false,"userType":"external","cwd":"/ho…
{"type":"user","message":{"role":"user","content":"<system-reminder>\nAs y…
{"type":"assistant","message":{"content":[{"type":"tool_use","id":"toolu_01H…
{"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_0…
{"timestamp":"2026-09-12T03:14:07.992Z","type":"response_item","payload":{"t…
{"type":"assistant","message":{"id":"msg_01","content":[{"type":"text","tex…
{"parentUuid":"4be1…","isSidechain":false,"userType":"external","cwd":"/ho…
{"type":"user","message":{"role":"user","content":"<system-reminder>\nAs y…
4.35 s
scan
1,541 MB
output
16,548
lines, unranked
mnemo
$ mnemo search "<common term>"
1. codex · devbox-b · Sep 26
clamp the delay after adding jitter so retry never exceeds the cap
2. claude · local · Sep 24
retry budget: 5 attempts, exponential backoff from 200 ms
3. pi · devbox-a · Sep 19
flaky retry test: seed the jitter in CI
<100 ms
search
~3,200
tokens, top 20
ranked
BM25 + RRF

One common English term over 729 real session files (3.6 GB of logs), measured 2026-09-24.

Fresh agents answered four real “what did we do back then” questions; both groups got every answer right.
Tokens−23%
mnemo
259k
grep
336k
Tool calls−52%
mnemo
44
grep
91
Wall time−40%
mnemo
14 min
grep
23 min
<100 ms
search, CLI end to end
12 ms
context in a 27k-message session
0.1 s
incremental sync when idle
~3,800
tokens for a top-20 result
Methodology and caveats (n = 4 tasks)
Agent native

Built to be called by agents, not read by people.

Snippets first, full text on demand: the agent stops reading as soon as it has the answer.

  1. 1
    search_sessionsWhere is it?

    Ranked hits: agent, device route, directory, time and a marked snippet.

  2. 2
    get_contextWhat happened?

    The messages around a hit, read on the device that holds it.

  3. 3
    get_sessionWalk me through it

    The whole session, or just its head or tail.

  4. 4
    list_recent_sessionsWhat was I doing?

    Recent sessions titled by their first real prompt, no keyword needed.

$mnemo setup

Registers the MCP server for Claude Code, Codex and OpenCode, links the Claude Code skill and the Pi extension. Anything already configured is left alone. The tool schemas cost about 500 tokens per session.

$mnemo search "sglang oom" --json

The same search from scripts and any other tool, as JSON.

Multi-level topology

Every machine your agents touch, even the ones you can’t reach.

Each device indexes only its own sessions. A search is a message that travels the links you already have, through relays to boxes behind them, and comes back as one ranked list.

laptopyou are heredevbox-aforwardsrelaymac-minidirect linkgpu-boxvia devbox-adevbox-bvia devbox-a
devbox-a/devbox-bcodexclamp the delay after adding jitter
devbox-a/gpu-boxcodex--mem-fraction-static 0.88 → 0.80
mac-miniclauderetry budget: 5 attempts from 200 ms
Direct links and relays
Each device lists only its neighbors. Turn on forwarding on a device and searches pass through it to the devices behind it.
Routes you can follow
Every hit carries its route, like devbox-a/devbox-b. Pass it back and reads travel the same path.
Loop-free, deduplicated
Stable node ids and a hop budget stop cycles; a device reached twice is reported once, via the shortest route.
Nothing central
No server, no shared store. Queries and the messages you ask for travel; indexes and raw logs stay on their device.
Kept in step
Upgrade one machine and it brings every reachable device to the same code, relays included.
mnemo remote add devbox-a ssh devbox-a mnemo node --forward on
Dashboard

A window for you, too.

mnemo dashboard opens a local UI: the same search across devices, full sessions on a timeline, and a map of every device a search can reach.

Session view with a timeline rail and tool-call durations
Topology view: the laptop reaches devbox-b through devbox-a
Get started

One command.

Installs mnemo, builds the index and connects every agent it finds. Run it again to upgrade this machine and every device behind it.

$curl -fsSL https://szupzj18.github.io/mnemo/install.sh | sh
  • Checks Python 3.7+ and SQLite FTS5, clones to ~/mnemo, links mnemo into ~/.local/bin.
  • Runs mnemo setup: registers the MCP server for Claude Code, Codex and OpenCode, links the skill and the Pi extension.
  • On re-run: pulls, then mnemo upgrade backs up and rebuilds the index and updates devices running older code.
Prefer a Python tool manager?
$uv tool install mnemo-search && mnemo setup
Or connect agents by hand
Register the MCP server
$claude mcp add --scope user mnemo -- mnemo mcp
Teach it when to look back (skill)
$ln -s ~/mnemo/integrations/skills/mnemo ~/.claude/skills/mnemo