sqlite-graph-memory 0.3.2__py3-none-any.whl → 0.3.5__py3-none-any.whl

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.
@@ -21,6 +21,6 @@ the indexer and the reranker will tell you what is missing instead of failing
21
21
  on an ``ImportError`` at startup.
22
22
  """
23
23
 
24
- __version__ = "0.3.2"
24
+ __version__ = "0.3.5"
25
25
 
26
26
  __all__ = ["__version__"]
@@ -31,6 +31,7 @@ for _s in (sys.stdout, sys.stderr):
31
31
  try: _s.reconfigure(encoding='utf-8')
32
32
  except Exception: pass
33
33
 
34
+ FEEDBACK_URL = 'https://github.com/tonydzi/sqlite-graph-memory/discussions/categories/ideas'
34
35
  INDEX_DIR = Path(os.getenv('BRAIN_INDEX_DIR', 'index'))
35
36
  AB_DB = Path(os.getenv('TURNSTATE_DB', 'turnstate.db'))
36
37
  EMB = INDEX_DIR / '_brain_e5.npy'
@@ -299,6 +300,8 @@ def main():
299
300
  query = ' '.join(a for a in args if a not in flags)
300
301
  if not query or not EMB.exists():
301
302
  sys.stderr.write('need an embedding index (%s) and a query — run index_notes.py first\n' % EMB)
303
+ if query and not EMB.exists():
304
+ print('Stuck? Tell us what you were trying to do: %s' % FEEDBACK_URL, file=sys.stderr)
302
305
  raise SystemExit(1)
303
306
 
304
307
  dev = pick_device()
@@ -0,0 +1,133 @@
1
+ """sgm-doctor: check this machine in plain words, one command, nothing downloaded.
2
+
3
+ Passport
4
+ in: environment (BRAIN_INDEX_DIR, HF_HOME), the installed packages
5
+ out: one line per check, ok / warn / fail, then a verdict; exit 1 if anything failed
6
+ who: a person who just ran `pip install sqlite-graph-memory` and got an error
7
+ rail: stdlib only. torch is imported inside a try block, because importing it is the check.
8
+ """
9
+ import os
10
+ import platform
11
+ import sqlite3
12
+ import sys
13
+ from pathlib import Path
14
+
15
+ from sqlite_graph_memory import brain_ask
16
+
17
+ OK, WARN, FAIL = 'ok', 'warn', 'fail'
18
+ MARK = {OK: '[ok] ', WARN: '[warn]', FAIL: '[FAIL]'}
19
+ FEEDBACK = brain_ask.FEEDBACK_URL
20
+
21
+
22
+ def check_python(version=None):
23
+ v = version or sys.version_info[:3]
24
+ if v < (3, 9):
25
+ return FAIL, 'Python %d.%d.%d is too old.' % v, 'Install Python 3.9 or newer.'
26
+ return OK, 'Python %d.%d.%d.' % v, ''
27
+
28
+
29
+ def check_numpy():
30
+ try:
31
+ import numpy
32
+ except ModuleNotFoundError:
33
+ return FAIL, 'numpy is not installed.', 'pip install sqlite-graph-memory'
34
+ return OK, 'numpy %s.' % numpy.__version__, ''
35
+
36
+
37
+ def _intel_mac(system=None, machine=None):
38
+ return (system or platform.system()) == 'Darwin' and (machine or platform.machine()) == 'x86_64'
39
+
40
+
41
+ def check_embeddings(system=None, machine=None):
42
+ """The heavy half. Without it the graph and the SQLite parts work, indexing and recall do not."""
43
+ try:
44
+ import numpy
45
+ np_major = int(numpy.__version__.split('.')[0])
46
+ except Exception:
47
+ np_major = 0
48
+ try:
49
+ import torch
50
+ import sentence_transformers
51
+ except ModuleNotFoundError as exc:
52
+ return (WARN, 'The embeddings extra is not installed (%s missing).' % exc.name,
53
+ 'Only needed to index and recall. Install it with: pip install "sqlite-graph-memory[embeddings]"')
54
+ except Exception as exc: # torch dies at import on a numpy it was not built for
55
+ why = '%s: %s' % (type(exc).__name__, str(exc).splitlines()[0] if str(exc) else '')
56
+ if _intel_mac(system, machine) and np_major >= 2:
57
+ return (FAIL, 'torch cannot start on this Intel Mac with NumPy 2 (%s).' % why,
58
+ 'pip install "numpy<2"')
59
+ return FAIL, 'torch or sentence-transformers fails to import (%s).' % why, \
60
+ 'Reinstall in a fresh virtualenv: pip install --force-reinstall "sqlite-graph-memory[embeddings]"'
61
+ if _intel_mac(system, machine) and np_major >= 2:
62
+ return (WARN, 'Intel Mac with NumPy 2: torch imported, but this pairing is known to crash while indexing.',
63
+ 'pip install "numpy<2"')
64
+ return OK, 'torch %s and sentence-transformers %s import cleanly.' % (
65
+ torch.__version__, sentence_transformers.__version__), ''
66
+
67
+
68
+ def _hf_cache_dirs():
69
+ roots = [os.getenv('HF_HUB_CACHE'), os.getenv('SENTENCE_TRANSFORMERS_HOME')]
70
+ hf_home = os.getenv('HF_HOME') or str(Path.home() / '.cache' / 'huggingface')
71
+ roots.append(str(Path(hf_home) / 'hub'))
72
+ return [Path(r) for r in roots if r]
73
+
74
+
75
+ def check_models():
76
+ """Look for the two model folders in the local cache. Never downloads anything."""
77
+ missing = []
78
+ for name in (brain_ask.E5_MODEL, brain_ask.RERANK_MODEL):
79
+ folder = 'models--' + name.replace('/', '--')
80
+ if not any((d / folder).exists() for d in _hf_cache_dirs()):
81
+ missing.append(name)
82
+ if missing:
83
+ return (WARN, 'Not downloaded yet: %s.' % ', '.join(missing),
84
+ 'They download on the first index or recall (about 1 GB, needs internet once).')
85
+ return OK, 'Both models are already in the local cache.', ''
86
+
87
+
88
+ def check_index(index_dir=None):
89
+ d = Path(index_dir) if index_dir else brain_ask.INDEX_DIR
90
+ emb, meta = d / '_brain_e5.npy', d / '_brain_e5_meta.pkl'
91
+ if not emb.exists() and not meta.exists():
92
+ return (WARN, 'No index in %s.' % d.resolve(),
93
+ 'Run: sgm-index /path/to/your/notes (set BRAIN_INDEX_DIR to keep the index elsewhere)')
94
+ if emb.exists() != meta.exists():
95
+ left = meta.name if emb.exists() else emb.name
96
+ return FAIL, 'The index is half there: %s is missing.' % left, 'Rebuild it: sgm-index /path/to/your/notes'
97
+ return OK, 'Index found in %s (%.1f MB).' % (d.resolve(), emb.stat().st_size / 1e6), ''
98
+
99
+
100
+ def check_sqlite():
101
+ return OK, 'SQLite %s.' % sqlite3.sqlite_version, ''
102
+
103
+
104
+ def run_checks():
105
+ return [('Python', check_python()), ('SQLite', check_sqlite()), ('numpy', check_numpy()),
106
+ ('Embeddings', check_embeddings()), ('Models', check_models()), ('Index', check_index())]
107
+
108
+
109
+ def render(results):
110
+ lines = []
111
+ for name, (status, what, fix) in results:
112
+ lines.append('%s %-10s %s' % (MARK[status], name, what))
113
+ if fix:
114
+ lines.append(' -> %s' % fix)
115
+ fails = sum(1 for _, r in results if r[0] == FAIL)
116
+ warns = sum(1 for _, r in results if r[0] == WARN)
117
+ if fails:
118
+ lines.append('\n%d problem(s) to fix first. Still stuck? Tell us: %s' % (fails, FEEDBACK))
119
+ elif warns:
120
+ lines.append('\nNothing is broken; %d step(s) above are still to do.' % warns)
121
+ else:
122
+ lines.append('\nAll good.')
123
+ return '\n'.join(lines), fails
124
+
125
+
126
+ def main():
127
+ text, fails = render(run_checks())
128
+ print(text)
129
+ return 1 if fails else 0
130
+
131
+
132
+ if __name__ == '__main__':
133
+ sys.exit(main())
@@ -12,9 +12,9 @@ USAGE:
12
12
  python index_notes.py <notes_dir>
13
13
  Config (env, optional):
14
14
  BRAIN_INDEX_DIR output dir (default: ./index)
15
- BRAIN_INDEX_HIDDEN 1 = also index dot-directories (default: skip them,
16
- so .stversions/.obsidian/.git and Syncthing conflict
17
- copies never enter the index)
15
+ BRAIN_INDEX_HIDDEN 1 = also index dot-files and dot-directories (default:
16
+ skip them, so .draft.md, .stversions/.obsidian/.git and
17
+ Syncthing conflict copies never enter the index)
18
18
  """
