sqlite-graph-memory 0.3.0__tar.gz → 0.3.1__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.
Files changed (30) hide show
  1. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/CHANGELOG.md +27 -0
  2. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/PKG-INFO +53 -8
  3. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/README.md +49 -6
  4. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/pyproject.toml +15 -2
  5. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/src/sqlite_graph_memory/__init__.py +1 -1
  6. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/src/sqlite_graph_memory/mcp_server.py +3 -1
  7. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/tests/test_mcp_server.py +5 -0
  8. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/.gitignore +0 -0
  9. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/CITATION.cff +0 -0
  10. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/LICENSE +0 -0
  11. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/bench/README.md +0 -0
  12. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/bench/requirements.txt +0 -0
  13. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/docs/RELEASING.md +0 -0
  14. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/docs/bitemporal.md +0 -0
  15. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/eval/build_gold.py +0 -0
  16. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/eval/run_eval.py +0 -0
  17. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/examples/README.md +0 -0
  18. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/examples/claude-code-stop-hook.json +0 -0
  19. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/examples/mcp-config.json +0 -0
  20. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/requirements.txt +0 -0
  21. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/src/sqlite_graph_memory/brain_ask.py +0 -0
  22. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/src/sqlite_graph_memory/index_notes.py +0 -0
  23. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/src/sqlite_graph_memory/schema.sql +0 -0
  24. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/src/sqlite_graph_memory/turnstate_hook.py +0 -0
  25. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/src/sqlite_graph_memory/turnstate_show.py +0 -0
  26. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/tests/test_bench.py +0 -0
  27. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/tests/test_brain_ask.py +0 -0
  28. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/tests/test_eval.py +0 -0
  29. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/tests/test_index_notes.py +0 -0
  30. {sqlite_graph_memory-0.3.0 → sqlite_graph_memory-0.3.1}/tests/test_optional_extra.py +0 -0
@@ -4,6 +4,31 @@ What shipped, in plain words. Entries below v0.1.3 were written on 2026-09-05 fr
4
4
  release notes that already existed — the file itself did not exist until then, so those three are
5
5
  recorded after the fact rather than backdated to look contemporaneous.
6
6
 
