graph-engine-memory 0.6.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 (96) hide show
  1. graph_engine_memory-0.6.1/LICENSE +21 -0
  2. graph_engine_memory-0.6.1/PKG-INFO +125 -0
  3. graph_engine_memory-0.6.1/README.md +92 -0
  4. graph_engine_memory-0.6.1/graph_engine/__init__.py +1 -0
  5. graph_engine_memory-0.6.1/graph_engine/__main__.py +1275 -0
  6. graph_engine_memory-0.6.1/graph_engine/access.py +202 -0
  7. graph_engine_memory-0.6.1/graph_engine/agent_memory.py +103 -0
  8. graph_engine_memory-0.6.1/graph_engine/brain.py +731 -0
  9. graph_engine_memory-0.6.1/graph_engine/brain_engine.py +559 -0
  10. graph_engine_memory-0.6.1/graph_engine/communities.py +503 -0
  11. graph_engine_memory-0.6.1/graph_engine/consolidation.py +191 -0
  12. graph_engine_memory-0.6.1/graph_engine/context.py +203 -0
  13. graph_engine_memory-0.6.1/graph_engine/decay.py +65 -0
  14. graph_engine_memory-0.6.1/graph_engine/demo.py +165 -0
  15. graph_engine_memory-0.6.1/graph_engine/dream.py +408 -0
  16. graph_engine_memory-0.6.1/graph_engine/embedder.py +84 -0
  17. graph_engine_memory-0.6.1/graph_engine/engine.py +58 -0
  18. graph_engine_memory-0.6.1/graph_engine/entities.py +376 -0
  19. graph_engine_memory-0.6.1/graph_engine/evals.py +1206 -0
  20. graph_engine_memory-0.6.1/graph_engine/feedback.py +155 -0
  21. graph_engine_memory-0.6.1/graph_engine/gaps.py +209 -0
  22. graph_engine_memory-0.6.1/graph_engine/graph.py +133 -0
  23. graph_engine_memory-0.6.1/graph_engine/hygiene.py +213 -0
  24. graph_engine_memory-0.6.1/graph_engine/inference.py +251 -0
  25. graph_engine_memory-0.6.1/graph_engine/intent.py +207 -0
  26. graph_engine_memory-0.6.1/graph_engine/mcp/__init__.py +1 -0
  27. graph_engine_memory-0.6.1/graph_engine/mcp/agent/instructions.md +34 -0
  28. graph_engine_memory-0.6.1/graph_engine/mcp/format.py +66 -0
  29. graph_engine_memory-0.6.1/graph_engine/mcp/server.py +407 -0
  30. graph_engine_memory-0.6.1/graph_engine/merge.py +220 -0
  31. graph_engine_memory-0.6.1/graph_engine/model.py +56 -0
  32. graph_engine_memory-0.6.1/graph_engine/namespaces.py +74 -0
  33. graph_engine_memory-0.6.1/graph_engine/recall.py +161 -0
  34. graph_engine_memory-0.6.1/graph_engine/report.py +401 -0
  35. graph_engine_memory-0.6.1/graph_engine/reranker.py +86 -0
  36. graph_engine_memory-0.6.1/graph_engine/retrieval.py +296 -0
  37. graph_engine_memory-0.6.1/graph_engine/review.py +95 -0
  38. graph_engine_memory-0.6.1/graph_engine/runtime.py +83 -0
  39. graph_engine_memory-0.6.1/graph_engine/server.py +239 -0
  40. graph_engine_memory-0.6.1/graph_engine/similarity.py +42 -0
  41. graph_engine_memory-0.6.1/graph_engine/store.py +63 -0
  42. graph_engine_memory-0.6.1/graph_engine/suggester.py +63 -0
  43. graph_engine_memory-0.6.1/graph_engine/temporal.py +216 -0
  44. graph_engine_memory-0.6.1/graph_engine/tiers.py +135 -0
  45. graph_engine_memory-0.6.1/graph_engine/web/app.js +578 -0
  46. graph_engine_memory-0.6.1/graph_engine/web/index.html +169 -0
  47. graph_engine_memory-0.6.1/graph_engine/web/report.html +39 -0
  48. graph_engine_memory-0.6.1/graph_engine/web/report.js +50 -0
  49. graph_engine_memory-0.6.1/graph_engine/web/review.html +104 -0
  50. graph_engine_memory-0.6.1/graph_engine/web/review.js +211 -0
  51. graph_engine_memory-0.6.1/graph_engine_memory.egg-info/PKG-INFO +125 -0
  52. graph_engine_memory-0.6.1/graph_engine_memory.egg-info/SOURCES.txt +94 -0
  53. graph_engine_memory-0.6.1/graph_engine_memory.egg-info/dependency_links.txt +1 -0
  54. graph_engine_memory-0.6.1/graph_engine_memory.egg-info/entry_points.txt +3 -0
  55. graph_engine_memory-0.6.1/graph_engine_memory.egg-info/requires.txt +19 -0
  56. graph_engine_memory-0.6.1/graph_engine_memory.egg-info/top_level.txt +1 -0
  57. graph_engine_memory-0.6.1/pyproject.toml +53 -0
  58. graph_engine_memory-0.6.1/setup.cfg +4 -0
  59. graph_engine_memory-0.6.1/tests/test_access_namespaces.py +352 -0
  60. graph_engine_memory-0.6.1/tests/test_agent_memory.py +212 -0
  61. graph_engine_memory-0.6.1/tests/test_audit_fixes.py +865 -0
  62. graph_engine_memory-0.6.1/tests/test_brain.py +382 -0
  63. graph_engine_memory-0.6.1/tests/test_cli.py +553 -0
  64. graph_engine_memory-0.6.1/tests/test_communities.py +277 -0
  65. graph_engine_memory-0.6.1/tests/test_consolidation.py +347 -0
  66. graph_engine_memory-0.6.1/tests/test_context.py +141 -0
  67. graph_engine_memory-0.6.1/tests/test_decay.py +54 -0
  68. graph_engine_memory-0.6.1/tests/test_demo.py +83 -0
  69. graph_engine_memory-0.6.1/tests/test_dream.py +395 -0
  70. graph_engine_memory-0.6.1/tests/test_entities.py +396 -0
  71. graph_engine_memory-0.6.1/tests/test_episodic.py +223 -0
  72. graph_engine_memory-0.6.1/tests/test_evals.py +222 -0
  73. graph_engine_memory-0.6.1/tests/test_explain.py +208 -0
  74. graph_engine_memory-0.6.1/tests/test_fact_validity.py +186 -0
  75. graph_engine_memory-0.6.1/tests/test_feedback.py +124 -0
  76. graph_engine_memory-0.6.1/tests/test_frontend_xss.py +176 -0
  77. graph_engine_memory-0.6.1/tests/test_gaps.py +99 -0
  78. graph_engine_memory-0.6.1/tests/test_git_mode.py +141 -0
  79. graph_engine_memory-0.6.1/tests/test_graph.py +178 -0
  80. graph_engine_memory-0.6.1/tests/test_hygiene.py +166 -0
  81. graph_engine_memory-0.6.1/tests/test_hygiene_reports.py +159 -0
  82. graph_engine_memory-0.6.1/tests/test_ig_cycle_gate.py +65 -0
  83. graph_engine_memory-0.6.1/tests/test_inference.py +212 -0
  84. graph_engine_memory-0.6.1/tests/test_intent.py +50 -0
  85. graph_engine_memory-0.6.1/tests/test_mcp.py +424 -0
  86. graph_engine_memory-0.6.1/tests/test_memory_tiers.py +126 -0
  87. graph_engine_memory-0.6.1/tests/test_merge.py +216 -0
  88. graph_engine_memory-0.6.1/tests/test_recall.py +192 -0
  89. graph_engine_memory-0.6.1/tests/test_recall_idempotency.py +81 -0
  90. graph_engine_memory-0.6.1/tests/test_report.py +224 -0
  91. graph_engine_memory-0.6.1/tests/test_retrieval.py +43 -0
  92. graph_engine_memory-0.6.1/tests/test_review.py +202 -0
  93. graph_engine_memory-0.6.1/tests/test_server.py +80 -0
  94. graph_engine_memory-0.6.1/tests/test_server_errors.py +75 -0
  95. graph_engine_memory-0.6.1/tests/test_temporal.py +166 -0
  96. graph_engine_memory-0.6.1/tests/test_tools.py +236 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SaltKing0
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,125 @@
1
+ Metadata-Version: 2.4
2
+ Name: graph-engine-memory
3
+ Version: 0.6.1
4
+ Summary: Self-growing idea graph: Ingest β†’ Embed β†’ Suggest β†’ Visualize. A generic engine for a persistent knowledge graph backed by your own private git repo (the 'brain').
5
+ Author: SaltKing0
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/SaltKing0/graph-engine
8
+ Project-URL: Repository, https://github.com/SaltKing0/graph-engine
9
+ Project-URL: Issues, https://github.com/SaltKing0/graph-engine/issues
10
+ Project-URL: Changelog, https://github.com/SaltKing0/graph-engine/blob/main/CHANGELOG.md
11
+ Project-URL: PyPI, https://pypi.org/project/graph-engine-memory/
12
+ Keywords: knowledge-graph,memory,agent,embeddings,rag,zettelkasten
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Classifier: Environment :: Web Environment
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: fastapi==0.141.1
21
+ Requires-Dist: uvicorn[standard]==0.35.0
22
+ Requires-Dist: httpx==0.28.1
23
+ Requires-Dist: numpy==2.3.1; python_version < "3.14"
24
+ Requires-Dist: numpy>=2.3.2; python_version >= "3.14"
25
+ Provides-Extra: st
26
+ Requires-Dist: sentence-transformers==5.0.0; extra == "st"
27
+ Provides-Extra: mcp
28
+ Requires-Dist: mcp<2,>=1.28; extra == "mcp"
29
+ Requires-Dist: sse-starlette<3,>=1.6.1; extra == "mcp"
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest==8.4.0; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # GraphEngine πŸ•ΈοΈ
35
+
36
+ **A Git-backed knowledge graph for agents and humans.**
37
+
38
+ Store knowledge as Markdown in your own private repository. GraphEngine adds
39
+ search, relationships, memory maintenance and a web UI, with every change
40
+ recorded in Git.
41
+
42
+ ![GraphEngine β€” demo brain in the web UI](docs/screenshot.png)
43
+
44
+ - Search with embeddings and BM25; explain results and graph connections.
45
+ - Extract entities and facts with source evidence and a review queue.
46
+ - Consolidate observations, organize memory into tiers and learn from feedback.
47
+ - Connect agents through the CLI, HTTP API or optional MCP server.
48
+ - Keep separate graphs with optional role and node access control.
49
+
50
+ ## Quickstart
51
+
52
+ Requires **Python 3.11+** and **Git**. These instructions use current `main`;
53
+ published packages may have fewer features.
54
+
55
+ ```bash
56
+ git clone https://github.com/SaltKing0/graph-engine.git
57
+ cd graph-engine
58
+ python3 -m venv .venv
59
+ source .venv/bin/activate
60
+ python -m pip install -e ".[dev]"
61
+
62
+ export IG_BRAIN_PATH="$PWD/demo-brain"
63
+ export IDEAGRAPH_EMBEDDER=hash
64
+ ig init --demo
65
+ python -m uvicorn graph_engine.server:app --host 127.0.0.1 --port 8000
66
+ ```
67
+
68
+ Open <http://localhost:8000>. The demo uses deterministic hash embeddings with
69
+ no model download. For semantic search, install `python -m pip install -e ".[st]"`
70
+ and set `IDEAGRAPH_EMBEDDER=st` before starting a fresh brain.
71
+
72
+ On Windows, activate with `.venv\Scripts\Activate.ps1` and set environment
73
+ variables using PowerShell's `$env:NAME="value"` syntax.
74
+
75
+ For a released package, use `python -m pip install graph-engine-memory` in a virtual
76
+ environment. Optional extras: `[st]` for semantic embeddings, `[mcp]` for MCP.
77
+
78
+ Version 0.6.1 is the first PyPI release under the `graph-engine-memory` package name
79
+ (previously `ideagraph-live`). Install it in a fresh virtual environment and
80
+ point `IG_BRAIN_PATH` at your existing brain. The `ig` commands remain;
81
+ Python imports and the uvicorn module now use `graph_engine` instead of
82
+ `ideagraph`.
83
+
84
+ ## Everyday use
85
+
86
+ ```bash
87
+ ig ingest "User prefers short answers" --source agent
88
+ ig search "answer preferences"
89
+ ig entities "Alice works at Acme." --dry-run --json
90
+ ig pending
91
+ ig accept <edge_id>
92
+ ig explain <node_id> --query "answer preferences"
93
+ ig dream # preview memory maintenance
94
+ ```
95
+
96
+ For your own brain, set `IG_BRAIN_PATH` and run `ig init` without `--demo`.
97
+ The default path is `~/graph-engine-brain`. Connect a private remote with
98
+ `ig init --remote <url>`; Git mode commits changes and syncs with that remote.
99
+ Use one writer process per brain.
100
+
101
+ To connect an MCP client, install the MCP extra and run `ig mcp`.
102
+ It is read-only by default; `ig mcp --write` enables remember, recall and forget.
103
+ See the [MCP setup](docs/guide.md#mcp-server-ai-assistants) for client configuration.
104
+
105
+ ## Documentation
106
+
107
+ - [CLI reference](docs/guide.md#cli) and [configuration](docs/guide.md#configuration)
108
+ - [Entities and facts](docs/guide.md#extract-entities-and-facts)
109
+ - [Memory lifecycle](docs/guide.md#memory-lifecycle-promotion-and-decay),
110
+ [storage tiers and feedback](docs/guide.md#storage-tiers-and-retrieval-feedback)
111
+ - [Isolated graphs and access control](docs/guide.md#isolated-graphs-and-access-control)
112
+ - [Known limitations](docs/guide.md#known-limitations)
113
+ - [Changelog](CHANGELOG.md) and [contributing](CONTRIBUTING.md)
114
+
115
+ The engine is public; your brain is a separate repository under your control.
116
+ Extracted facts and heuristic relationships are claims to review, not verified truth.
117
+
118
+ ## Development
119
+
120
+ ```bash
121
+ python -m pip install -e ".[dev,mcp]"
122
+ python -m pytest tests/ -q
123
+ ```
124
+
125
+ MIT β€” see [LICENSE](LICENSE).
@@ -0,0 +1,92 @@
1
+ # GraphEngine πŸ•ΈοΈ
2
+
3
+ **A Git-backed knowledge graph for agents and humans.**
4
+
5
+ Store knowledge as Markdown in your own private repository. GraphEngine adds
6
+ search, relationships, memory maintenance and a web UI, with every change
7
+ recorded in Git.
8
+
9
+ ![GraphEngine β€” demo brain in the web UI](docs/screenshot.png)
10
+
11
+ - Search with embeddings and BM25; explain results and graph connections.
12
+ - Extract entities and facts with source evidence and a review queue.
13
+ - Consolidate observations, organize memory into tiers and learn from feedback.
14
+ - Connect agents through the CLI, HTTP API or optional MCP server.
15
+ - Keep separate graphs with optional role and node access control.
16
+
17
+ ## Quickstart
18
+
19
+ Requires **Python 3.11+** and **Git**. These instructions use current `main`;
20
+ published packages may have fewer features.
21
+
22
+ ```bash
23
+ git clone https://github.com/SaltKing0/graph-engine.git
24
+ cd graph-engine
25
+ python3 -m venv .venv
26
+ source .venv/bin/activate
27
+ python -m pip install -e ".[dev]"
28
+
29
+ export IG_BRAIN_PATH="$PWD/demo-brain"
30
+ export IDEAGRAPH_EMBEDDER=hash
31
+ ig init --demo
32
+ python -m uvicorn graph_engine.server:app --host 127.0.0.1 --port 8000
33
+ ```
34
+
35
+ Open <http://localhost:8000>. The demo uses deterministic hash embeddings with
36
+ no model download. For semantic search, install `python -m pip install -e ".[st]"`
37
+ and set `IDEAGRAPH_EMBEDDER=st` before starting a fresh brain.
38
+
39
+ On Windows, activate with `.venv\Scripts\Activate.ps1` and set environment
40
+ variables using PowerShell's `$env:NAME="value"` syntax.
41
+
42
+ For a released package, use `python -m pip install graph-engine-memory` in a virtual
43
+ environment. Optional extras: `[st]` for semantic embeddings, `[mcp]` for MCP.
44
+
45
+ Version 0.6.1 is the first PyPI release under the `graph-engine-memory` package name
46
+ (previously `ideagraph-live`). Install it in a fresh virtual environment and
47
+ point `IG_BRAIN_PATH` at your existing brain. The `ig` commands remain;
48
+ Python imports and the uvicorn module now use `graph_engine` instead of
49
+ `ideagraph`.
50
+
51
+ ## Everyday use
52
+
53
+ ```bash
54
+ ig ingest "User prefers short answers" --source agent
55
+ ig search "answer preferences"
56
+ ig entities "Alice works at Acme." --dry-run --json
57
+ ig pending
58
+ ig accept <edge_id>
59
+ ig explain <node_id> --query "answer preferences"
60
+ ig dream # preview memory maintenance
61
+ ```
62
+
63
+ For your own brain, set `IG_BRAIN_PATH` and run `ig init` without `--demo`.
64
+ The default path is `~/graph-engine-brain`. Connect a private remote with
65
+ `ig init --remote <url>`; Git mode commits changes and syncs with that remote.
66
+ Use one writer process per brain.
67
+
68
+ To connect an MCP client, install the MCP extra and run `ig mcp`.
69
+ It is read-only by default; `ig mcp --write` enables remember, recall and forget.
70
+ See the [MCP setup](docs/guide.md#mcp-server-ai-assistants) for client configuration.
71
+
72
+ ## Documentation
73
+
74
+ - [CLI reference](docs/guide.md#cli) and [configuration](docs/guide.md#configuration)
75
+ - [Entities and facts](docs/guide.md#extract-entities-and-facts)
76
+ - [Memory lifecycle](docs/guide.md#memory-lifecycle-promotion-and-decay),
77
+ [storage tiers and feedback](docs/guide.md#storage-tiers-and-retrieval-feedback)
78
+ - [Isolated graphs and access control](docs/guide.md#isolated-graphs-and-access-control)
79
+ - [Known limitations](docs/guide.md#known-limitations)
80
+ - [Changelog](CHANGELOG.md) and [contributing](CONTRIBUTING.md)
81
+
82
+ The engine is public; your brain is a separate repository under your control.
83
+ Extracted facts and heuristic relationships are claims to review, not verified truth.
84
+
85
+ ## Development
86
+
87
+ ```bash
88
+ python -m pip install -e ".[dev,mcp]"
89
+ python -m pytest tests/ -q
90
+ ```
91
+
92
+ MIT β€” see [LICENSE](LICENSE).
@@ -0,0 +1 @@
1
+ """GraphEngine."""