19
19
  import os, re, sys, pickle
20
20
  from pathlib import Path
@@ -77,15 +77,15 @@ CONFLICT_MARKER = 'sync-conflict'
77
77
  def iter_notes(notes_dir):
78
78
  """Files that count as a note under ``notes_dir``.
79
79
 
80
- Skips dot-directories and Syncthing conflict copies. Set ``BRAIN_INDEX_HIDDEN=1``
81
- to index hidden folders too — someone will legitimately keep notes in one.
80
+ Skips dot-directories, dot-files (``.draft.md``) and Syncthing conflict copies.
81
+ Set ``BRAIN_INDEX_HIDDEN=1`` to index hidden paths too — someone will legitimately keep notes in one.
82
82
  """
83
83
  root = Path(notes_dir)
84
84
  include_hidden = os.getenv('BRAIN_INDEX_HIDDEN', '') not in ('', '0', 'false', 'no')
85
85
  out = []
86
86
  for p in root.rglob('*.md'):
87
87
  rel = p.relative_to(root)
88
- if not include_hidden and any(part.startswith('.') for part in rel.parts[:-1]):
88
+ if not include_hidden and any(part.startswith('.') for part in rel.parts):
89
89
  continue
90
90
  if CONFLICT_MARKER in p.name:
91
91
  continue
