sqlite-graph-memory 0.3.3__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.
- sqlite_graph_memory/__init__.py +1 -1
- sqlite_graph_memory/doctor.py +133 -0
- sqlite_graph_memory/mcp_server.py +10 -2
- {sqlite_graph_memory-0.3.3.dist-info → sqlite_graph_memory-0.3.5.dist-info}/METADATA +87 -19
- sqlite_graph_memory-0.3.5.dist-info/RECORD +15 -0
- {sqlite_graph_memory-0.3.3.dist-info → sqlite_graph_memory-0.3.5.dist-info}/WHEEL +1 -1
- {sqlite_graph_memory-0.3.3.dist-info → sqlite_graph_memory-0.3.5.dist-info}/entry_points.txt +1 -0
- sqlite_graph_memory-0.3.3.dist-info/RECORD +0 -14
- {sqlite_graph_memory-0.3.3.dist-info → sqlite_graph_memory-0.3.5.dist-info}/licenses/LICENSE +0 -0
sqlite_graph_memory/__init__.py
CHANGED
|
@@ -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())
|
|
@@ -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 (
|
|
@@ -136,7 +144,7 @@ def run_recall(query: str, mode: str = "associative") -> tuple[str, bool]:
|
|
|
136
144
|
text=True,
|
|
137
145
|
encoding="utf-8",
|
|
138
146
|
errors="replace",
|
|
139
|
-
timeout=
|
|
147
|
+
timeout=recall_timeout
|
|
140
148
|
)
|
|
141
149
|
if res.returncode != 0:
|
|
142
150
|
err = (res.stderr or res.stdout or "").strip()
|
|
@@ -153,7 +161,7 @@ def run_recall(query: str, mode: str = "associative") -> tuple[str, bool]:
|
|
|
153
161
|
# Empty answer file: return explicit message and flag error so agent does not ingest stdout noise
|
|
154
162
|
return "(no matching notes found)", True
|
|
155
163
|
except subprocess.TimeoutExpired:
|
|
156
|
-
return "Recall error: timed out after
|
|
164
|
+
return f"Recall error: timed out after {recall_timeout} seconds.", True
|
|
157
165
|
except Exception as e:
|
|
158
166
|
return f"Recall exception: {e}", True
|
|
159
167
|
finally:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sqlite-graph-memory
|
|
3
|
-
Version: 0.3.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+

|
|
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
|
+
[](https://pypi.org/project/sqlite-graph-memory/) [](https://github.com/tonydzi/sqlite-graph-memory/actions/workflows/tests.yml) [](https://registry.modelcontextprotocol.io/v0/servers?search=sqlite-graph-memory) [](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
|
|
@@ -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
|
|
@@ -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)** (
|
|
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.
|
|
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.
|
|
@@ -496,6 +563,7 @@ Questions, war stories, or you want to run this on your own fleet:
|
|
|
496
563
|
You tried this on your own notes and something was missing or broke. That is the most useful
|
|
497
564
|
thing anyone can tell us.
|
|
498
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.
|
|
499
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).
|
|
500
568
|
- **Not sure it is a bug, or just an idea:** [Discussions → Ideas](https://github.com/tonydzi/sqlite-graph-memory/discussions/categories/ideas).
|
|
501
569
|
|
|
@@ -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,14 +0,0 @@
|
|
|
1
|
-
sqlite_graph_memory/__init__.py,sha256=2xKSCi2vAjRyWsMf6N3Sd9-Znk0IYgmoSc_RzwKM6go,1151
|
|
2
|
-
sqlite_graph_memory/brain_ask.py,sha256=rcXquak8fIYzKLPJL0GhrQGvbA0cVIcj805lNUjvcTY,19392
|
|
3
|
-
sqlite_graph_memory/index_notes.py,sha256=blm9lLlB5MSLB39tNYVtjVGULLQXTQGOth_LV4utyic,5378
|
|
4
|
-
sqlite_graph_memory/mcp_server.py,sha256=XSCd2qJPvAcw9X-81YJzXeAlwL_Ss9soh9kDUqPQ3aQ,9817
|
|
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.3.dist-info/METADATA,sha256=OQVb_K2tbcV2Do83KtG7JlRPLTWnr2ZzNYvBpYhYIiw,33515
|
|
11
|
-
sqlite_graph_memory-0.3.3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
12
|
-
sqlite_graph_memory-0.3.3.dist-info/entry_points.txt,sha256=ggzirSEagKB7DZnMli9NUDiMuaog1oeBu_NpRPiKmr0,387
|
|
13
|
-
sqlite_graph_memory-0.3.3.dist-info/licenses/LICENSE,sha256=p88nZdrfMUiES3_MpUEwhGmqz2hQFpyMh0k0cqdpfU8,1082
|
|
14
|
-
sqlite_graph_memory-0.3.3.dist-info/RECORD,,
|
{sqlite_graph_memory-0.3.3.dist-info → sqlite_graph_memory-0.3.5.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|