7
+ ## v0.3.1 — unreleased
8
+
9
+ **Credit where it is due.** The MCP server that ships as `sgm-mcp` was written by Vardhman Gupta
10
+ ([@Kaap10](https://github.com/Kaap10)) in PR #8: the server, its tests and its docs. His
11
+ follow-up fixes are the shared answer-file race (commit 3ce7061), the stdout fallback (PR #10)
12
+ and the swallowed read errors (PR #14).
13
+ He is now listed in the `authors` field of `pyproject.toml`, which is the attribution he asked for.
14
+
15
+ **Indexing works on Intel Macs again.** A fresh `pip install 'sqlite-graph-memory[embeddings]'`
16
+ on an x86_64 Mac with Python 3.12 crashed `sgm-index` with `NameError: name 'nn' is not
17
+ defined`. Torch stops at 2.2 there, transformers 5.x needs 2.6 and quietly disables torch,
18
+ and sentence-transformers 6.x requires transformers 5.x. The embeddings extra now caps
19
+ transformers below 4.50 and sentence-transformers below 5 on that one platform. Measured
20
+ both ways on the same machine: 0.3.0 from PyPI crashes, this build indexes the 202-note
21
+ bench vault cleanly (204 chunks).
22
+
23
+ **Listed in the official MCP Registry.** `server.json` describes the server as
24
+ `io.github.tonydzi/sqlite-graph-memory`, the README carries the `mcp-name` line the registry
25
+ checks, and the publish workflow lists the release after PyPI has it. The package also
26
+ installs the MCP server under its own name, `sqlite-graph-memory`, so registry clients can
27
+ start it with `uvx`.
28
+
29
+ **The README opens with three commands and their real output** on the bench vault, including
30
+ the honest caveat that vector-only ranks ahead of graph mode on that vault overall.
31
+
7
32
  ## bench-v0.1 — 2026-10-09
8
33
 
9
34
  **A benchmark other people can run.** Until now every retrieval number in this repo came from
@@ -24,6 +49,8 @@ On this vault, vector-only ranks ahead of graph mode. All of it is written out i
24
49
 
25
50
  ## v0.3.0 — 2026-10-07
26
51
 
52
+ *Release record, added 2026-10-16: the package went to PyPI on 2026-10-15 and this GitHub release object was cut a day later, so the tag points at a commit slightly after the upload (it adds only the workflow's `skip-existing` flag). Also in 0.3.0 as uploaded: the embeddings extra pins `numpy<2` on Intel Macs, where torch stops at 2.2.*
53
+
27
54
  **You can install it now.** For three months this was a repository you had to clone, and for
28
55
  an engineer deciding whether to try something, a clone is a much bigger ask than a command.
29
56
  There is now a `pyproject.toml`, the modules live in `src/sqlite_graph_memory/`, and
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: sqlite-graph-memory
3
- Version: 0.3.0
3
+ Version: 0.3.1
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
7
7
  Project-URL: Changelog, https://github.com/tonydzi/sqlite-graph-memory/blob/main/CHANGELOG.md
8
8
  Project-URL: Issues, https://github.com/tonydzi/sqlite-graph-memory/issues
9
- Author: Anton Dziatkovskii
9
+ Author: Anton Dziatkovskii, Vardhman Gupta
10
10
  License: MIT License
11
11
 
12
12
  Copyright (c) 2026 Palo Alto AI Research Lab
@@ -44,22 +44,67 @@ Requires-Python: >=3.9
44
44
  Requires-Dist: numpy>=1.24
45
45
  Provides-Extra: embeddings
46
46
  Requires-Dist: numpy<2; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'embeddings'
47
+ Requires-Dist: sentence-transformers<5; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'embeddings'
47
48
  Requires-Dist: sentence-transformers>=2.6; extra == 'embeddings'
49
+ Requires-Dist: transformers<4.50; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'embeddings'
48
50
  Description-Content-Type: text/markdown
49
51
 
50
52
  # sqlite-graph-memory
51
53
 
54
+ <!-- mcp-name: io.github.tonydzi/sqlite-graph-memory -->
55
+
52
56
  **Your agent forgets everything between sessions, and plain vector search gives it back
53
- flat, unrelated chunks. This gives it associative recall over your own markdown notes —
54
- one SQLite file, no graph database, no ETL pass, no server.**
57
+ flat, unrelated chunks. This gives it associative recall over your own markdown notes:
58
+ vector search finds the entry points, the `[[wikilinks]]` you already wrote are the graph.
59
+ One SQLite file, no graph database, no ETL pass, no server.**
60
+
61
+ ## Three commands
55
62
 
56
63
  ```bash
57
- pip install sqlite-graph-memory
64
+ pip install 'sqlite-graph-memory[embeddings]'
65
+ sgm-index ./notes
66
+ sgm-ask --ab "In which programming language is the tool behind Project Ouzel written?"
58
67
  ```
59
68
 
60
- > The first PyPI release has not landed yet (the publish workflow is in place).
61
- > Until it does: `pip install git+https://github.com/tonydzi/sqlite-graph-memory`
62
- > — same package, same five commands.
69
+ `./notes` is any folder of markdown notes. To get exactly the output below, use the
70
+ 202-note synthetic vault from this repo (it is not inside the pip package):
71
+
72
+ ```bash
73
+ git clone --depth 1 https://github.com/tonydzi/sqlite-graph-memory && cp -R sqlite-graph-memory/bench/vault ./notes
74
+ ```
75
+
76
+ Real output, top 5 of 12:
77
+
78
+ ```
79
+ --- DIRECT memory (vector) ---
80
+ 1. [ 1.66] project-ouzel
81
+ 2. [ -1.33] project-avocet
82
+ 3. [ -1.79] tool-cobbleset
83
+ 4. [ -2.44] meeting-2025-10-21-lighthouse-sync
84
+ 5. [ -2.70] person-severin-ibarrondo
85
+
86
+ --- ASSOCIATIVE memory (vector+graph) ---
87
+ 1. [ 1.66] project-ouzel
88
+ 2. [ 1.14] tool-lanternfish <== +graph
89
+ 3. [ -1.33] project-avocet
90
+ 4. [ -1.79] tool-cobbleset
91
+ 5. [ -2.44] meeting-2025-10-21-lighthouse-sync
92
+ ```
93
+
94
+ The answer lives in `tool-lanternfish` ("Lanternfish is written in Elixir"). The question
95
+ never names Lanternfish, so the vector pass does not find it in the top 12 at all.
96
+ `project-ouzel` links to it, so one graph hop puts it second.
97
+
98
+ That is the idea in one query, and it is not a blanket win. On this same vault vector-only
99
+ ranks ahead of graph mode overall; the numbers are in [`bench/`](bench/README.md). `--ab`
100
+ exists so you can measure which one wins on your own notes.
101
+
102
+ **From any MCP client** (Claude Desktop, Cursor, Zed, Windsurf): `sgm-mcp` after the install
103
+ above, or `uvx --with 'sqlite-graph-memory[embeddings]' sqlite-graph-memory`. Set
104
+ `BRAIN_INDEX_DIR` to the `index` folder `sgm-index` wrote. Config:
105
+ [`examples/mcp-config.json`](examples/mcp-config.json).
106
+
107
+ ## What it is
63
108
 
64
109
  Graph RAG on SQLite for AI agents — a working pilot, not a framework. It is the extracted
65
110
  memory layer of a personal "second brain" agent setup: vector search finds the entry
@@ -1,16 +1,59 @@
1
1
  # sqlite-graph-memory
2
2
 
3
+ <!-- mcp-name: io.github.tonydzi/sqlite-graph-memory -->
4
+
3
5
  **Your agent forgets everything between sessions, and plain vector search gives it back
4
- flat, unrelated chunks. This gives it associative recall over your own markdown notes —
5
- one SQLite file, no graph database, no ETL pass, no server.**
6
+ flat, unrelated chunks. This gives it associative recall over your own markdown notes:
7
+ vector search finds the entry points, the `[[wikilinks]]` you already wrote are the graph.
8
+ One SQLite file, no graph database, no ETL pass, no server.**
9
+
10
+ ## Three commands
6
11
 
7
12
  ```bash
8
- pip install sqlite-graph-memory
13
+ pip install 'sqlite-graph-memory[embeddings]'
14
+ sgm-index ./notes
15
+ sgm-ask --ab "In which programming language is the tool behind Project Ouzel written?"
9
16
  ```
10
17
 
11
- > The first PyPI release has not landed yet (the publish workflow is in place).
12
- > Until it does: `pip install git+https://github.com/tonydzi/sqlite-graph-memory`
13
- > — same package, same five commands.
18
+ `./notes` is any folder of markdown notes. To get exactly the output below, use the
19
+ 202-note synthetic vault from this repo (it is not inside the pip package):
20
+
21
+ ```bash
22
+ git clone --depth 1 https://github.com/tonydzi/sqlite-graph-memory && cp -R sqlite-graph-memory/bench/vault ./notes
23
+ ```
24
+
25
+ Real output, top 5 of 12:
26
+
27
+ ```
28
+ --- DIRECT memory (vector) ---
29
+ 1. [ 1.66] project-ouzel
30
+ 2. [ -1.33] project-avocet
31
+ 3. [ -1.79] tool-cobbleset
32
+ 4. [ -2.44] meeting-2025-10-21-lighthouse-sync
33
+ 5. [ -2.70] person-severin-ibarrondo
34
+
35
+ --- ASSOCIATIVE memory (vector+graph) ---
36
+ 1. [ 1.66] project-ouzel
37
+ 2. [ 1.14] tool-lanternfish <== +graph
38
+ 3. [ -1.33] project-avocet
39
+ 4. [ -1.79] tool-cobbleset
40
+ 5. [ -2.44] meeting-2025-10-21-lighthouse-sync
41
+ ```
42
+
43
+ The answer lives in `tool-lanternfish` ("Lanternfish is written in Elixir"). The question
44
+ never names Lanternfish, so the vector pass does not find it in the top 12 at all.
45
+ `project-ouzel` links to it, so one graph hop puts it second.
46
+
47
+ That is the idea in one query, and it is not a blanket win. On this same vault vector-only
48
+ ranks ahead of graph mode overall; the numbers are in [`bench/`](bench/README.md). `--ab`
49
+ exists so you can measure which one wins on your own notes.
50
+
51
+ **From any MCP client** (Claude Desktop, Cursor, Zed, Windsurf): `sgm-mcp` after the install
52
+ above, or `uvx --with 'sqlite-graph-memory[embeddings]' sqlite-graph-memory`. Set
53
+ `BRAIN_INDEX_DIR` to the `index` folder `sgm-index` wrote. Config:
54
+ [`examples/mcp-config.json`](examples/mcp-config.json).
55
+
56
+ ## What it is
14
57
 
15
58
  Graph RAG on SQLite for AI agents — a working pilot, not a framework. It is the extracted
16
59
  memory layer of a personal "second brain" agent setup: vector search finds the entry
@@ -4,12 +4,15 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sqlite-graph-memory"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "Associative memory for LLM agents: Graph RAG over a folder of markdown notes, in one SQLite file, with no server to run."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
11
11
  license = { file = "LICENSE" }
12
- authors = [{ name = "Anton Dziatkovskii" }]
12
+ authors = [
13
+ { name = "Anton Dziatkovskii" },
14
+ { name = "Vardhman Gupta" },
15
+ ]
13
16
  keywords = [
14
17
  "graph-rag",
15
18
  "agent-memory",
@@ -44,9 +47,16 @@ dependencies = ["numpy>=1.24"]
44
47
  # Intel Macs top out at torch 2.2.x, which is built against NumPy 1.x and dies on
45
48
  # NumPy 2 with "RuntimeError: Numpy is not available" (measured 2026-10-15 on an
46
49
  # x86_64 Mac, Python 3.9: sgm-index crashed; with numpy<2 it indexed cleanly).
50
+ # The same ceiling bites one layer up: transformers 5.x needs torch >= 2.6, so on
51
+ # torch 2.2 it disables torch and sgm-index dies with "NameError: name 'nn' is not
52
+ # defined" inside transformers/integrations/accelerate.py (measured 2026-10-15 on
53
+ # an x86_64 Mac, Python 3.12, fresh `pip install` from PyPI). sentence-transformers
54
+ # 6.x in turn requires transformers 5.x, so both are capped there.
47
55
  embeddings = [
48
56
  "sentence-transformers>=2.6",
49
57
  "numpy<2; sys_platform == 'darwin' and platform_machine == 'x86_64'",
58
+ "transformers<4.50; sys_platform == 'darwin' and platform_machine == 'x86_64'",
59
+ "sentence-transformers<5; sys_platform == 'darwin' and platform_machine == 'x86_64'",
50
60
  ]
51
61
 
52
62
  [project.urls]
@@ -61,6 +71,9 @@ sgm-ask = "sqlite_graph_memory.brain_ask:main"
61
71
  sgm-turnstate-hook = "sqlite_graph_memory.turnstate_hook:main"
62
72
  sgm-turnstate-show = "sqlite_graph_memory.turnstate_show:main"
63
73
  sgm-mcp = "sqlite_graph_memory.mcp_server:main"
74
+ # Same server under the package's own name, so `uvx sqlite-graph-memory` (what MCP
75
+ # registry clients run for a PyPI package) starts it without a --from flag.
76
+ sqlite-graph-memory = "sqlite_graph_memory.mcp_server:main"
64
77
 
65
78
  [tool.hatch.build.targets.wheel]
66
79
  packages = ["src/sqlite_graph_memory"]
@@ -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.0"
24
+ __version__ = "0.3.1"
25
25
 
26
26
  __all__ = ["__version__"]
@@ -22,6 +22,8 @@ Config (env, optional):
22
22
  import sys, os, json, subprocess, tempfile
23
23
  from pathlib import Path
24
24
 
25
+ from sqlite_graph_memory import __version__
26
+
25
27
  # Ensure UTF-8 for stdio communication on all platforms (including Windows console)
26
28
  try:
27
29
  sys.stdin.reconfigure(encoding='utf-8')
@@ -43,7 +45,7 @@ def _brain_ask_cmd():
43
45
 
44
46
  SERVER_INFO = {
45
47
  "name": "sqlite-graph-memory",
46
- "version": "0.3.0"
48
+ "version": __version__
47
49
  }
48
50
 
49
51
  TOOLS = [
@@ -12,6 +12,11 @@ from sqlite_graph_memory import mcp_server
12
12
 
13
13
 
14
14
 
15
+ def test_server_info_version_tracks_package():
16
+ from sqlite_graph_memory import __version__
17
+ assert SERVER_INFO["version"] == __version__
18
+
19
+
15
20
  def test_mcp_initialize():
16
21
  req = {
17
22
  "jsonrpc": "2.0",