@@ -18,6 +18,7 @@ Config (env, optional):
18
18
  BRAIN_INDEX_DIR dir holding embedding index (default: ./index)
19
19
  TURNSTATE_DB SQLite db for telemetry (default: ./turnstate.db)
20
20
  BRAIN_ANSWER_OUT file to mirror answer into (default: ./_brain_answer.txt)
21
+ BRAIN_RECALL_TIMEOUT recall child timeout in seconds (1..600, default: 180)
21
22
  """
22
23
  import sys, os, json, subprocess, tempfile
23
24
  from pathlib import Path
@@ -100,6 +101,13 @@ def run_recall(query: str, mode: str = "associative") -> tuple[str, bool]:
100
101
  An empty answer file means no notes matched; stdout is never promoted to an answer
101
102
  because it carries startup notices, load reports, and tokenizer warnings.
102
103
  """
104
+ try:
105
+ recall_timeout = int(os.environ.get("BRAIN_RECALL_TIMEOUT", "180"))
106
+ if not 1 <= recall_timeout <= 600:
107
+ raise ValueError
108
+ except ValueError:
109
+ return "Recall configuration error: BRAIN_RECALL_TIMEOUT must be an integer from 1 to 600 seconds.", True
110
+
103
111
  base_cmd = _brain_ask_cmd()
104
112
  if base_cmd is None:
