mnemo-search 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mnemo_search-0.3.0/LICENSE +21 -0
- mnemo_search-0.3.0/PKG-INFO +293 -0
- mnemo_search-0.3.0/README.md +276 -0
- mnemo_search-0.3.0/mnemo/__init__.py +1 -0
- mnemo_search-0.3.0/mnemo/__main__.py +4 -0
- mnemo_search-0.3.0/mnemo/cli.py +783 -0
- mnemo_search-0.3.0/mnemo/dashboard.py +395 -0
- mnemo_search-0.3.0/mnemo/fingerprint.py +39 -0
- mnemo_search-0.3.0/mnemo/index.py +304 -0
- mnemo_search-0.3.0/mnemo/integrations/pi/mnemo.ts +140 -0
- mnemo_search-0.3.0/mnemo/integrations/skills/mnemo/SKILL.md +90 -0
- mnemo_search-0.3.0/mnemo/link.py +358 -0
- mnemo_search-0.3.0/mnemo/mcp_server.py +267 -0
- mnemo_search-0.3.0/mnemo/model.py +173 -0
- mnemo_search-0.3.0/mnemo/remote.py +752 -0
- mnemo_search-0.3.0/mnemo/search.py +262 -0
- mnemo_search-0.3.0/mnemo/service.py +257 -0
- mnemo_search-0.3.0/mnemo/setup.py +160 -0
- mnemo_search-0.3.0/mnemo/sources/__init__.py +15 -0
- mnemo_search-0.3.0/mnemo/sources/base.py +42 -0
- mnemo_search-0.3.0/mnemo/sources/claude.py +91 -0
- mnemo_search-0.3.0/mnemo/sources/codex.py +119 -0
- mnemo_search-0.3.0/mnemo/sources/pi.py +77 -0
- mnemo_search-0.3.0/mnemo/upgrade.py +179 -0
- mnemo_search-0.3.0/mnemo/web_dist/.source-hash +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/404/index.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/404.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/__next.__PAGE__.txt +28 -0
- mnemo_search-0.3.0/mnemo/web_dist/__next._full.txt +23 -0
- mnemo_search-0.3.0/mnemo/web_dist/__next._tree.txt +2 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/09ixh12vp3ttc.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/0o269e4n4ssyg.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/0qipbxfne8s5_.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/0re3p2vntd15n.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/0t9fckj4vrk0h.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/0wx3k63n9a-y1.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/1fb__-2l69vlp.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/1m8luxkzsj9ds.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/1mrdkppuy8u92.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/1rhfzci3q0zi7.css +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/2af2c2nbw14x9.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/2agnkdld987vn.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/2ix0c2s414yfz.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/2n3l1z5-kqvef.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/2qeny3uql5n0q.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/38myjq-g059t2.js +31 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/3kf4pxw7r4zq4.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/3n57v3cbop5sz.js +22 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/chunks/turbopack-1id4m2xo7faa4.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/jTaP542m9VqJByLk4xto3/_buildManifest.js +11 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/jTaP542m9VqJByLk4xto3/_clientMiddlewareManifest.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_next/static/jTaP542m9VqJByLk4xto3/_ssgManifest.js +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_not-found/__next._full.txt +21 -0
- mnemo_search-0.3.0/mnemo/web_dist/_not-found/__next._not-found.__PAGE__.txt +27 -0
- mnemo_search-0.3.0/mnemo/web_dist/_not-found/__next._tree.txt +2 -0
- mnemo_search-0.3.0/mnemo/web_dist/_not-found/index.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/_not-found/index.txt +21 -0
- mnemo_search-0.3.0/mnemo/web_dist/devices/__next._full.txt +25 -0
- mnemo_search-0.3.0/mnemo/web_dist/devices/__next._tree.txt +2 -0
- mnemo_search-0.3.0/mnemo/web_dist/devices/__next.devices.__PAGE__.txt +31 -0
- mnemo_search-0.3.0/mnemo/web_dist/devices/index.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/devices/index.txt +25 -0
- mnemo_search-0.3.0/mnemo/web_dist/index.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/index.txt +23 -0
- mnemo_search-0.3.0/mnemo/web_dist/logo-small.svg +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/logs/__next._full.txt +25 -0
- mnemo_search-0.3.0/mnemo/web_dist/logs/__next._tree.txt +2 -0
- mnemo_search-0.3.0/mnemo/web_dist/logs/__next.logs.__PAGE__.txt +31 -0
- mnemo_search-0.3.0/mnemo/web_dist/logs/index.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/logs/index.txt +25 -0
- mnemo_search-0.3.0/mnemo/web_dist/search/__next._full.txt +25 -0
- mnemo_search-0.3.0/mnemo/web_dist/search/__next._tree.txt +2 -0
- mnemo_search-0.3.0/mnemo/web_dist/search/__next.search.__PAGE__.txt +31 -0
- mnemo_search-0.3.0/mnemo/web_dist/search/index.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/search/index.txt +25 -0
- mnemo_search-0.3.0/mnemo/web_dist/session/__next._full.txt +22 -0
- mnemo_search-0.3.0/mnemo/web_dist/session/__next._tree.txt +2 -0
- mnemo_search-0.3.0/mnemo/web_dist/session/__next.session.__PAGE__.txt +28 -0
- mnemo_search-0.3.0/mnemo/web_dist/session/index.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/session/index.txt +22 -0
- mnemo_search-0.3.0/mnemo/web_dist/topology/__next._full.txt +25 -0
- mnemo_search-0.3.0/mnemo/web_dist/topology/__next._tree.txt +2 -0
- mnemo_search-0.3.0/mnemo/web_dist/topology/__next.topology.__PAGE__.txt +31 -0
- mnemo_search-0.3.0/mnemo/web_dist/topology/index.html +1 -0
- mnemo_search-0.3.0/mnemo/web_dist/topology/index.txt +25 -0
- mnemo_search-0.3.0/mnemo_search.egg-info/PKG-INFO +293 -0
- mnemo_search-0.3.0/mnemo_search.egg-info/SOURCES.txt +101 -0
- mnemo_search-0.3.0/mnemo_search.egg-info/dependency_links.txt +1 -0
- mnemo_search-0.3.0/mnemo_search.egg-info/entry_points.txt +2 -0
- mnemo_search-0.3.0/mnemo_search.egg-info/top_level.txt +1 -0
- mnemo_search-0.3.0/pyproject.toml +36 -0
- mnemo_search-0.3.0/setup.cfg +4 -0
- mnemo_search-0.3.0/tests/test_dashboard.py +202 -0
- mnemo_search-0.3.0/tests/test_index_search.py +107 -0
- mnemo_search-0.3.0/tests/test_link.py +165 -0
- mnemo_search-0.3.0/tests/test_mesh.py +337 -0
- mnemo_search-0.3.0/tests/test_packaging.py +69 -0
- mnemo_search-0.3.0/tests/test_release.py +86 -0
- mnemo_search-0.3.0/tests/test_remote.py +58 -0
- mnemo_search-0.3.0/tests/test_service.py +156 -0
- mnemo_search-0.3.0/tests/test_setup_install.py +199 -0
- mnemo_search-0.3.0/tests/test_upgrade.py +171 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 szupzj18
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mnemo-search
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: One memory for all your coding agents: search Claude Code, Codex and Pi sessions across machines
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://szupzj18.github.io/mnemo/
|
|
7
|
+
Project-URL: Repository, https://github.com/szupzj18/mnemo
|
|
8
|
+
Project-URL: Changelog, https://github.com/szupzj18/mnemo/blob/main/CHANGELOG.md
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Topic :: Software Development
|
|
13
|
+
Requires-Python: >=3.7
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
<div align="center">
|
|
19
|
+
|
|
20
|
+
<picture>
|
|
21
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark.svg">
|
|
22
|
+
<img alt="Mnemo logo" src="docs/assets/logo.svg" width="96">
|
|
23
|
+
</picture>
|
|
24
|
+
|
|
25
|
+
# Mnemo
|
|
26
|
+
|
|
27
|
+
**One memory for all your coding agents.**
|
|
28
|
+
|
|
29
|
+
Your agents can recall every Claude Code, Codex and Pi session you've ever run, on this machine and your devboxes, just by asking.
|
|
30
|
+
|
|
31
|
+
[](#install)
|
|
32
|
+
[](#install)
|
|
33
|
+
[](docs/architecture.md)
|
|
34
|
+
[](docs/agent-tools.md)
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
|
|
37
|
+
**[Website](https://szupzj18.github.io/mnemo/)** · [Docs](docs/getting-started.md) · [Changelog](CHANGELOG.md)
|
|
38
|
+
|
|
39
|
+
English · [简体中文](README.zh-CN.md)
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
you ▸ test_backoff_is_bounded is failing again. Didn't we fix this before?
|
|
45
|
+
|
|
46
|
+
claude ▸ search_sessions(query="backoff flaky")
|
|
47
|
+
1 hit · codex · devbox-b · 2026-09-26 · /home/alex/relay
|
|
48
|
+
"CI is red on main: test_[[backoff]]_is_bounded is [[flaky]]. Investigate."
|
|
49
|
+
|
|
50
|
+
▸ get_context(path=…/rollout-2026-09-26….jsonl, line=2, host="devbox-b")
|
|
51
|
+
tool 1 failed, 199 passed … assert 30.000000000000004 <= 30.0
|
|
52
|
+
codex A floating-point edge case … I'll clamp explicitly in backoff()
|
|
53
|
+
codex apply_patch: return min(cap, random.uniform(0, base * 2 ** attempt))
|
|
54
|
+
|
|
55
|
+
claude ▸ Yes. Codex fixed this on devbox-b on Sep 26: the jittered delay could
|
|
56
|
+
exceed the 30s cap by float error, so the clamp moved after the jitter.
|
|
57
|
+
That fix isn't on this branch. Want me to apply the same patch?
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
<sub>Illustrative session with trimmed output. See <a href="#the-recall-loop">the recall loop</a> for what each call returns.</sub>
|
|
61
|
+
|
|
62
|
+
## Why Mnemo
|
|
63
|
+
|
|
64
|
+
Every coding agent already writes its full working memory to disk: prompts, reasoning, tool calls, tool output. But each agent keeps its own logs, and each machine keeps its own. The result is a set of islands:
|
|
65
|
+
|
|
66
|
+
- Claude Code can't see what you worked out in Codex yesterday.
|
|
67
|
+
- The agent on your laptop can't see last week's session on the devbox.
|
|
68
|
+
- Handoff notes and shared `MEMORY.md` files only help if every agent keeps them up to date, and they don't.
|
|
69
|
+
|
|
70
|
+
Mnemo indexes the logs your agents **already produce** and gives every agent the same tools to search and read them. Your agents don't have to change how they work, and you don't write any notes.
|
|
71
|
+
|
|
72
|
+
## How agents use Mnemo
|
|
73
|
+
|
|
74
|
+
### Just ask
|
|
75
|
+
|
|
76
|
+
With the MCP server and the skill installed, you don't have to name the tool. Questions like these send the agent to its history:
|
|
77
|
+
|
|
78
|
+
| You say | The agent |
|
|
79
|
+
|---|---|
|
|
80
|
+
| "How did we fix the OOM on the GPU box last week?" | Searches all devices, then reads the fix in context |
|
|
81
|
+
| "Did Codex ever try sqlite-vec for this?" | Searches `source=codex`, then summarizes what was tried and why it was dropped |
|
|
82
|
+
| "Pick up where the devbox session left off yesterday." | Finds the session and reads its tail with `get_session(tail=…)` |
|
|
83
|
+
| "What was the exact command we used to rebuild the index?" | Searches `kind=tool_call` and quotes the command verbatim |
|
|
84
|
+
| "上次那个连接池超时是怎么解决的?" | Chinese matches by substring, so `连接池超时` works too |
|
|
85
|
+
|
|
86
|
+
### The recall loop
|
|
87
|
+
|
|
88
|
+
Every lookup follows the same three steps, and each step reads more than the one before it. The agent stops as soon as it has what it needs, so it pays only for that:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
search_sessions ──▶ get_context ──▶ get_session
|
|
92
|
+
~1.6k–3.3k tokens a few k tokens only when the whole arc matters
|
|
93
|
+
"where is it?" "what happened?" "walk me through it"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
1. **`search_sessions`** returns ranked hits. Each hit carries `host`, `source`, `cwd`, `ts`, `role`, `kind`, a snippet with the matched terms marked, and `path` + `lineno`. Keywords are ANDed, and filters narrow by agent, device, directory, date or message kind.
|
|
97
|
+
2. **`get_context`** reads the messages around a hit: the prompt that led up to it, the tool calls and results, and the conclusion. The agent passes back the hit's `host`, and the read runs on that device.
|
|
98
|
+
3. **`get_session`** reads the whole session. `head`/`tail` skim a long one, and `raw: true` reads the original JSONL when an indexed body was truncated at 20k characters.
|
|
99
|
+
|
|
100
|
+
Snippets are deliberately short. The skill tells the agent to call `get_context` before quoting or reusing anything from a hit.
|
|
101
|
+
|
|
102
|
+
### Tools
|
|
103
|
+
|
|
104
|
+
| MCP | Pi | CLI | Purpose |
|
|
105
|
+
|---|---|---|---|
|
|
106
|
+
| `search_sessions` | `search_sessions` | `mnemo search … --json` | Ranked keyword search across all agents and devices |
|
|
107
|
+
| `get_context` | `get_session_context` | `mnemo context <path> <line>` | Messages around a hit |
|
|
108
|
+
| `get_session` | `get_full_session` | `mnemo session <path>` | The whole session, optionally head/tail/raw |
|
|
109
|
+
| `list_recent_sessions` | — | `mnemo recent` | Recently started sessions with their first task as title |
|
|
110
|
+
| `reindex` | — | `mnemo index` | Incremental sync of local logs |
|
|
111
|
+
|
|
112
|
+
Parameters, output shapes and token costs: [Agent tools](docs/agent-tools.md).
|
|
113
|
+
|
|
114
|
+
### Make it a habit
|
|
115
|
+
|
|
116
|
+
The skill covers "look it up when the user asks." To have agents check history *before* they start work, add a rule to your `AGENTS.md` or `CLAUDE.md`:
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
## Past sessions
|
|
120
|
+
Before non-trivial work, and whenever I refer to earlier work ("last time", "like before",
|
|
121
|
+
"did we ever…"), search past agent sessions with mnemo (`search_sessions`, or
|
|
122
|
+
`mnemo search … --json`). Read promising hits with `get_context` before relying on them,
|
|
123
|
+
and say which session (agent, device, date) you are drawing on.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Highlights
|
|
127
|
+
|
|
128
|
+
- **Cross-agent.** A single index covers Claude Code, Codex (including archived sessions) and Pi, all normalized to one message schema.
|
|
129
|
+
- **Cross-device.** Queries fan out over SSH to your devboxes and merge by rank. Session bodies never leave the machine that produced them.
|
|
130
|
+
- **Cheap for agents.** A search returns ranked snippets, not raw logs: ~1.6k tokens for 10 hits. In a controlled test, agents used 23% fewer tokens and 52% fewer tool calls than with grep ([benchmarks](#benchmarks)).
|
|
131
|
+
- **Good at CJK.** English uses prefix matching and Chinese uses substring matching (unigram + bigram), all ranked with BM25.
|
|
132
|
+
- **Fast and small.** Searches take about 50–100 ms, an idle incremental sync about 0.1 s, and the index is ~22% of raw log size.
|
|
133
|
+
- **Zero dependencies.** Mnemo needs only the Python 3.7+ standard library and SQLite FTS5. It installs with `git clone` and needs no daemon.
|
|
134
|
+
- **A dashboard for humans.** A local browser UI to search, read sessions on a timeline and manage devices.
|
|
135
|
+
|
|
136
|
+
## Install
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
curl -fsSL https://szupzj18.github.io/mnemo/install.sh | sh
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
One command: it checks Python 3.7+ and SQLite FTS5, clones to `~/mnemo`, links `mnemo` into `~/.local/bin`, builds the index, and runs `mnemo setup`, which connects every agent it finds (Claude Code MCP + skill, Codex MCP, Pi extension; anything already configured is left alone). Run it again to upgrade. Prefer a Python tool manager? `uv tool install git+https://github.com/szupzj18/mnemo && mnemo setup` (or `pipx install`).
|
|
143
|
+
|
|
144
|
+
Then try `mnemo search "retry budget"`, or ask an agent about something only an old session would know.
|
|
145
|
+
|
|
146
|
+
<details>
|
|
147
|
+
<summary><b>Manual install</b></summary>
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
git clone https://github.com/szupzj18/mnemo.git ~/mnemo
|
|
151
|
+
ln -s ~/mnemo/bin/mnemo ~/.local/bin/mnemo # any directory on PATH
|
|
152
|
+
mnemo index # first full index; later runs are incremental
|
|
153
|
+
mnemo setup # connect agents (or configure them by hand below)
|
|
154
|
+
```
|
|
155
|
+
</details>
|
|
156
|
+
|
|
157
|
+
To connect agents by hand:
|
|
158
|
+
|
|
159
|
+
<details open>
|
|
160
|
+
<summary><b>Claude Code</b></summary>
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
claude mcp add --scope user mnemo -- mnemo mcp
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
For better triggering, also install the skill. It tells the agent *when* to reach for past sessions:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
ln -s ~/mnemo/integrations/skills/mnemo ~/.claude/skills/mnemo
|
|
170
|
+
```
|
|
171
|
+
</details>
|
|
172
|
+
|
|
173
|
+
<details>
|
|
174
|
+
<summary><b>Codex</b></summary>
|
|
175
|
+
|
|
176
|
+
`~/.codex/config.toml`:
|
|
177
|
+
|
|
178
|
+
```toml
|
|
179
|
+
[mcp_servers.mnemo]
|
|
180
|
+
command = "/Users/you/.local/bin/mnemo" # absolute path
|
|
181
|
+
args = ["mcp"]
|
|
182
|
+
startup_timeout_sec = 120
|
|
183
|
+
```
|
|
184
|
+
</details>
|
|
185
|
+
|
|
186
|
+
<details>
|
|
187
|
+
<summary><b>Pi</b></summary>
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
ln -s ~/mnemo/integrations/pi/mnemo.ts ~/.pi/agent/extensions/mnemo.ts
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The extension calls the `mnemo` CLI. It looks for `~/mnemo/bin/mnemo` first, then `PATH`, and `MNEMO_BIN` overrides both.
|
|
194
|
+
</details>
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
<summary><b>Any other MCP client</b></summary>
|
|
198
|
+
|
|
199
|
+
Register the stdio command `mnemo mcp`. For agents that support skills but not MCP, symlink `integrations/skills/mnemo/` into their skills directory. The skill uses the CLI.
|
|
200
|
+
</details>
|
|
201
|
+
|
|
202
|
+
See [Getting started](docs/getting-started.md) for keeping the index fresh and troubleshooting.
|
|
203
|
+
|
|
204
|
+
## Dashboard
|
|
205
|
+
|
|
206
|
+
For you rather than your agents: `mnemo dashboard` opens a local web UI (`127.0.0.1`, token-gated) with the same search, across every device.
|
|
207
|
+
|
|
208
|
+
<picture>
|
|
209
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/search-dark.png">
|
|
210
|
+
<img alt="Mnemo dashboard: one search across Claude Code, Codex and Pi sessions" src="docs/assets/search.png" width="880">
|
|
211
|
+
</picture>
|
|
212
|
+
|
|
213
|
+
Click a hit to open the full session as a chat thread. Matches are highlighted and you can jump between them. Tool calls fold away. A timeline rail marks each turn, idle gaps, day changes and how long each tool call took.
|
|
214
|
+
|
|
215
|
+
<picture>
|
|
216
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/session-dark.png">
|
|
217
|
+
<img alt="Session view with a timeline rail, highlighted matches and tool-call durations" src="docs/assets/session.png" width="880">
|
|
218
|
+
</picture>
|
|
219
|
+
|
|
220
|
+
The dashboard also covers index stats, per-device health, device add/update/remove, a topology map of every device reachable through relays, and search diagnostics (latency and hits per device). It has light and dark themes.
|
|
221
|
+
|
|
222
|
+
## Multiple machines
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
mnemo remote add devbox-b # rsync-installs mnemo over SSH and builds its index
|
|
226
|
+
mnemo search "sglang oom" # now searches local + devbox-b in parallel
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
```mermaid
|
|
230
|
+
flowchart LR
|
|
231
|
+
A["Agent on laptop"] -->|search| L["mnemo (laptop)"]
|
|
232
|
+
L -->|local query| LI[("laptop index")]
|
|
233
|
+
L -->|ssh: mnemo search --host local| R1["mnemo (devbox-a)"]
|
|
234
|
+
L -->|ssh: mnemo search --host local| R2["mnemo (devbox-b)"]
|
|
235
|
+
R1 --> I1[("devbox-a index")]
|
|
236
|
+
R2 --> I2[("devbox-b index")]
|
|
237
|
+
R1 -. ranked hits .-> L
|
|
238
|
+
R2 -. ranked hits .-> L
|
|
239
|
+
L -->|RRF merge| A
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
The design is **message passing, not shared storage**. Each machine indexes only its own logs, a search is a message sent to every device, and results come back as ranked hits merged with Reciprocal Rank Fusion. `context` and `session` reads are routed to the device that holds the session, so no central database collects everyone's transcripts. Each device lists only its direct neighbors; turn on `mnemo node --forward on` on a device and searches relay through it, so any topology works (chains, trees, meshes) with loops and duplicates handled. Hits carry their route, e.g. `devbox-a/devbox-b`. Unreachable devices are skipped with a warning.
|
|
243
|
+
|
|
244
|
+
Details: [Multi-device](docs/multi-device.md).
|
|
245
|
+
|
|
246
|
+
## Benchmarks
|
|
247
|
+
|
|
248
|
+
Measured on a real corpus of 730 sessions and 149,678 messages (3.6 GB of logs):
|
|
249
|
+
|
|
250
|
+
| | |
|
|
251
|
+
|---|---|
|
|
252
|
+
| Full index build | 28.9 s (one-time) |
|
|
253
|
+
| Incremental sync, nothing changed | 0.07–0.13 s |
|
|
254
|
+
| Search (CLI end-to-end) | 46–106 ms |
|
|
255
|
+
| `context` lookup, largest session | 7 ms (vs 316 ms re-parsing JSONL) |
|
|
256
|
+
| Index size | 784 MB (21.8% of raw) |
|
|
257
|
+
|
|
258
|
+
In a controlled experiment, fresh agents answered four "what did we do back then" questions, once with Mnemo and once with only `grep`/`rg` over the raw logs. Both groups got every answer right. With Mnemo they used **23% fewer tokens, 52% fewer tool calls and 40% less wall time**. The gain grows with the size of the search space. When the answer sat in a small, guessable directory, plain grep was just as good. Methodology and caveats: [Benchmarks](docs/benchmarks.md).
|
|
259
|
+
|
|
260
|
+
## Privacy & security
|
|
261
|
+
|
|
262
|
+
- Everything runs locally. Mnemo makes no network calls except SSH to devices you registered yourself.
|
|
263
|
+
- Session bodies are read on the device that produced them. A cross-device query returns only the hits and the messages you asked to read.
|
|
264
|
+
- The dashboard listens on `127.0.0.1` only. API calls require a random per-launch token and a local `Host` header.
|
|
265
|
+
- The index at `~/.mnemo/index.db` holds your transcripts in plaintext. Treat it like the logs themselves.
|
|
266
|
+
|
|
267
|
+
See [SECURITY.md](SECURITY.md) to report a vulnerability.
|
|
268
|
+
|
|
269
|
+
## Documentation
|
|
270
|
+
|
|
271
|
+
| | |
|
|
272
|
+
|---|---|
|
|
273
|
+
| [Getting started](docs/getting-started.md) | Install, connect each agent, keep the index fresh |
|
|
274
|
+
| [Agent tools](docs/agent-tools.md) | MCP / Pi tool schemas and the search → context → session workflow |
|
|
275
|
+
| [CLI reference](docs/cli.md) | Every command and flag |
|
|
276
|
+
| [Multi-device](docs/multi-device.md) | Remotes, relays and topologies, SSH and Kerberos notes |
|
|
277
|
+
| [Architecture](docs/architecture.md) | Index schema, CJK matching, sync, federation |
|
|
278
|
+
| [Benchmarks](docs/benchmarks.md) | Latency, token cost, end-to-end experiment |
|
|
279
|
+
|
|
280
|
+
## Roadmap
|
|
281
|
+
|
|
282
|
+
- [ ] More agents: Gemini CLI (bodies live in protobuf SQLite blobs), Cursor, OpenCode
|
|
283
|
+
- [ ] Hybrid semantic search (`sqlite-vec` + local embeddings) alongside keyword search
|
|
284
|
+
- [ ] Length caps on `tool_result` in `context` responses to bound per-call token cost
|
|
285
|
+
- [ ] External-content FTS table with compressed bodies (~30–40% smaller index)
|
|
286
|
+
|
|
287
|
+
## Contributing
|
|
288
|
+
|
|
289
|
+
Issues and PRs are welcome, especially new agent adapters (each is about 100 lines). Start with [CONTRIBUTING.md](CONTRIBUTING.md). Coding agents working in this repo should read [AGENTS.md](AGENTS.md).
|
|
290
|
+
|
|
291
|
+
## License
|
|
292
|
+
|
|
293
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark.svg">
|
|
5
|
+
<img alt="Mnemo logo" src="docs/assets/logo.svg" width="96">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
# Mnemo
|
|
9
|
+
|
|
10
|
+
**One memory for all your coding agents.**
|
|
11
|
+
|
|
12
|
+
Your agents can recall every Claude Code, Codex and Pi session you've ever run, on this machine and your devboxes, just by asking.
|
|
13
|
+
|
|
14
|
+
[](#install)
|
|
15
|
+
[](#install)
|
|
16
|
+
[](docs/architecture.md)
|
|
17
|
+
[](docs/agent-tools.md)
|
|
18
|
+
[](LICENSE)
|
|
19
|
+
|
|
20
|
+
**[Website](https://szupzj18.github.io/mnemo/)** · [Docs](docs/getting-started.md) · [Changelog](CHANGELOG.md)
|
|
21
|
+
|
|
22
|
+
English · [简体中文](README.zh-CN.md)
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
you ▸ test_backoff_is_bounded is failing again. Didn't we fix this before?
|
|
28
|
+
|
|
29
|
+
claude ▸ search_sessions(query="backoff flaky")
|
|
30
|
+
1 hit · codex · devbox-b · 2026-09-26 · /home/alex/relay
|
|
31
|
+
"CI is red on main: test_[[backoff]]_is_bounded is [[flaky]]. Investigate."
|
|
32
|
+
|
|
33
|
+
▸ get_context(path=…/rollout-2026-09-26….jsonl, line=2, host="devbox-b")
|
|
34
|
+
tool 1 failed, 199 passed … assert 30.000000000000004 <= 30.0
|
|
35
|
+
codex A floating-point edge case … I'll clamp explicitly in backoff()
|
|
36
|
+
codex apply_patch: return min(cap, random.uniform(0, base * 2 ** attempt))
|
|
37
|
+
|
|
38
|
+
claude ▸ Yes. Codex fixed this on devbox-b on Sep 26: the jittered delay could
|
|
39
|
+
exceed the 30s cap by float error, so the clamp moved after the jitter.
|
|
40
|
+
That fix isn't on this branch. Want me to apply the same patch?
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
<sub>Illustrative session with trimmed output. See <a href="#the-recall-loop">the recall loop</a> for what each call returns.</sub>
|
|
44
|
+
|
|
45
|
+
## Why Mnemo
|
|
46
|
+
|
|
47
|
+
Every coding agent already writes its full working memory to disk: prompts, reasoning, tool calls, tool output. But each agent keeps its own logs, and each machine keeps its own. The result is a set of islands:
|
|
48
|
+
|
|
49
|
+
- Claude Code can't see what you worked out in Codex yesterday.
|
|
50
|
+
- The agent on your laptop can't see last week's session on the devbox.
|
|
51
|
+
- Handoff notes and shared `MEMORY.md` files only help if every agent keeps them up to date, and they don't.
|
|
52
|
+
|
|
53
|
+
Mnemo indexes the logs your agents **already produce** and gives every agent the same tools to search and read them. Your agents don't have to change how they work, and you don't write any notes.
|
|
54
|
+
|
|
55
|
+
## How agents use Mnemo
|
|
56
|
+
|
|
57
|
+
### Just ask
|
|
58
|
+
|
|
59
|
+
With the MCP server and the skill installed, you don't have to name the tool. Questions like these send the agent to its history:
|
|
60
|
+
|
|
61
|
+
| You say | The agent |
|
|
62
|
+
|---|---|
|
|
63
|
+
| "How did we fix the OOM on the GPU box last week?" | Searches all devices, then reads the fix in context |
|
|
64
|
+
| "Did Codex ever try sqlite-vec for this?" | Searches `source=codex`, then summarizes what was tried and why it was dropped |
|
|
65
|
+
| "Pick up where the devbox session left off yesterday." | Finds the session and reads its tail with `get_session(tail=…)` |
|
|
66
|
+
| "What was the exact command we used to rebuild the index?" | Searches `kind=tool_call` and quotes the command verbatim |
|
|
67
|
+
| "上次那个连接池超时是怎么解决的?" | Chinese matches by substring, so `连接池超时` works too |
|
|
68
|
+
|
|
69
|
+
### The recall loop
|
|
70
|
+
|
|
71
|
+
Every lookup follows the same three steps, and each step reads more than the one before it. The agent stops as soon as it has what it needs, so it pays only for that:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
search_sessions ──▶ get_context ──▶ get_session
|
|
75
|
+
~1.6k–3.3k tokens a few k tokens only when the whole arc matters
|
|
76
|
+
"where is it?" "what happened?" "walk me through it"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
1. **`search_sessions`** returns ranked hits. Each hit carries `host`, `source`, `cwd`, `ts`, `role`, `kind`, a snippet with the matched terms marked, and `path` + `lineno`. Keywords are ANDed, and filters narrow by agent, device, directory, date or message kind.
|
|
80
|
+
2. **`get_context`** reads the messages around a hit: the prompt that led up to it, the tool calls and results, and the conclusion. The agent passes back the hit's `host`, and the read runs on that device.
|
|
81
|
+
3. **`get_session`** reads the whole session. `head`/`tail` skim a long one, and `raw: true` reads the original JSONL when an indexed body was truncated at 20k characters.
|
|
82
|
+
|
|
83
|
+
Snippets are deliberately short. The skill tells the agent to call `get_context` before quoting or reusing anything from a hit.
|
|
84
|
+
|
|
85
|
+
### Tools
|
|
86
|
+
|
|
87
|
+
| MCP | Pi | CLI | Purpose |
|
|
88
|
+
|---|---|---|---|
|
|
89
|
+
| `search_sessions` | `search_sessions` | `mnemo search … --json` | Ranked keyword search across all agents and devices |
|
|
90
|
+
| `get_context` | `get_session_context` | `mnemo context <path> <line>` | Messages around a hit |
|
|
91
|
+
| `get_session` | `get_full_session` | `mnemo session <path>` | The whole session, optionally head/tail/raw |
|
|
92
|
+
| `list_recent_sessions` | — | `mnemo recent` | Recently started sessions with their first task as title |
|
|
93
|
+
| `reindex` | — | `mnemo index` | Incremental sync of local logs |
|
|
94
|
+
|
|
95
|
+
Parameters, output shapes and token costs: [Agent tools](docs/agent-tools.md).
|
|
96
|
+
|
|
97
|
+
### Make it a habit
|
|
98
|
+
|
|
99
|
+
The skill covers "look it up when the user asks." To have agents check history *before* they start work, add a rule to your `AGENTS.md` or `CLAUDE.md`:
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
## Past sessions
|
|
103
|
+
Before non-trivial work, and whenever I refer to earlier work ("last time", "like before",
|
|
104
|
+
"did we ever…"), search past agent sessions with mnemo (`search_sessions`, or
|
|
105
|
+
`mnemo search … --json`). Read promising hits with `get_context` before relying on them,
|
|
106
|
+
and say which session (agent, device, date) you are drawing on.
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Highlights
|
|
110
|
+
|
|
111
|
+
- **Cross-agent.** A single index covers Claude Code, Codex (including archived sessions) and Pi, all normalized to one message schema.
|
|
112
|
+
- **Cross-device.** Queries fan out over SSH to your devboxes and merge by rank. Session bodies never leave the machine that produced them.
|
|
113
|
+
- **Cheap for agents.** A search returns ranked snippets, not raw logs: ~1.6k tokens for 10 hits. In a controlled test, agents used 23% fewer tokens and 52% fewer tool calls than with grep ([benchmarks](#benchmarks)).
|
|
114
|
+
- **Good at CJK.** English uses prefix matching and Chinese uses substring matching (unigram + bigram), all ranked with BM25.
|
|
115
|
+
- **Fast and small.** Searches take about 50–100 ms, an idle incremental sync about 0.1 s, and the index is ~22% of raw log size.
|
|
116
|
+
- **Zero dependencies.** Mnemo needs only the Python 3.7+ standard library and SQLite FTS5. It installs with `git clone` and needs no daemon.
|
|
117
|
+
- **A dashboard for humans.** A local browser UI to search, read sessions on a timeline and manage devices.
|
|
118
|
+
|
|
119
|
+
## Install
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
curl -fsSL https://szupzj18.github.io/mnemo/install.sh | sh
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
One command: it checks Python 3.7+ and SQLite FTS5, clones to `~/mnemo`, links `mnemo` into `~/.local/bin`, builds the index, and runs `mnemo setup`, which connects every agent it finds (Claude Code MCP + skill, Codex MCP, Pi extension; anything already configured is left alone). Run it again to upgrade. Prefer a Python tool manager? `uv tool install git+https://github.com/szupzj18/mnemo && mnemo setup` (or `pipx install`).
|
|
126
|
+
|
|
127
|
+
Then try `mnemo search "retry budget"`, or ask an agent about something only an old session would know.
|
|
128
|
+
|
|
129
|
+
<details>
|
|
130
|
+
<summary><b>Manual install</b></summary>
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
git clone https://github.com/szupzj18/mnemo.git ~/mnemo
|
|
134
|
+
ln -s ~/mnemo/bin/mnemo ~/.local/bin/mnemo # any directory on PATH
|
|
135
|
+
mnemo index # first full index; later runs are incremental
|
|
136
|
+
mnemo setup # connect agents (or configure them by hand below)
|
|
137
|
+
```
|
|
138
|
+
</details>
|
|
139
|
+
|
|
140
|
+
To connect agents by hand:
|
|
141
|
+
|
|
142
|
+
<details open>
|
|
143
|
+
<summary><b>Claude Code</b></summary>
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
claude mcp add --scope user mnemo -- mnemo mcp
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
For better triggering, also install the skill. It tells the agent *when* to reach for past sessions:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
ln -s ~/mnemo/integrations/skills/mnemo ~/.claude/skills/mnemo
|
|
153
|
+
```
|
|
154
|
+
</details>
|
|
155
|
+
|
|
156
|
+
<details>
|
|
157
|
+
<summary><b>Codex</b></summary>
|
|
158
|
+
|
|
159
|
+
`~/.codex/config.toml`:
|
|
160
|
+
|
|
161
|
+
```toml
|
|
162
|
+
[mcp_servers.mnemo]
|
|
163
|
+
command = "/Users/you/.local/bin/mnemo" # absolute path
|
|
164
|
+
args = ["mcp"]
|
|
165
|
+
startup_timeout_sec = 120
|
|
166
|
+
```
|
|
167
|
+
</details>
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary><b>Pi</b></summary>
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
ln -s ~/mnemo/integrations/pi/mnemo.ts ~/.pi/agent/extensions/mnemo.ts
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The extension calls the `mnemo` CLI. It looks for `~/mnemo/bin/mnemo` first, then `PATH`, and `MNEMO_BIN` overrides both.
|
|
177
|
+
</details>
|
|
178
|
+
|
|
179
|
+
<details>
|
|
180
|
+
<summary><b>Any other MCP client</b></summary>
|
|
181
|
+
|
|
182
|
+
Register the stdio command `mnemo mcp`. For agents that support skills but not MCP, symlink `integrations/skills/mnemo/` into their skills directory. The skill uses the CLI.
|
|
183
|
+
</details>
|
|
184
|
+
|
|
185
|
+
See [Getting started](docs/getting-started.md) for keeping the index fresh and troubleshooting.
|
|
186
|
+
|
|
187
|
+
## Dashboard
|
|
188
|
+
|
|
189
|
+
For you rather than your agents: `mnemo dashboard` opens a local web UI (`127.0.0.1`, token-gated) with the same search, across every device.
|
|
190
|
+
|
|
191
|
+
<picture>
|
|
192
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/search-dark.png">
|
|
193
|
+
<img alt="Mnemo dashboard: one search across Claude Code, Codex and Pi sessions" src="docs/assets/search.png" width="880">
|
|
194
|
+
</picture>
|
|
195
|
+
|
|
196
|
+
Click a hit to open the full session as a chat thread. Matches are highlighted and you can jump between them. Tool calls fold away. A timeline rail marks each turn, idle gaps, day changes and how long each tool call took.
|
|
197
|
+
|
|
198
|
+
<picture>
|
|
199
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/session-dark.png">
|
|
200
|
+
<img alt="Session view with a timeline rail, highlighted matches and tool-call durations" src="docs/assets/session.png" width="880">
|
|
201
|
+
</picture>
|
|
202
|
+
|
|
203
|
+
The dashboard also covers index stats, per-device health, device add/update/remove, a topology map of every device reachable through relays, and search diagnostics (latency and hits per device). It has light and dark themes.
|
|
204
|
+
|
|
205
|
+
## Multiple machines
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
mnemo remote add devbox-b # rsync-installs mnemo over SSH and builds its index
|
|
209
|
+
mnemo search "sglang oom" # now searches local + devbox-b in parallel
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
```mermaid
|
|
213
|
+
flowchart LR
|
|
214
|
+
A["Agent on laptop"] -->|search| L["mnemo (laptop)"]
|
|
215
|
+
L -->|local query| LI[("laptop index")]
|
|
216
|
+
L -->|ssh: mnemo search --host local| R1["mnemo (devbox-a)"]
|
|
217
|
+
L -->|ssh: mnemo search --host local| R2["mnemo (devbox-b)"]
|
|
218
|
+
R1 --> I1[("devbox-a index")]
|
|
219
|
+
R2 --> I2[("devbox-b index")]
|
|
220
|
+
R1 -. ranked hits .-> L
|
|
221
|
+
R2 -. ranked hits .-> L
|
|
222
|
+
L -->|RRF merge| A
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The design is **message passing, not shared storage**. Each machine indexes only its own logs, a search is a message sent to every device, and results come back as ranked hits merged with Reciprocal Rank Fusion. `context` and `session` reads are routed to the device that holds the session, so no central database collects everyone's transcripts. Each device lists only its direct neighbors; turn on `mnemo node --forward on` on a device and searches relay through it, so any topology works (chains, trees, meshes) with loops and duplicates handled. Hits carry their route, e.g. `devbox-a/devbox-b`. Unreachable devices are skipped with a warning.
|
|
226
|
+
|
|
227
|
+
Details: [Multi-device](docs/multi-device.md).
|
|
228
|
+
|
|
229
|
+
## Benchmarks
|
|
230
|
+
|
|
231
|
+
Measured on a real corpus of 730 sessions and 149,678 messages (3.6 GB of logs):
|
|
232
|
+
|
|
233
|
+
| | |
|
|
234
|
+
|---|---|
|
|
235
|
+
| Full index build | 28.9 s (one-time) |
|
|
236
|
+
| Incremental sync, nothing changed | 0.07–0.13 s |
|
|
237
|
+
| Search (CLI end-to-end) | 46–106 ms |
|
|
238
|
+
| `context` lookup, largest session | 7 ms (vs 316 ms re-parsing JSONL) |
|
|
239
|
+
| Index size | 784 MB (21.8% of raw) |
|
|
240
|
+
|
|
241
|
+
In a controlled experiment, fresh agents answered four "what did we do back then" questions, once with Mnemo and once with only `grep`/`rg` over the raw logs. Both groups got every answer right. With Mnemo they used **23% fewer tokens, 52% fewer tool calls and 40% less wall time**. The gain grows with the size of the search space. When the answer sat in a small, guessable directory, plain grep was just as good. Methodology and caveats: [Benchmarks](docs/benchmarks.md).
|
|
242
|
+
|
|
243
|
+
## Privacy & security
|
|
244
|
+
|
|
245
|
+
- Everything runs locally. Mnemo makes no network calls except SSH to devices you registered yourself.
|
|
246
|
+
- Session bodies are read on the device that produced them. A cross-device query returns only the hits and the messages you asked to read.
|
|
247
|
+
- The dashboard listens on `127.0.0.1` only. API calls require a random per-launch token and a local `Host` header.
|
|
248
|
+
- The index at `~/.mnemo/index.db` holds your transcripts in plaintext. Treat it like the logs themselves.
|
|
249
|
+
|
|
250
|
+
See [SECURITY.md](SECURITY.md) to report a vulnerability.
|
|
251
|
+
|
|
252
|
+
## Documentation
|
|
253
|
+
|
|
254
|
+
| | |
|
|
255
|
+
|---|---|
|
|
256
|
+
| [Getting started](docs/getting-started.md) | Install, connect each agent, keep the index fresh |
|
|
257
|
+
| [Agent tools](docs/agent-tools.md) | MCP / Pi tool schemas and the search → context → session workflow |
|
|
258
|
+
| [CLI reference](docs/cli.md) | Every command and flag |
|
|
259
|
+
| [Multi-device](docs/multi-device.md) | Remotes, relays and topologies, SSH and Kerberos notes |
|
|
260
|
+
| [Architecture](docs/architecture.md) | Index schema, CJK matching, sync, federation |
|
|
261
|
+
| [Benchmarks](docs/benchmarks.md) | Latency, token cost, end-to-end experiment |
|
|
262
|
+
|
|
263
|
+
## Roadmap
|
|
264
|
+
|
|
265
|
+
- [ ] More agents: Gemini CLI (bodies live in protobuf SQLite blobs), Cursor, OpenCode
|
|
266
|
+
- [ ] Hybrid semantic search (`sqlite-vec` + local embeddings) alongside keyword search
|
|
267
|
+
- [ ] Length caps on `tool_result` in `context` responses to bound per-call token cost
|
|
268
|
+
- [ ] External-content FTS table with compressed bodies (~30–40% smaller index)
|
|
269
|
+
|
|
270
|
+
## Contributing
|
|
271
|
+
|
|
272
|
+
Issues and PRs are welcome, especially new agent adapters (each is about 100 lines). Start with [CONTRIBUTING.md](CONTRIBUTING.md). Coding agents working in this repo should read [AGENTS.md](AGENTS.md).
|
|
273
|
+
|
|
274
|
+
## License
|
|
275
|
+
|
|
276
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0"
|