genome-memory 1.0.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.
- genome_memory-1.0.0/LICENSE +201 -0
- genome_memory-1.0.0/NOTICE +7 -0
- genome_memory-1.0.0/PKG-INFO +307 -0
- genome_memory-1.0.0/README.md +244 -0
- genome_memory-1.0.0/genome/__init__.py +75 -0
- genome_memory-1.0.0/genome/adapters/__init__.py +10 -0
- genome_memory-1.0.0/genome/adapters/langchain.py +188 -0
- genome_memory-1.0.0/genome/adapters/llamaindex.py +133 -0
- genome_memory-1.0.0/genome/agent/__init__.py +41 -0
- genome_memory-1.0.0/genome/agent/memory.py +281 -0
- genome_memory-1.0.0/genome/agent/tools.py +173 -0
- genome_memory-1.0.0/genome/benchmark.py +235 -0
- genome_memory-1.0.0/genome/cli.py +59 -0
- genome_memory-1.0.0/genome/corpus.py +136 -0
- genome_memory-1.0.0/genome/dataset.py +35 -0
- genome_memory-1.0.0/genome/embeddings.py +152 -0
- genome_memory-1.0.0/genome/errors.py +84 -0
- genome_memory-1.0.0/genome/evals/__init__.py +30 -0
- genome_memory-1.0.0/genome/evals/baselines.py +409 -0
- genome_memory-1.0.0/genome/evals/llm_judge.py +346 -0
- genome_memory-1.0.0/genome/evals/locomo.py +1538 -0
- genome_memory-1.0.0/genome/evals/tempbelief.py +355 -0
- genome_memory-1.0.0/genome/evaluate.py +90 -0
- genome_memory-1.0.0/genome/mcp/__init__.py +4 -0
- genome_memory-1.0.0/genome/mcp/server.py +125 -0
- genome_memory-1.0.0/genome/memory/__init__.py +45 -0
- genome_memory-1.0.0/genome/memory/async_facade.py +348 -0
- genome_memory-1.0.0/genome/memory/belief.py +372 -0
- genome_memory-1.0.0/genome/memory/cache.py +157 -0
- genome_memory-1.0.0/genome/memory/conflict.py +179 -0
- genome_memory-1.0.0/genome/memory/consolidation.py +162 -0
- genome_memory-1.0.0/genome/memory/entities.py +337 -0
- genome_memory-1.0.0/genome/memory/extraction.py +197 -0
- genome_memory-1.0.0/genome/memory/facade.py +1388 -0
- genome_memory-1.0.0/genome/memory/graph.py +84 -0
- genome_memory-1.0.0/genome/memory/hybrid.py +89 -0
- genome_memory-1.0.0/genome/memory/postgres_store.py +537 -0
- genome_memory-1.0.0/genome/memory/raptor.py +261 -0
- genome_memory-1.0.0/genome/memory/rerank.py +68 -0
- genome_memory-1.0.0/genome/memory/schema.py +149 -0
- genome_memory-1.0.0/genome/memory/sqlite_store.py +402 -0
- genome_memory-1.0.0/genome/memory/store.py +117 -0
- genome_memory-1.0.0/genome/memory/temporal.py +351 -0
- genome_memory-1.0.0/genome/memory_benchmark.py +478 -0
- genome_memory-1.0.0/genome/metrics.py +114 -0
- genome_memory-1.0.0/genome/observability.py +411 -0
- genome_memory-1.0.0/genome/operators.py +188 -0
- genome_memory-1.0.0/genome/server/__init__.py +13 -0
- genome_memory-1.0.0/genome/server/__main__.py +25 -0
- genome_memory-1.0.0/genome/server/app.py +517 -0
- genome_memory-1.0.0/genome/server/models.py +176 -0
- genome_memory-1.0.0/genome/synthesis.py +183 -0
- genome_memory-1.0.0/genome/viz.py +67 -0
- genome_memory-1.0.0/genome_memory.egg-info/PKG-INFO +307 -0
- genome_memory-1.0.0/genome_memory.egg-info/SOURCES.txt +81 -0
- genome_memory-1.0.0/genome_memory.egg-info/dependency_links.txt +1 -0
- genome_memory-1.0.0/genome_memory.egg-info/entry_points.txt +3 -0
- genome_memory-1.0.0/genome_memory.egg-info/requires.txt +46 -0
- genome_memory-1.0.0/genome_memory.egg-info/top_level.txt +1 -0
- genome_memory-1.0.0/pyproject.toml +90 -0
- genome_memory-1.0.0/setup.cfg +4 -0
- genome_memory-1.0.0/tests/test_auto_consolidation.py +58 -0
- genome_memory-1.0.0/tests/test_auto_temporal.py +154 -0
- genome_memory-1.0.0/tests/test_benchmark.py +54 -0
- genome_memory-1.0.0/tests/test_conflict_resolution.py +396 -0
- genome_memory-1.0.0/tests/test_corpus.py +24 -0
- genome_memory-1.0.0/tests/test_dataset.py +19 -0
- genome_memory-1.0.0/tests/test_embeddings.py +23 -0
- genome_memory-1.0.0/tests/test_errors.py +75 -0
- genome_memory-1.0.0/tests/test_evaluate.py +13 -0
- genome_memory-1.0.0/tests/test_extraction_v2.py +53 -0
- genome_memory-1.0.0/tests/test_hybrid_search.py +87 -0
- genome_memory-1.0.0/tests/test_locomo_readiness_smoke.py +101 -0
- genome_memory-1.0.0/tests/test_metrics.py +96 -0
- genome_memory-1.0.0/tests/test_observability.py +900 -0
- genome_memory-1.0.0/tests/test_operators_baseline.py +33 -0
- genome_memory-1.0.0/tests/test_operators_crossover.py +122 -0
- genome_memory-1.0.0/tests/test_operators_mutation.py +40 -0
- genome_memory-1.0.0/tests/test_registry.py +27 -0
- genome_memory-1.0.0/tests/test_smoke.py +10 -0
- genome_memory-1.0.0/tests/test_synthesis.py +124 -0
- genome_memory-1.0.0/tests/test_thread_safety.py +44 -0
- genome_memory-1.0.0/tests/test_viz.py +36 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Northtek (FrostByte Digital LLC)
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: genome-memory
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: DNA-inspired memory layer for AI agents: zero-LLM-call ingestion, retrieval that beats full-context on overflowing histories.
|
|
5
|
+
Author-email: Northtek <info@northtek.io>
|
|
6
|
+
Maintainer-email: FrostByte Digital <info@northtek.io>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://github.com/NORTHTEKDevs/genome
|
|
9
|
+
Project-URL: Repository, https://github.com/NORTHTEKDevs/genome
|
|
10
|
+
Project-URL: Issues, https://github.com/NORTHTEKDevs/genome/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/NORTHTEKDevs/genome/blob/main/CHANGELOG.md
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Requires-Python: <3.14,>=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
License-File: NOTICE
|
|
23
|
+
Requires-Dist: numpy<3.0,>=1.26
|
|
24
|
+
Requires-Dist: sentence-transformers<4.0,>=2.7
|
|
25
|
+
Requires-Dist: scikit-learn<2.0,>=1.4
|
|
26
|
+
Requires-Dist: matplotlib<4.0,>=3.8
|
|
27
|
+
Requires-Dist: rank-bm25>=0.2.2
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
30
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
31
|
+
Requires-Dist: jupyter>=1.0; extra == "dev"
|
|
32
|
+
Requires-Dist: pandas>=2.0; extra == "dev"
|
|
33
|
+
Requires-Dist: ipykernel>=6.0; extra == "dev"
|
|
34
|
+
Requires-Dist: langchain-core>=0.3; extra == "dev"
|
|
35
|
+
Requires-Dist: llama-index-core>=0.10; extra == "dev"
|
|
36
|
+
Requires-Dist: fastapi>=0.110; extra == "dev"
|
|
37
|
+
Requires-Dist: uvicorn[standard]>=0.27; extra == "dev"
|
|
38
|
+
Requires-Dist: pydantic>=2.5; extra == "dev"
|
|
39
|
+
Requires-Dist: httpx>=0.27; extra == "dev"
|
|
40
|
+
Provides-Extra: langchain
|
|
41
|
+
Requires-Dist: langchain-core>=0.3; extra == "langchain"
|
|
42
|
+
Provides-Extra: llamaindex
|
|
43
|
+
Requires-Dist: llama-index-core>=0.10; extra == "llamaindex"
|
|
44
|
+
Provides-Extra: postgres
|
|
45
|
+
Requires-Dist: psycopg[binary]>=3.1; extra == "postgres"
|
|
46
|
+
Requires-Dist: pgvector>=0.2; extra == "postgres"
|
|
47
|
+
Provides-Extra: fastapi
|
|
48
|
+
Requires-Dist: fastapi>=0.110; extra == "fastapi"
|
|
49
|
+
Requires-Dist: uvicorn[standard]>=0.27; extra == "fastapi"
|
|
50
|
+
Requires-Dist: pydantic>=2.5; extra == "fastapi"
|
|
51
|
+
Provides-Extra: mcp
|
|
52
|
+
Requires-Dist: mcp>=1.2; extra == "mcp"
|
|
53
|
+
Provides-Extra: all
|
|
54
|
+
Requires-Dist: mcp>=1.2; extra == "all"
|
|
55
|
+
Requires-Dist: langchain-core>=0.3; extra == "all"
|
|
56
|
+
Requires-Dist: llama-index-core>=0.10; extra == "all"
|
|
57
|
+
Requires-Dist: psycopg[binary]>=3.1; extra == "all"
|
|
58
|
+
Requires-Dist: pgvector>=0.2; extra == "all"
|
|
59
|
+
Requires-Dist: fastapi>=0.110; extra == "all"
|
|
60
|
+
Requires-Dist: uvicorn[standard]>=0.27; extra == "all"
|
|
61
|
+
Requires-Dist: pydantic>=2.5; extra == "all"
|
|
62
|
+
Dynamic: license-file
|
|
63
|
+
|
|
64
|
+
# GENOME
|
|
65
|
+
|
|
66
|
+
**Open memory for AI agents. Same answer accuracy as Mem0 — but ~1,000× cheaper to store, runs fully offline, and keeps an auditable record.**
|
|
67
|
+
|
|
68
|
+
[](https://github.com/NORTHTEKDevs/genome/actions/workflows/tests.yml)
|
|
69
|
+
[](./LICENSE)
|
|
70
|
+

|
|
71
|
+
|
|
72
|
+
Most agent-memory tools (like Mem0) call an LLM on **every message** to decide what to
|
|
73
|
+
remember. That's the slow, expensive part — and GENOME's bet is that you don't need it.
|
|
74
|
+
GENOME just embeds each message locally: no LLM, no API, no network in the write path.
|
|
75
|
+
|
|
76
|
+
Benchmarked honestly on public datasets (LoCoMo, LongMemEval), GENOME **answers just as
|
|
77
|
+
accurately as Mem0** — while storing memories for a tiny fraction of the cost and running
|
|
78
|
+
completely offline.
|
|
79
|
+
|
|
80
|
+
> **Honest up front:** on answer accuracy, GENOME *ties* Mem0 — we do **not** claim to beat
|
|
81
|
+
> it there (two independent benchmark runs confirm parity). The advantage is cost, speed,
|
|
82
|
+
> offline operation, and a temporal/auditable record Mem0 can't produce.
|
|
83
|
+
|
|
84
|
+
## Add persistent memory to your agent in one line (MCP)
|
|
85
|
+
|
|
86
|
+
GENOME ships a **fully-local MCP server** — cross-session memory for Claude Desktop, Claude
|
|
87
|
+
Code, or Cursor with **no API key and no data leaving your machine**:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pip install "genome-memory[mcp] @ git+https://github.com/NORTHTEKDevs/genome.git"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{ "mcpServers": { "genome": { "command": "genome-mcp" } } }
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Tools the agent gets: **`remember`**, **`recall`**, **`forget`**, **`reset_memories`**.
|
|
98
|
+
Memories persist locally in `~/.genome/memories.db`. [Full MCP details ↓](#use-it-as-an-mcp-server-fully-local-memory-for-any-agent)
|
|
99
|
+
|
|
100
|
+
## GENOME vs Mem0 at a glance
|
|
101
|
+
|
|
102
|
+
| | GENOME | Mem0 |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| **Answer accuracy** (LoCoMo, LongMemEval) | tied | tied |
|
|
105
|
+
| **LLM calls to store one message** | **0** | 1+ |
|
|
106
|
+
| **Write speed** | **~10 ms** | ~2,000 ms |
|
|
107
|
+
| **Runs offline / air-gapped** | **yes** | no (needs an LLM API) |
|
|
108
|
+
| **Ingest cost** (10k-user deployment) | **~$190 / yr** | $159k–$1.6M / yr |
|
|
109
|
+
| **"What was true in March?"** (point-in-time) | **yes** | no |
|
|
110
|
+
| **Deterministic, auditable memory** | **yes** | no |
|
|
111
|
+
|
|
112
|
+
Every number is measured within one harness — same responder, judge, embedder, and top-k;
|
|
113
|
+
only the memory layer changes — with paired significance tests. Full detail and per-number
|
|
114
|
+
provenance: [`benchmarks/RESULTS.md`](./benchmarks/RESULTS.md). Formatted report:
|
|
115
|
+
[`benchmarks/GENOME-LoCoMo-Report.pdf`](./benchmarks/GENOME-LoCoMo-Report.pdf).
|
|
116
|
+
|
|
117
|
+
## Why it's ~1,000× cheaper: it never calls an LLM to remember
|
|
118
|
+
|
|
119
|
+
Storing one message costs **one LLM call in Mem0, zero in GENOME** (just a local embedding).
|
|
120
|
+
That's not a benchmark you can argue with — it's arithmetic, and it holds no matter which
|
|
121
|
+
LLM you price it against. At 10,000 users × 50 messages/day (15M messages/month):
|
|
122
|
+
|
|
123
|
+
| Model Mem0 uses to extract | Mem0's yearly ingest bill | GENOME |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| Claude Haiku | $1,601,757 | **$190** |
|
|
126
|
+
| gpt-4o-mini | $238,596 | **$190** |
|
|
127
|
+
| cheapest hosted model | $159,064 | **$190** |
|
|
128
|
+
|
|
129
|
+
The gap survives the cheapest model and *grows* in production (Mem0 re-sends stored memories
|
|
130
|
+
to the LLM as the store fills). Reproduce: `python benchmarks/tco_project.py` (no API key).
|
|
131
|
+
|
|
132
|
+
## It runs air-gapped
|
|
133
|
+
|
|
134
|
+
GENOME's default embedder is local. We proved the write path is genuinely offline by
|
|
135
|
+
**blocking all network during writes** — they still succeed:
|
|
136
|
+
|
|
137
|
+
- **~10 ms/message, 0 network calls, 0 LLM calls** (`python benchmarks/local_writepath.py`)
|
|
138
|
+
- Mem0 can't do this — it needs an LLM API call to ingest.
|
|
139
|
+
|
|
140
|
+
That makes GENOME usable on-prem, in regulated environments, or fully offline. It's a yes/no
|
|
141
|
+
capability, not a price point.
|
|
142
|
+
|
|
143
|
+
## How it works
|
|
144
|
+
|
|
145
|
+
- **Write:** embed the message locally and store it. No LLM, no network. (~10 ms)
|
|
146
|
+
- **Read:** vector search over your memories, with an optional local cross-encoder reranker
|
|
147
|
+
for harder queries.
|
|
148
|
+
- **Optional bi-temporal layer:** track how facts change over time and answer "what was true
|
|
149
|
+
at time T" — see below.
|
|
150
|
+
|
|
151
|
+
## Install
|
|
152
|
+
|
|
153
|
+
Until the PyPI release lands, install from source:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
pip install "git+https://github.com/NORTHTEKDevs/genome.git"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
(`pip install genome-memory` is coming.) The default embedder is local
|
|
160
|
+
(`sentence-transformers/all-MiniLM-L6-v2`) — no API key, works offline; the first run
|
|
161
|
+
downloads the ~90 MB model once. OpenAI embeddings are optional for higher-dimensional retrieval.
|
|
162
|
+
|
|
163
|
+
## Quickstart (fully local, no API key)
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
from genome import Memory
|
|
167
|
+
|
|
168
|
+
mem = Memory(storage="genome.db") # local embedder by default; ":memory:" for ephemeral
|
|
169
|
+
|
|
170
|
+
# Store a message -- embedded locally, no LLM call, no network
|
|
171
|
+
mem.add("Ada met Lin at the robotics summit in Berlin.", user_id="u1")
|
|
172
|
+
mem.add("They are collaborating on an open-source planning library.", user_id="u1")
|
|
173
|
+
|
|
174
|
+
# Retrieve the most relevant memories
|
|
175
|
+
for hit in mem.search("Where did Ada meet Lin?", user_id="u1", limit=5):
|
|
176
|
+
print(f"{hit.score:.3f} {hit.content}")
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`Memory` mirrors Mem0's API (`add` / `search` / `get` / `delete` / `reset`) — a near
|
|
180
|
+
drop-in swap. To use OpenAI embeddings instead (set `OPENAI_API_KEY`):
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
from genome import Memory, EmbeddingProvider
|
|
184
|
+
mem = Memory(storage="genome.db",
|
|
185
|
+
embedding_provider=EmbeddingProvider(model_name="openai:text-embedding-3-small"))
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Use it as an MCP server (fully-local memory for any agent)
|
|
189
|
+
|
|
190
|
+
GENOME ships an MCP server, so any MCP client (Claude Desktop, Claude Code, Cursor, …) gets
|
|
191
|
+
persistent cross-session memory that runs **entirely on the local machine** — no LLM calls,
|
|
192
|
+
no API keys, no data leaves the box. Most memory MCPs can't say that.
|
|
193
|
+
|
|
194
|
+
Install with the `mcp` extra, then add it to your client's config:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
pip install "genome-memory[mcp] @ git+https://github.com/NORTHTEKDevs/genome.git"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"mcpServers": {
|
|
203
|
+
"genome": { "command": "genome-mcp" }
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Tools the agent gets: **`remember`** (store a fact/preference, local + 0 LLM), **`recall`**
|
|
209
|
+
(semantic search), **`forget`** (delete the memory matching a query), **`reset_memories`**
|
|
210
|
+
(clear a user's memories). Memories persist in `~/.genome/memories.db` (override with the
|
|
211
|
+
`GENOME_MCP_DB` env var). Run standalone with `genome-mcp` or `python -m genome.mcp.server`.
|
|
212
|
+
|
|
213
|
+
## The honest results
|
|
214
|
+
|
|
215
|
+
Same responder + judge + embedder for every system; only the memory layer changes.
|
|
216
|
+
|
|
217
|
+
| What we measured | Result | Verdict |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| Answer accuracy, in-window (LoCoMo) | GENOME 0.851 vs Mem0 0.855 (p > 0.23) | **Tied** |
|
|
220
|
+
| Answer accuracy, harder bench (LongMemEval, n=90 & n=205) | directionally ahead, not significant (p = 0.14–0.19) | **Tied** |
|
|
221
|
+
| Accuracy when history overflows the context window | **+0.409** at 80× less context (p = 8e-10) | **Win** |
|
|
222
|
+
| Cost to store a message | 0 LLM calls vs 1+; **837–8,433× cheaper** | **Win** |
|
|
223
|
+
| Write path | **~10 ms, air-gapped**, 0 network calls | **Win** |
|
|
224
|
+
| Point-in-time ("what was true at T") | belief-state **0.870** vs Mem0 0.676 (synthetic data) | **Win, with caveat** |
|
|
225
|
+
| Retrieval hit-rate with reranking | improves hit@10 (up to 0.943); local + free | **Win** |
|
|
226
|
+
|
|
227
|
+
### What we tested that *didn't* help (so you don't have to)
|
|
228
|
+
|
|
229
|
+
We publish our nulls — it's how you know the wins are real:
|
|
230
|
+
- **Synthesis / consolidation:** accuracy-neutral at equal token budget (p = 0.86).
|
|
231
|
+
- **Hybrid (BM25 + dense) and graph retrieval:** hybrid underperformed plain dense on LoCoMo;
|
|
232
|
+
graph was not validated here.
|
|
233
|
+
- **Reranking's accuracy gain is embedder-dependent:** it reliably improves *retrieval
|
|
234
|
+
hit-rate*, but its effect on final *answer accuracy* depends on the embedder — treat it as a
|
|
235
|
+
retrieval-quality tool, not a guaranteed accuracy win.
|
|
236
|
+
|
|
237
|
+
## Bi-temporal memory: "what was true at time T"
|
|
238
|
+
|
|
239
|
+
GENOME can track how facts change over time and answer point-in-time questions — something
|
|
240
|
+
overwrite-based memory structurally can't do (it only keeps the latest value):
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
from genome.memory.belief import ingest_belief_turn, answer_belief_context
|
|
244
|
+
|
|
245
|
+
mem = Memory(storage="genome.db", llm_call=my_llm_fn)
|
|
246
|
+
|
|
247
|
+
# facts land at their DOMAIN time (parsed from the text), not wall-clock ingest time
|
|
248
|
+
ingest_belief_turn(mem, "In March 2024, Jordan moved to Seattle.", session_time=t0, user_id="u")
|
|
249
|
+
ingest_belief_turn(mem, "Jordan just moved to Austin.", session_time=t2, user_id="u")
|
|
250
|
+
|
|
251
|
+
answer_belief_context(mem, "Where does Jordan live now?", user_id="u") # -> Austin
|
|
252
|
+
answer_belief_context(mem, "Where did Jordan live in early 2024?", user_id="u") # -> Seattle
|
|
253
|
+
answer_belief_context(mem, "List every city Jordan has lived in.", user_id="u") # -> Seattle; Austin
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
On the TempBelief benchmark it answers as-of queries at **0.870** vs Mem0's 0.676, with the
|
|
257
|
+
knowledge graph audited at 0.97 precision / 0.96 recall. **Caveat:** TempBelief is synthetic
|
|
258
|
+
text with explicit dates; the edge shrinks on natural speech. Real capability, bounded proof.
|
|
259
|
+
|
|
260
|
+
## Optional features
|
|
261
|
+
|
|
262
|
+
Opt-in; the default path stays LLM-free and local at ingest.
|
|
263
|
+
|
|
264
|
+
```python
|
|
265
|
+
mem = Memory(
|
|
266
|
+
storage="genome.db",
|
|
267
|
+
llm_call=my_llm_fn, # LLM-based fact extraction on add()
|
|
268
|
+
resolve_conflicts=True, # ADD/UPDATE/DELETE vs existing memories
|
|
269
|
+
auto_extract_entities=True, # entity graph for graph retrieval
|
|
270
|
+
auto_consolidate_threshold=200, # summarize-or-prune when a scope grows past N
|
|
271
|
+
)
|
|
272
|
+
mem.search("...", user_id="u1", mode="hybrid") # modes: "dense" (default), "hybrid", "graph"
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Reranking (local, free, no API):
|
|
276
|
+
|
|
277
|
+
```python
|
|
278
|
+
from genome.memory.rerank import CrossEncoderReranker
|
|
279
|
+
mem = Memory(storage="genome.db", reranker=CrossEncoderReranker()) # lazy-loaded
|
|
280
|
+
mem.search("Where did the user go on vacation?", user_id="u1", limit=5) # reranked
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Reproduce the benchmarks
|
|
284
|
+
|
|
285
|
+
The LoCoMo and LongMemEval datasets are **not bundled** (they carry their own licenses —
|
|
286
|
+
LoCoMo is CC BY-NC 4.0). See [`benchmarks/data/README.md`](./benchmarks/data/README.md) to
|
|
287
|
+
download them. The first two lines need no dataset and no API keys:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
python benchmarks/local_writepath.py # local write path: ~10ms/msg, 0 network
|
|
291
|
+
python benchmarks/tco_project.py # deployment cost projection
|
|
292
|
+
python benchmarks/verdict.py # in-window accuracy + McNemar
|
|
293
|
+
python benchmarks/haystack_report.py # overflow / context-window crossover
|
|
294
|
+
python benchmarks/ingest_cost.py --n 80 # measured ingestion cost vs Mem0
|
|
295
|
+
python benchmarks/lme_qa.py --n 90 # LongMemEval head-to-head vs Mem0
|
|
296
|
+
python benchmarks/tempbelief_run.py --convs 6 # bi-temporal point-in-time vs baselines
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## License
|
|
300
|
+
|
|
301
|
+
**Apache License 2.0** — see [LICENSE](./LICENSE) and [NOTICE](./NOTICE).
|
|
302
|
+
|
|
303
|
+
GENOME is free and open source: read it, modify it, self-host it, and embed it in your own
|
|
304
|
+
applications — commercial use included — under the terms of Apache 2.0. Questions:
|
|
305
|
+
info@northtek.io.
|
|
306
|
+
|
|
307
|
+
Copyright 2026 Northtek (FrostByte Digital LLC).
|