105
113
  return (
@@ -131,13 +139,12 @@ def run_recall(query: str, mode: str = "associative") -> tuple[str, bool]:
131
139
  call_env["PYTHONPATH"] = f"{src_dir}{os.pathsep}{existing_pp}" if existing_pp else src_dir
132
140
  res = subprocess.run(
133
141
  cmd,
134
- cwd=str(ROOT_DIR),
135
142
  env=call_env,
136
143
  capture_output=True,
137
144
  text=True,
138
145
  encoding="utf-8",
139
146
  errors="replace",
140
- timeout=60
147
+ timeout=recall_timeout
141
148
  )
142
149
  if res.returncode != 0:
143
150
  err = (res.stderr or res.stdout or "").strip()
@@ -154,7 +161,7 @@ def run_recall(query: str, mode: str = "associative") -> tuple[str, bool]:
154
161
  # Empty answer file: return explicit message and flag error so agent does not ingest stdout noise
155
162
  return "(no matching notes found)", True
156
163
  except subprocess.TimeoutExpired:
157
- return "Recall error: timed out after 60 seconds.", True
164
+ return f"Recall error: timed out after {recall_timeout} seconds.", True
158
165
  except Exception as e:
159
166
  return f"Recall exception: {e}", True
160
167
  finally:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: sqlite-graph-memory
3
- Version: 0.3.2
3
+ Version: 0.3.5
4
4
  Summary: Associative memory for LLM agents: Graph RAG over a folder of markdown notes, in one SQLite file, with no server to run.
5
5
  Project-URL: Homepage, https://github.com/tonydzi/sqlite-graph-memory
6
6
  Project-URL: Repository, https://github.com/tonydzi/sqlite-graph-memory
@@ -53,17 +53,86 @@ Description-Content-Type: text/markdown
53
53
 
54
54
  <!-- mcp-name: io.github.tonydzi/sqlite-graph-memory -->
55
55
 
56
- [![PyPI](https://img.shields.io/pypi/v/sqlite-graph-memory)](https://pypi.org/project/sqlite-graph-memory/) [![tests](https://img.shields.io/github/actions/workflow/status/tonydzi/sqlite-graph-memory/tests.yml?label=tests)](https://github.com/tonydzi/sqlite-graph-memory/actions/workflows/tests.yml) [![MCP Registry](https://img.shields.io/badge/MCP%20Registry-io.github.tonydzi%2Fsqlite--graph--memory-blue)](https://registry.modelcontextprotocol.io/v0/servers?search=sqlite-graph-memory) [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
56
+ Your coding agent remembers what you already wrote down, and reaches the note a plain search
57
+ misses by following the links between your notes. It is an MCP server and a CLI over any
58
+ folder of markdown, Obsidian vaults included: `pip install`, point it at the folder, and
59
+ Claude Code, Cursor, Codex or any other MCP client can recall from it.
57
60
 
58
- Long-term memory for coding agents that lives in the notes you already keep: an MCP server
59
- and a CLI over any folder of markdown, Obsidian vaults included. `pip install`, point it at
60
- the folder, and Claude Code, Cursor, Codex or any other MCP client can recall from it.
61
+ ![sgm-index builds the index of the 202-note bench vault, then sgm-ask --ab shows tool-lanternfish entering the top 5 only through a graph hop; the one-minute CPU indexing wait is cut](docs/demo.gif)
61
62
 
62
63
  **Your agent forgets everything between sessions, and plain vector search gives it back
63
64
  flat, unrelated chunks. This gives it associative recall over your own markdown notes:
64
65
  vector search finds the entry points, the `[[wikilinks]]` you already wrote are the graph.
65
66
  One SQLite file, no graph database, no ETL pass, no server.**
66
67
 
68
+ [![PyPI](https://img.shields.io/pypi/v/sqlite-graph-memory)](https://pypi.org/project/sqlite-graph-memory/) [![tests](https://img.shields.io/github/actions/workflow/status/tonydzi/sqlite-graph-memory/tests.yml?label=tests)](https://github.com/tonydzi/sqlite-graph-memory/actions/workflows/tests.yml) [![MCP Registry](https://img.shields.io/badge/MCP%20Registry-io.github.tonydzi%2Fsqlite--graph--memory-blue)](https://registry.modelcontextprotocol.io/v0/servers?search=sqlite-graph-memory) [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
69
+
70
+ ## Install in your client
71
+
72
+ Already using your own agent rules and projects? The [Russian existing-setup guide (proposed revision)](https://github.com/tonydzi/second-brain-starter-kit/blob/codex/dima-brain-H55019/docs/EXISTING-SETUP.ru.md) combines this memory backend with the optional starter-kit method, preserves existing settings, and checks recall in a fresh chat. Install one memory connection per client; the starter-kit memory plugin and manual registration are alternatives.
73
+
74
+ Build the index once (any folder of markdown; [`uv`](https://docs.astral.sh/uv/) gives you `uvx`):
75
+
76
+ ```bash
77
+ BRAIN_INDEX_DIR=$HOME/.sgm-index uvx --from 'sqlite-graph-memory[embeddings]' sgm-index ~/notes
78
+ ```
79
+
80
+ Then point your client at the server. Use the absolute path of that index folder.
81
+
82
+ **Cold-start timeout (0.3.5 and later).** The MCP server starts recall in a separate process with a default deadline of 180 seconds; a first call on a clean Windows install took 89 s, which the old fixed 60 s always cut off. Override with `BRAIN_RECALL_TIMEOUT` (integer seconds, 1 to 600; invalid values return an error). Your MCP client's own tool timeout must also allow the longer call. On 0.3.3 and earlier the deadline is a fixed 60 s: upgrade, or use `sgm-ask --ask` directly, and do not report MCP recall as verified merely because the CLI works.
83
+
84
+ **Claude Code**
85
+
86
+ ```bash
87
+ claude mcp add sqlite-graph-memory -e BRAIN_INDEX_DIR=$HOME/.sgm-index -- uvx --with 'sqlite-graph-memory[embeddings]' sqlite-graph-memory
88
+ ```
89
+
90
+ **Cursor** (`~/.cursor/mcp.json`; Claude Desktop, Zed and Windsurf take the same `mcpServers` block)
91
+
92
+ ```json
93
+ {
94
+ "mcpServers": {
95
+ "sqlite-graph-memory": {
96
+ "command": "uvx",
97
+ "args": ["--with", "sqlite-graph-memory[embeddings]", "sqlite-graph-memory"],
98
+ "env": { "BRAIN_INDEX_DIR": "/absolute/path/to/.sgm-index" }
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+ **VS Code** (`.vscode/mcp.json` in the workspace)
105
+
106
+ ```json
107
+ {
108
+ "servers": {
109
+ "sqlite-graph-memory": {
110
+ "type": "stdio",
111
+ "command": "uvx",
112
+ "args": ["--with", "sqlite-graph-memory[embeddings]", "sqlite-graph-memory"],
113
+ "env": { "BRAIN_INDEX_DIR": "/absolute/path/to/.sgm-index" }
114
+ }
115
+ }
116
+ }
117
+ ```
118
+
119
+ **Codex** (`~/.codex/config.toml`)
120
+
121
+ ```toml
122
+ [mcp_servers.sqlite-graph-memory]
123
+ command = "uvx"
124
+ args = ["--with", "sqlite-graph-memory[embeddings]", "sqlite-graph-memory"]
125
+ env = { BRAIN_INDEX_DIR = "/absolute/path/to/.sgm-index" }
126
+ ```
127
+
128
+ Size, `du -sh` of a fresh Python 3.12 venv on an x86_64 Mac (1 Nov 2026): the base install is
129
+ 26 MB and has no torch (numpy only, enough for the graph half and the SQLite ledger);
130
+ with `[embeddings]`, which indexing and recall need, it is 879 MB, 540 MB of that torch 2.2.2
131
+ CPU. On Linux the default torch wheel brings CUDA libraries and is bigger; not measured here.
132
+ Already installed with pip? Replace `uvx --with ... sqlite-graph-memory` by `sgm-mcp`
133
+ ([`examples/mcp-config.json`](examples/mcp-config.json)). Agents that read files first:
134
+ [`llms.txt`](llms.txt).
135
+
67
136
  ## Three commands
68
137
 
69
138
  ```bash
@@ -110,14 +179,6 @@ That is the idea in one query, and it is not a blanket win. On this same vault v
110
179
  ranks ahead of graph mode overall; the numbers are in [`bench/`](bench/README.md). `--ab`
111
180
  exists so you can measure which one wins on your own notes.
112
181
 
113
- **From any MCP client** (Claude Desktop, Cursor, Zed, Windsurf): `sgm-mcp` after the install
114
- above, or `uvx --with 'sqlite-graph-memory[embeddings]' sqlite-graph-memory`. Set
115
- `BRAIN_INDEX_DIR` to the `index` folder `sgm-index` wrote. Config:
116
- [`examples/mcp-config.json`](examples/mcp-config.json). Claude Code:
117
- `claude mcp add sqlite-graph-memory -e BRAIN_INDEX_DIR=/path/to/index -- sgm-mcp`.
118
- Codex: a `[mcp_servers.sqlite-graph-memory]` table in `~/.codex/config.toml` with
119
- `command = "sgm-mcp"`. Agents that read files first: [`llms.txt`](llms.txt).
120
-
121
182
  ## What it is
122
183
 
123
184
  Graph RAG on SQLite for AI agents — a working pilot, not a framework. It is the extracted
@@ -126,7 +187,7 @@ points, the `[[wikilinks]]` you already wrote by hand are the graph, and a cross
126
187
  reranks what the hop dragged in.
127
188
  SQLite is the only database ([`schema.sql`](src/sqlite_graph_memory/schema.sql)).
128
189
 
129
- Status: **pilot**, and the word is load-bearing: it runs daily in one real setup (a ~100k-note
190
+ Status: **pilot**, and the word is load-bearing: it runs daily in one real setup (an index of ~28k curated notes, ~93k chunks, rebuilt nightly from a ~270k-file
130
191
  Obsidian vault driven by Claude Code), but it is deliberately minimal and makes no attempt
131
192
  to be general — see [What's intentionally missing](#whats-intentionally-missing), which is
132
193
  where the uneven test coverage is described.
@@ -144,7 +205,7 @@ For a single-user agent over a markdown knowledge base, all three are overkill:
144
205
  edges as `[[wikilinks]]`, and `brain_ask.py` just parses them.
145
206
  No extraction pass, and edge quality beats anything a model would mine.
146
207
  - **SQLite is enough** — the only things worth persisting are derived state (a per-turn
147
- ledger) and telemetry, and both are defined in [`schema.sql`](schema.sql).
208
+ ledger) and telemetry, and both are defined in [`schema.sql`](src/sqlite_graph_memory/schema.sql).
148
209
  One file, stdlib driver, zero ops.
149
210
  - The expensive part of RAG quality is a **reranker**, not graph infrastructure — see the
150
211
  rerank step in `brain_ask.py`.
@@ -176,7 +237,7 @@ markdown notes (with [[wikilinks]])
176
237
  turnstate_show.py = read-only viewer.
177
238
  ```
178
239
 
179
- [`schema.sql`](schema.sql) documents both tables. The graph is **not** materialized in SQL:
240
+ [`schema.sql`](src/sqlite_graph_memory/schema.sql) documents both tables. The graph is **not** materialized in SQL:
180
241
  `brain_ask.py` parses edges from the notes at query time, bounded to 1 hop / 40 neighbours.
181
242
  That keeps the graph permanently in sync with the notes at zero maintenance cost; materialize
182
243
  an edge table only when hop depth or corpus size demands it.
@@ -196,7 +257,7 @@ an edge table only when hop depth or corpus size demands it.
196
257
  vector-only recall, no ledger row.
197
258
  A memory layer must never make the agent worse than having no memory layer.
198
259
  - **Measure, don't believe.** `--ab` runs both pipelines on every real query and logs how
199
- many notes the graph promoted into the top-N, to `ab_recall` in [`schema.sql`](schema.sql).
260
+ many notes the graph promoted into the top-N, to `ab_recall` in [`schema.sql`](src/sqlite_graph_memory/schema.sql).
200
261
  Whether "associative memory" earns its keep is a weekly SQL query, not a vibe.
201
262
 
202
263
  ### What's intentionally missing
@@ -252,7 +313,7 @@ present, and CPU works fine for small corpora.
252
313
 
253
314
  ### What `--ab` looks like
254
315
 
255
- Output of `brain_ask.py` with `--ab`, on a toy 4-note corpus (real runs use a ~100k-note vault):
316
+ Output of `brain_ask.py` with `--ab`, on a toy 4-note corpus (real runs use an index of ~28k notes / ~93k chunks):
256
317
 
257
318
  ```
258
319
  A/B RECALL: how should agent memory work
@@ -273,7 +334,7 @@ A/B RECALL: how should agent memory work
273
334
 
274
335
  On a corpus this small the graph adds nothing — every note is already in the candidate
275
336
  pool. The interesting deltas appear at scale, and that is exactly what the `ab_recall`
276
- table in [`schema.sql`](schema.sql) accumulates evidence for.
337
+ table in [`schema.sql`](src/sqlite_graph_memory/schema.sql) accumulates evidence for.
277
338
 
278
339
  ## Public benchmark — `bench/`
279
340
 
@@ -402,6 +463,11 @@ Seven other changes were rejected by the same ruler, under one rule fixed in adv
402
463
  | `sqlite-vec` (vec0) | full scan 11.99 s vs 0.14 s for a plain SQLite table, and its ANN missed 1.2 hits of 60 -> vectors live in SQLite, **the extension does not** |
403
464
  | bi-temporal demotion of superseded notes | temporal +0.130 nDCG on a 41-question temporal set, but title −0.012 -> **merged behind a flag, default off** (in the home pipeline, not in this package) |
404
465
 
466
+ The two rows marked "home pipeline" are not in this package: BM25 fusion and superseded-note
467
+ demotion exist only in the maintainer's home build. Check it yourself in a clone:
468
+ `grep -rniE 'bm25|superseded' src/` prints nothing. The PageRank lane above is the one
469
+ merged change that ships (`src/sqlite_graph_memory/ppr.py`).
470
+
405
471
  None of those verdicts is a claim about the models. They are claims about *this corpus with
406
472
  this ruler*, which is the only kind of claim a swap decision actually needs — and the reason
407
473
  the module is here rather than in a blog post is that your corpus will disagree with ours.
@@ -422,7 +488,7 @@ while the metric is broken never tested the metric.
422
488
 
423
489
  ## Roadmap
424
490
 
425
- **Now — [latest release](https://github.com/tonydzi/sqlite-graph-memory/releases/latest)** (v0.3.1 on PyPI and in the MCP Registry as of 2026-10-19).
491
+ **Now — [latest release](https://github.com/tonydzi/sqlite-graph-memory/releases/latest)** (the version badge above is the one on PyPI; the same version is in the MCP Registry).
426
492
  The pilot as it runs daily: retrieval pipeline, per-turn ledger and A/B telemetry, all in
427
493
  `brain_ask.py` and `turnstate_hook.py`, plus the bi-temporal design note. Known defects live in
428
494
  the [tracker](https://github.com/tonydzi/sqlite-graph-memory/issues) rather than in footnotes
@@ -441,7 +507,8 @@ does not notice, and that drift is the defect this paragraph used to carry twice
441
507
  materialize the graph instead of parsing it at query time, give every edge a validity
442
508
  window (`valid_from` / `valid_to` / `observed_at`) so a rebuild *closes* superseded facts
443
509
  instead of deleting them: history is kept, recall prefers the present, and `as_of` queries
444
- can reconstruct the past. Non-destructive aging by confidence decay. The day-1 A/B result
510
+ can reconstruct the past. Non-destructive aging by confidence decay. None of this is in
511
+ the package yet: it is a design note plus a home-pipeline experiment. The day-1 A/B result
445
512
  — context size ~unchanged, retrieved candidates ~60% fresher by mean age — is written up
446
513
  with its caveats in `docs/bitemporal.md`: the volume win is longitudinal, so that is one
447
514
  day on one corpus, not a benchmark.
@@ -491,6 +558,17 @@ Questions, war stories, or you want to run this on your own fleet:
491
558
  - 🌐 [palo-alto.ai](https://palo-alto.ai) · [Palo Alto AI Research Lab](https://github.com/tonydzi)
492
559
  - 🧪 **Engineers: want to test-drive this setup?** Message me — I hand out free starter seeds to engineers who test and report back.
493
560
 
561
+ ## Tell us what is missing
562
+
563
+ You tried this on your own notes and something was missing or broke. That is the most useful
564
+ thing anyone can tell us.
565
+
566
+ - **Install or first run gone wrong:** run `sgm-doctor` first. It checks Python, numpy, torch, the models and your index in plain words and prints the fix for each.
567
+ - **You started and it did not work:** [open the 3-question form](https://github.com/tonydzi/sqlite-graph-memory/issues/new?template=feature_request.yml) (what you tried, what broke, which machine).
568
+ - **Not sure it is a bug, or just an idea:** [Discussions → Ideas](https://github.com/tonydzi/sqlite-graph-memory/discussions/categories/ideas).
569
+
570
+ Nothing in this package phones home. There is no telemetry, so we only know what you write to us.
571
+
494
572
  ## Contributors welcome — and there is a queue
495
573
 
496
574
  Issues labelled [`accepted`](https://github.com/tonydzi/sqlite-graph-memory/issues?q=is%3Aissue+is%3Aopen+label%3Aaccepted)
@@ -0,0 +1,15 @@
1
+ sqlite_graph_memory/__init__.py,sha256=tqMLjmtW62GpxsI1IGGe5TYwaXqkVx0d1-bmFxOy2iE,1151
2
+ sqlite_graph_memory/brain_ask.py,sha256=rcXquak8fIYzKLPJL0GhrQGvbA0cVIcj805lNUjvcTY,19392
3
+ sqlite_graph_memory/doctor.py,sha256=zCdiOo9FIh_DKrDCUL3trI3q44xrtZTNVcFjL_XcD0o,5366
4
+ sqlite_graph_memory/index_notes.py,sha256=blm9lLlB5MSLB39tNYVtjVGULLQXTQGOth_LV4utyic,5378
5
+ sqlite_graph_memory/mcp_server.py,sha256=GItrJrtU34lGzamSD1ryEfL-Aq46W_J-4eDBZ3Pr_Wo,10218
6
+ sqlite_graph_memory/ppr.py,sha256=L7VSAiliXr8j3PH2hQqKbdgm08BPm6pZkLcckoMxAro,10001
7
+ sqlite_graph_memory/schema.sql,sha256=8aySXKw3Azaxyzqbd76mKTfOaDP7FlpkLXtgwA8ZVK4,2543
8
+ sqlite_graph_memory/turnstate_hook.py,sha256=fypGmUcHQkzlRN74tvIG07lr9uAXpp2GjetqthkuMc8,8641
9
+ sqlite_graph_memory/turnstate_show.py,sha256=IED7fmJQM5VgBNwxmEoNSZtujRmWja-qVPg5ckbWVnY,2909
10
+ sqlite_graph_memory/vault_stats.py,sha256=QYNGck556RDyLIVFH1C864su5tWehep1DHE21sSTi9g,8596
11
+ sqlite_graph_memory-0.3.5.dist-info/METADATA,sha256=ATapZ36CIk5AOwyHevNLQX3YqB7MTy7WX2j6JqNJV_I,36912
12
+ sqlite_graph_memory-0.3.5.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
13
+ sqlite_graph_memory-0.3.5.dist-info/entry_points.txt,sha256=lpoCm-jNjhBEtcQ16iIUd0ivr92Gr4c_fSRls2Zvbb0,432
14
+ sqlite_graph_memory-0.3.5.dist-info/licenses/LICENSE,sha256=p88nZdrfMUiES3_MpUEwhGmqz2hQFpyMh0k0cqdpfU8,1082
15
+ sqlite_graph_memory-0.3.5.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.32.4
2
+ Generator: hatchling 1.33.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,5 +1,6 @@
1
1
  [console_scripts]
2
2
  sgm-ask = sqlite_graph_memory.brain_ask:main
3
+ sgm-doctor = sqlite_graph_memory.doctor:main
3
4
  sgm-index = sqlite_graph_memory.index_notes:main
4
5
  sgm-mcp = sqlite_graph_memory.mcp_server:main
5
6
  sgm-stats = sqlite_graph_memory.vault_stats:main
@@ -1,14 +0,0 @@
1
- sqlite_graph_memory/__init__.py,sha256=UjsgczAXDPxFURyM2QPQpy5D1LYuVFJ8x-7KWPMKsHY,1151
2
- sqlite_graph_memory/brain_ask.py,sha256=v3Xn3uczigPxHvsfzoKtZOHmJdMwDjK9ZdP7HKUHkN4,19161
3
- sqlite_graph_memory/index_notes.py,sha256=Hmt0_VVJHS-zXhPPw9h2te8iG1W48f1tJ_H0ALt9aLk,5333
4
- sqlite_graph_memory/mcp_server.py,sha256=rYrEUVVnQ5KfZLGIt1Pcpm_6eGZIR37KDKDVSBtilWU,9848
5
- sqlite_graph_memory/ppr.py,sha256=L7VSAiliXr8j3PH2hQqKbdgm08BPm6pZkLcckoMxAro,10001
6
- sqlite_graph_memory/schema.sql,sha256=8aySXKw3Azaxyzqbd76mKTfOaDP7FlpkLXtgwA8ZVK4,2543
7
- sqlite_graph_memory/turnstate_hook.py,sha256=fypGmUcHQkzlRN74tvIG07lr9uAXpp2GjetqthkuMc8,8641
8
- sqlite_graph_memory/turnstate_show.py,sha256=IED7fmJQM5VgBNwxmEoNSZtujRmWja-qVPg5ckbWVnY,2909
9
- sqlite_graph_memory/vault_stats.py,sha256=QYNGck556RDyLIVFH1C864su5tWehep1DHE21sSTi9g,8596
10
- sqlite_graph_memory-0.3.2.dist-info/METADATA,sha256=ZZNMig7G0ZP5F0vHv7CPLLEXUpvQBWmWx6p6XTic3ME,32837
11
- sqlite_graph_memory-0.3.2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
12
- sqlite_graph_memory-0.3.2.dist-info/entry_points.txt,sha256=ggzirSEagKB7DZnMli9NUDiMuaog1oeBu_NpRPiKmr0,387
13
- sqlite_graph_memory-0.3.2.dist-info/licenses/LICENSE,sha256=p88nZdrfMUiES3_MpUEwhGmqz2hQFpyMh0k0cqdpfU8,1082
14
- sqlite_graph_memory-0.3.2.dist-info/RECORD,,