engram-memory-vault 1.8.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.
- engram_memory_vault-1.8.1/LICENSE +21 -0
- engram_memory_vault-1.8.1/PKG-INFO +296 -0
- engram_memory_vault-1.8.1/README.md +275 -0
- engram_memory_vault-1.8.1/pyproject.toml +36 -0
- engram_memory_vault-1.8.1/setup.cfg +4 -0
- engram_memory_vault-1.8.1/src/engram/__init__.py +7 -0
- engram_memory_vault-1.8.1/src/engram/acl.py +91 -0
- engram_memory_vault-1.8.1/src/engram/audit.py +54 -0
- engram_memory_vault-1.8.1/src/engram/bench.py +88 -0
- engram_memory_vault-1.8.1/src/engram/cli.py +968 -0
- engram_memory_vault-1.8.1/src/engram/crypto.py +229 -0
- engram_memory_vault-1.8.1/src/engram/dash.py +672 -0
- engram_memory_vault-1.8.1/src/engram/data/hermes-plugin/__init__.py +310 -0
- engram_memory_vault-1.8.1/src/engram/data/hermes-plugin/plugin.yaml +7 -0
- engram_memory_vault-1.8.1/src/engram/data/starter.mpack +0 -0
- engram_memory_vault-1.8.1/src/engram/embed.py +140 -0
- engram_memory_vault-1.8.1/src/engram/longmemeval.py +281 -0
- engram_memory_vault-1.8.1/src/engram/models/bge-small-en-v1.5-int8/model_quantized.onnx +0 -0
- engram_memory_vault-1.8.1/src/engram/models/bge-small-en-v1.5-int8/tokenizer.json +30672 -0
- engram_memory_vault-1.8.1/src/engram/offline_guard.py +52 -0
- engram_memory_vault-1.8.1/src/engram/packs.py +240 -0
- engram_memory_vault-1.8.1/src/engram/platforms.py +144 -0
- engram_memory_vault-1.8.1/src/engram/salience.py +128 -0
- engram_memory_vault-1.8.1/src/engram/selftest.py +74 -0
- engram_memory_vault-1.8.1/src/engram/server.py +292 -0
- engram_memory_vault-1.8.1/src/engram/session.py +106 -0
- engram_memory_vault-1.8.1/src/engram/store.py +287 -0
- engram_memory_vault-1.8.1/src/engram/vault.py +796 -0
- engram_memory_vault-1.8.1/src/engram/vaultfile.py +258 -0
- engram_memory_vault-1.8.1/src/engram/vindex.py +124 -0
- engram_memory_vault-1.8.1/src/engram_memory_vault.egg-info/PKG-INFO +296 -0
- engram_memory_vault-1.8.1/src/engram_memory_vault.egg-info/SOURCES.txt +47 -0
- engram_memory_vault-1.8.1/src/engram_memory_vault.egg-info/dependency_links.txt +1 -0
- engram_memory_vault-1.8.1/src/engram_memory_vault.egg-info/entry_points.txt +2 -0
- engram_memory_vault-1.8.1/src/engram_memory_vault.egg-info/requires.txt +13 -0
- engram_memory_vault-1.8.1/src/engram_memory_vault.egg-info/top_level.txt +1 -0
- engram_memory_vault-1.8.1/tests/test_acl_audit_packs.py +99 -0
- engram_memory_vault-1.8.1/tests/test_crypto.py +59 -0
- engram_memory_vault-1.8.1/tests/test_dash.py +79 -0
- engram_memory_vault-1.8.1/tests/test_instructions.py +73 -0
- engram_memory_vault-1.8.1/tests/test_offline_selftest_bench.py +81 -0
- engram_memory_vault-1.8.1/tests/test_platforms.py +27 -0
- engram_memory_vault-1.8.1/tests/test_relations.py +142 -0
- engram_memory_vault-1.8.1/tests/test_salience.py +66 -0
- engram_memory_vault-1.8.1/tests/test_session_lock.py +79 -0
- engram_memory_vault-1.8.1/tests/test_starter_packs.py +130 -0
- engram_memory_vault-1.8.1/tests/test_tamper.py +97 -0
- engram_memory_vault-1.8.1/tests/test_twofa.py +104 -0
- engram_memory_vault-1.8.1/tests/test_vault_ops.py +166 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 engRAM Project
|
|
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,296 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: engram-memory-vault
|
|
3
|
+
Version: 1.8.1
|
|
4
|
+
Summary: engRAM - high-security, fully offline, encrypted vector memory for AI agents (MCP)
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: pynacl>=1.5
|
|
10
|
+
Requires-Dist: argon2-cffi>=23.1
|
|
11
|
+
Requires-Dist: onnxruntime>=1.17
|
|
12
|
+
Requires-Dist: tokenizers>=0.15
|
|
13
|
+
Requires-Dist: numpy>=1.26
|
|
14
|
+
Requires-Dist: mcp>=1.0
|
|
15
|
+
Provides-Extra: hnsw
|
|
16
|
+
Requires-Dist: usearch>=2.9; extra == "hnsw"
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
19
|
+
Requires-Dist: usearch>=2.9; extra == "dev"
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# engRAM
|
|
23
|
+
|
|
24
|
+
### Superior agentic memory, encrypted at rest.
|
|
25
|
+
|
|
26
|
+
engRAM is the memory your AI agents plug into. Hermes, Claude, and
|
|
27
|
+
OpenClaw each register in one command; anything that runs a subprocess
|
|
28
|
+
can use the CLI. Every agent can share the same memory - even across
|
|
29
|
+
different machines. Everything is local. The default install never
|
|
30
|
+
touches the network: the embedding model ships inside the package, so
|
|
31
|
+
recall works as soon as the vault is open. Every byte at rest is
|
|
32
|
+
AEAD-encrypted, the vectors included. The vault locks itself on restart
|
|
33
|
+
or power loss and unlocks once per boot.
|
|
34
|
+
|
|
35
|
+
*An **engram** is the physical trace a memory leaves in the brain. This
|
|
36
|
+
one lives in **RAM**: the whole index is held in memory, which is what
|
|
37
|
+
makes it both the fastest place to search and the safest place to keep
|
|
38
|
+
plaintext, because nothing decrypted is ever written to disk.*
|
|
39
|
+
|
|
40
|
+
## Why engRAM
|
|
41
|
+
|
|
42
|
+
Most memory tools ask you to choose: powerful, or private, or easy. engRAM
|
|
43
|
+
refuses the trade, because one design decision delivers all three.
|
|
44
|
+
|
|
45
|
+
**Better recall.** engRAM does not just store chat, it decides what
|
|
46
|
+
matters. A bare "OK" answering "send this reply to the client?" is
|
|
47
|
+
captured as a consent decision, with its question, at the highest
|
|
48
|
+
priority. What you said about yourself and your machine outranks
|
|
49
|
+
background noise. Search is hybrid (meaning plus keywords) and, at
|
|
50
|
+
personal scale, mathematically exact: the top result is the true top
|
|
51
|
+
result, not an approximation. It learns you first, and forgets nothing.
|
|
52
|
+
|
|
53
|
+
**More secure, by construction.** Every byte at rest is authenticated-
|
|
54
|
+
encrypted, the embedding vectors included (most tools leave those in the
|
|
55
|
+
clear, and vectors can be inverted back toward text). Deletion is
|
|
56
|
+
cryptographic: destroy the record's key and it is gone, unrecoverable.
|
|
57
|
+
Tampering is detected, history is hash-chained, and the vault locks itself
|
|
58
|
+
on restart or power loss. It runs fully offline: a runtime guard aborts on
|
|
59
|
+
any network attempt, and CI proves it on three operating systems.
|
|
60
|
+
|
|
61
|
+
**Not one step harder.** One command installs it, creates the vault, and
|
|
62
|
+
wires your agent. No API key, no cloud account, no daemon. Unlock when you
|
|
63
|
+
want to use it; lock when you want it closed. By default an unlock stays
|
|
64
|
+
open for weeks (until restart or you lock it), like any app you leave
|
|
65
|
+
running. The security is free at the point of use because it falls out of
|
|
66
|
+
the architecture, not out of your patience: keeping plaintext off disk
|
|
67
|
+
forces the index into RAM, and a RAM-resident index is also the fastest
|
|
68
|
+
one there is. Secure and fast are the same choice here, and neither costs
|
|
69
|
+
you a configuration step.
|
|
70
|
+
|
|
71
|
+
## Install
|
|
72
|
+
|
|
73
|
+
One command per platform. Each installs the package, creates your
|
|
74
|
+
encrypted vault, and wires the agent.
|
|
75
|
+
|
|
76
|
+
**Claude (Code + Desktop)** - macOS / Linux:
|
|
77
|
+
```bash
|
|
78
|
+
pip install engram-memory-vault && engram init && engram integrate claude
|
|
79
|
+
```
|
|
80
|
+
Windows (PowerShell):
|
|
81
|
+
```powershell
|
|
82
|
+
py -m pip install engram-memory-vault; engram init; engram integrate claude
|
|
83
|
+
```
|
|
84
|
+
Registers the MCP server with the Claude Code CLI (user scope, all
|
|
85
|
+
projects) and prints the Claude Desktop config block. The server describes
|
|
86
|
+
itself over the MCP handshake - it tells the model to recall before answering
|
|
87
|
+
and to store durable facts, credentials, names, and decisions - so Claude
|
|
88
|
+
treats engRAM as its memory with no hand-written instruction; `integrate
|
|
89
|
+
claude` also writes a managed, idempotent block into your CLAUDE.md as backup.
|
|
90
|
+
|
|
91
|
+
**Hermes** - macOS / Linux:
|
|
92
|
+
```bash
|
|
93
|
+
pip install engram-memory-vault && engram init && engram integrate hermes
|
|
94
|
+
```
|
|
95
|
+
Windows (PowerShell):
|
|
96
|
+
```powershell
|
|
97
|
+
py -m pip install engram-memory-vault; engram init; engram integrate hermes
|
|
98
|
+
```
|
|
99
|
+
Installs the provider plugin, wires the Hermes venv, and runs
|
|
100
|
+
`hermes memory setup engram`. engRAM then appears in the
|
|
101
|
+
`hermes memory setup` picker beside hindsight and mem0, the only entry
|
|
102
|
+
marked **"no setup needed"**: no API key, no cloud account, no daemon.
|
|
103
|
+
Verify with `hermes memory status`. See everything Hermes remembers at
|
|
104
|
+
any time with **`engram dash`** - one command, and the vault opens in
|
|
105
|
+
your browser (memories by kind, growth, the relation graph, live
|
|
106
|
+
search); Ctrl-C closes it.
|
|
107
|
+
|
|
108
|
+
**OpenClaw** - macOS / Linux:
|
|
109
|
+
```bash
|
|
110
|
+
pip install engram-memory-vault && engram init && engram integrate openclaw
|
|
111
|
+
```
|
|
112
|
+
Windows (PowerShell):
|
|
113
|
+
```powershell
|
|
114
|
+
py -m pip install engram-memory-vault; engram init; engram integrate openclaw
|
|
115
|
+
```
|
|
116
|
+
Writes the `mcpServers` entry into `~/.openclaw/openclaw.json` (with a
|
|
117
|
+
backup), then: `openclaw gateway restart` and confirm with
|
|
118
|
+
`openclaw mcp list`.
|
|
119
|
+
|
|
120
|
+
Anything else that speaks MCP gets the same server with one config block;
|
|
121
|
+
see [docs/INTEGRATIONS.md](docs/INTEGRATIONS.md). Until the PyPI release,
|
|
122
|
+
replace `pip install engram-memory-vault` with a clone + `pip install .`;
|
|
123
|
+
everything else is identical.
|
|
124
|
+
|
|
125
|
+
## Measured, on an 8 GB baseline laptop
|
|
126
|
+
|
|
127
|
+
Every number below is reproducible on your machine with `engram selftest`
|
|
128
|
+
and `engram bench`.
|
|
129
|
+
|
|
130
|
+
| Metric | Measured |
|
|
131
|
+
|---|---|
|
|
132
|
+
| Fresh install → open vault, offline | seconds, zero network |
|
|
133
|
+
| Vector search, 20k records (HNSW) | p95 0.68 ms |
|
|
134
|
+
| Full hybrid search (embed + vector + BM25 + fuse) | p95 8.8 ms |
|
|
135
|
+
| Peak RSS, model + vault + index resident | 319 MB |
|
|
136
|
+
| Store one memory (embed + encrypt + fsync journal) | ~40 ms |
|
|
137
|
+
| Wheel size, model included | ~30 MB |
|
|
138
|
+
| Test suite (crypto, tamper, crash, offline, concurrency, 2FA, graph, dash) | 88 tests, ~40 s |
|
|
139
|
+
|
|
140
|
+
A single network round-trip to a cloud memory API costs more than this
|
|
141
|
+
entire pipeline. The property that makes engRAM secure (no plaintext
|
|
142
|
+
index ever on disk, so all search is RAM-resident) is the same property
|
|
143
|
+
that makes it fast: below 20k records search is exact SIMD matrix math,
|
|
144
|
+
recall = 1.0 by construction; above it, SIMD HNSW at ~99% recall.
|
|
145
|
+
|
|
146
|
+
## The memory logic
|
|
147
|
+
|
|
148
|
+
Full write-path, decision math, and comparisons in
|
|
149
|
+
[docs/MEMORY.md](docs/MEMORY.md). The load-bearing ideas:
|
|
150
|
+
|
|
151
|
+
**Nearly everything is stored; nothing important is buried.** Only empty
|
|
152
|
+
turns are dropped. A bare "OK" is not noise, it is a decision: when the
|
|
153
|
+
agent asks *"Want me to send this reply to the client now?"* and the user
|
|
154
|
+
answers *"OK"*, engRAM resolves the question from the conversation and
|
|
155
|
+
stores
|
|
156
|
+
`[decision 2026-07-20] Approved (answered "OK"): Want me to send this
|
|
157
|
+
reply to the client now?` at the top importance tier. Asking *"did the
|
|
158
|
+
user say to email the client?"* later retrieves exactly that record.
|
|
159
|
+
|
|
160
|
+
**Deterministic importance tiers rank recall**: decisions/consent 0.90,
|
|
161
|
+
personal facts and preferences 0.80, the user's machine and configuration
|
|
162
|
+
0.75, other substantive statements 0.55, pleasantries 0.20 (kept, ranked
|
|
163
|
+
last). The fused score is
|
|
164
|
+
`RRF(vector) + RRF(keyword) + 0.02·cosine + 0.006·importance`: cosine
|
|
165
|
+
magnitude keeps the genuinely best match on top, importance settles
|
|
166
|
+
near-ties in favor of what matters. The agent learns the user and the
|
|
167
|
+
computer first, the world second, and forgets nothing.
|
|
168
|
+
|
|
169
|
+
**One pinned embedding space.** The model's SHA-256 is recorded in the
|
|
170
|
+
vault and enforced at open; cosine comparisons stay mathematically valid
|
|
171
|
+
forever instead of silently degrading when a model changes. Migration is
|
|
172
|
+
explicit: `engram reindex --re-embed`.
|
|
173
|
+
|
|
174
|
+
**No LLM inside.** Embeddings run locally (bundled 384-dim int8 ONNX
|
|
175
|
+
model, <300 MB RAM). Judgment belongs to the host model you already run,
|
|
176
|
+
via `engram_store` / `engram_forget`; engRAM contributes deterministic
|
|
177
|
+
capture, encryption, and total recall. That split is what makes the
|
|
178
|
+
offline guarantee absolute and every decision reproducible. Pair engRAM
|
|
179
|
+
with an offline LLM and the whole agent stack can run usefully with no
|
|
180
|
+
network at all.
|
|
181
|
+
|
|
182
|
+
## Agent-native by design
|
|
183
|
+
|
|
184
|
+
engRAM is built to sit under agents you already use, not as a separate
|
|
185
|
+
app you babysit.
|
|
186
|
+
|
|
187
|
+
- **Hermes native provider** - shows up in `hermes memory setup` with
|
|
188
|
+
**"no setup needed"**. Turns sync automatically; search injects only
|
|
189
|
+
what is relevant, tagged as data not instructions.
|
|
190
|
+
- **Claude over MCP** - one `integrate claude` step registers the server
|
|
191
|
+
and gives you the Desktop config block plus a managed CLAUDE.md block so memory
|
|
192
|
+
is part of normal work.
|
|
193
|
+
- **OpenClaw and any MCP client** - same stdio server, zero open ports,
|
|
194
|
+
same tools (`memory_search`, `memory_store`, `memory_forget`, lock).
|
|
195
|
+
- **A memory graph, not just a memory pile** - `memory_link` records
|
|
196
|
+
explicit relations (who works where, what belongs to what), with
|
|
197
|
+
optional validity windows; `memory_relations` answers entity,
|
|
198
|
+
predicate, and as-of queries. Deterministic storage, host-model
|
|
199
|
+
judgment - the same split as everything else in engRAM.
|
|
200
|
+
- **CLI for everything else** - scripts, cron, other agents: `engram
|
|
201
|
+
store`, `engram search`, `engram forget`, `engram link`,
|
|
202
|
+
`engram relations`, `engram lock`.
|
|
203
|
+
- **See the vault: `engram dash`** - one command opens a local page with
|
|
204
|
+
everything at a glance: how many memories of what kind, growth over
|
|
205
|
+
time, the relation graph, tags, per-agent counts, live search. Served
|
|
206
|
+
from RAM, 127.0.0.1-only behind a random URL token, read-only, zero
|
|
207
|
+
outbound requests, zero configuration.
|
|
208
|
+
- **Panic lock from the agent** - `memory_lock` / `engram lock` clears
|
|
209
|
+
stored credentials instantly when you need the vault closed now.
|
|
210
|
+
- **One vault, many hosts** - Hermes, Claude, and the CLI can share a
|
|
211
|
+
vault at once; each caller gets its own identity and namespace ACLs.
|
|
212
|
+
- **One memory, no sections** - the starting memories seeded at `init`
|
|
213
|
+
live in `main` as ordinary records, editable and forgettable like
|
|
214
|
+
anything the agent stores; older vaults reorganize automatically.
|
|
215
|
+
|
|
216
|
+
Day to day, the point is simple: the agent remembers *you*, your
|
|
217
|
+
decisions, and your machine - encrypted, offline, and fast - without a
|
|
218
|
+
cloud account.
|
|
219
|
+
|
|
220
|
+
## The lock model
|
|
221
|
+
|
|
222
|
+
You lock and unlock the vault yourself whenever you want. Manual control
|
|
223
|
+
is always available:
|
|
224
|
+
|
|
225
|
+
- **`engram unlock`** - open the vault with YOUR passphrase. You choose
|
|
226
|
+
it; engRAM never auto-generates a password, seed, or recovery phrase,
|
|
227
|
+
and there is no credential it knows that you don't. (Vaults made by
|
|
228
|
+
older versions that received an auto-generated recovery phrase still
|
|
229
|
+
open with it.)
|
|
230
|
+
- **`engram lock`** - close it again and clear every stored credential.
|
|
231
|
+
Agents can do the same via the `memory_lock` panic tool.
|
|
232
|
+
- **`engram 2fa enable`** - optional two-factor unlock: your passphrase
|
|
233
|
+
(knowledge) plus a keyfile (possession - keep it on a USB stick).
|
|
234
|
+
Both factors feed Argon2id together, so needing both is enforced by
|
|
235
|
+
arithmetic, not a policy check; a stolen vault file plus your
|
|
236
|
+
passphrase still opens nothing without the keyfile. One command, zero
|
|
237
|
+
configuration: the keyfile's location is remembered, so day-to-day
|
|
238
|
+
unlocking feels exactly the same while the file is present.
|
|
239
|
+
|
|
240
|
+
The default unlock mode is convenience, not a cage: after a normal
|
|
241
|
+
unlock, the vault stays usable across processes, logouts, and logins -
|
|
242
|
+
for weeks or months if you leave it that way - until the next restart or
|
|
243
|
+
power loss, or until you lock it yourself. Restart/power loss always
|
|
244
|
+
locks it: the stored credential is the master key wrapped by a key
|
|
245
|
+
derived from the kernel's boot timestamp plus the stable machine id; a
|
|
246
|
+
new boot can never open the old wrap. That is arithmetic, not a policy
|
|
247
|
+
check.
|
|
248
|
+
|
|
249
|
+
If you prefer reboot-surviving unlock on macOS, that is an explicit
|
|
250
|
+
opt-in (`engram unlock --keychain`), with the tradeoff documented. At any
|
|
251
|
+
time you can lock, unlock, lock again - on your schedule.
|
|
252
|
+
|
|
253
|
+
## Security, in one paragraph
|
|
254
|
+
|
|
255
|
+
XChaCha20-Poly1305 AEAD on everything at rest including vectors
|
|
256
|
+
(embedding-inversion resistance) · Argon2id keyslots, LUKS-style, opened
|
|
257
|
+
only by the user's own passphrase (no auto-generated credentials),
|
|
258
|
+
optionally two-factor with a keyfile · per-record keys enabling `forget --shred`
|
|
259
|
+
(crypto-shred: key destroyed, content mathematically unrecoverable) ·
|
|
260
|
+
fsync'd sealed journal, atomic compaction, verified kill-9 crash recovery ·
|
|
261
|
+
hash-chained tamper-evident audit log (`engram audit verify`) · per-caller
|
|
262
|
+
namespace ACLs, quarantine tier for untrusted content, signed vault
|
|
263
|
+
manifests · stdio MCP transport: zero open ports · runtime offline guard
|
|
264
|
+
that aborts on any socket attempt; CI runs the whole suite with it active
|
|
265
|
+
on Linux, macOS, and Windows · no telemetry, ever. Full honest threat
|
|
266
|
+
model, including what engRAM cannot protect against, in
|
|
267
|
+
[SECURITY.md](SECURITY.md).
|
|
268
|
+
|
|
269
|
+
## One vault, many agents
|
|
270
|
+
|
|
271
|
+
Hermes, Claude, and the CLI can share a single vault simultaneously:
|
|
272
|
+
writes are serialized by an advisory file lock, every process detects
|
|
273
|
+
foreign writes and reloads, and each host gets its own caller identity
|
|
274
|
+
and namespace with rw/ro grants. A locked vault is one portable file,
|
|
275
|
+
safe to move over any channel; `engram lock --sign` seals it with an
|
|
276
|
+
Ed25519 manifest the recipient can verify without any credential.
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
engram lock
|
|
280
|
+
scp ~/.engram/memory.vault other-machine:
|
|
281
|
+
engram --vault memory.vault unlock # your passphrase (+ keyfile if 2FA)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Documentation
|
|
285
|
+
|
|
286
|
+
| | |
|
|
287
|
+
|---|---|
|
|
288
|
+
| [docs/MEMORY.md](docs/MEMORY.md) | how memory is stored, what gets remembered, why the math wins |
|
|
289
|
+
| [docs/INTEGRATIONS.md](docs/INTEGRATIONS.md) | selecting engRAM in Hermes, OpenClaw, Claude, everything else |
|
|
290
|
+
| [SECURITY.md](SECURITY.md) | full threat model, honest limits |
|
|
291
|
+
| [FORMAT.md](FORMAT.md) | byte-level `.vault` and `.mpack` specs (language-agnostic) |
|
|
292
|
+
| [PACKS.md](PACKS.md) | authoring and shipping signed memory packs |
|
|
293
|
+
|
|
294
|
+
## License
|
|
295
|
+
|
|
296
|
+
MIT.
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# engRAM
|
|
2
|
+
|
|
3
|
+
### Superior agentic memory, encrypted at rest.
|
|
4
|
+
|
|
5
|
+
engRAM is the memory your AI agents plug into. Hermes, Claude, and
|
|
6
|
+
OpenClaw each register in one command; anything that runs a subprocess
|
|
7
|
+
can use the CLI. Every agent can share the same memory - even across
|
|
8
|
+
different machines. Everything is local. The default install never
|
|
9
|
+
touches the network: the embedding model ships inside the package, so
|
|
10
|
+
recall works as soon as the vault is open. Every byte at rest is
|
|
11
|
+
AEAD-encrypted, the vectors included. The vault locks itself on restart
|
|
12
|
+
or power loss and unlocks once per boot.
|
|
13
|
+
|
|
14
|
+
*An **engram** is the physical trace a memory leaves in the brain. This
|
|
15
|
+
one lives in **RAM**: the whole index is held in memory, which is what
|
|
16
|
+
makes it both the fastest place to search and the safest place to keep
|
|
17
|
+
plaintext, because nothing decrypted is ever written to disk.*
|
|
18
|
+
|
|
19
|
+
## Why engRAM
|
|
20
|
+
|
|
21
|
+
Most memory tools ask you to choose: powerful, or private, or easy. engRAM
|
|
22
|
+
refuses the trade, because one design decision delivers all three.
|
|
23
|
+
|
|
24
|
+
**Better recall.** engRAM does not just store chat, it decides what
|
|
25
|
+
matters. A bare "OK" answering "send this reply to the client?" is
|
|
26
|
+
captured as a consent decision, with its question, at the highest
|
|
27
|
+
priority. What you said about yourself and your machine outranks
|
|
28
|
+
background noise. Search is hybrid (meaning plus keywords) and, at
|
|
29
|
+
personal scale, mathematically exact: the top result is the true top
|
|
30
|
+
result, not an approximation. It learns you first, and forgets nothing.
|
|
31
|
+
|
|
32
|
+
**More secure, by construction.** Every byte at rest is authenticated-
|
|
33
|
+
encrypted, the embedding vectors included (most tools leave those in the
|
|
34
|
+
clear, and vectors can be inverted back toward text). Deletion is
|
|
35
|
+
cryptographic: destroy the record's key and it is gone, unrecoverable.
|
|
36
|
+
Tampering is detected, history is hash-chained, and the vault locks itself
|
|
37
|
+
on restart or power loss. It runs fully offline: a runtime guard aborts on
|
|
38
|
+
any network attempt, and CI proves it on three operating systems.
|
|
39
|
+
|
|
40
|
+
**Not one step harder.** One command installs it, creates the vault, and
|
|
41
|
+
wires your agent. No API key, no cloud account, no daemon. Unlock when you
|
|
42
|
+
want to use it; lock when you want it closed. By default an unlock stays
|
|
43
|
+
open for weeks (until restart or you lock it), like any app you leave
|
|
44
|
+
running. The security is free at the point of use because it falls out of
|
|
45
|
+
the architecture, not out of your patience: keeping plaintext off disk
|
|
46
|
+
forces the index into RAM, and a RAM-resident index is also the fastest
|
|
47
|
+
one there is. Secure and fast are the same choice here, and neither costs
|
|
48
|
+
you a configuration step.
|
|
49
|
+
|
|
50
|
+
## Install
|
|
51
|
+
|
|
52
|
+
One command per platform. Each installs the package, creates your
|
|
53
|
+
encrypted vault, and wires the agent.
|
|
54
|
+
|
|
55
|
+
**Claude (Code + Desktop)** - macOS / Linux:
|
|
56
|
+
```bash
|
|
57
|
+
pip install engram-memory-vault && engram init && engram integrate claude
|
|
58
|
+
```
|
|
59
|
+
Windows (PowerShell):
|
|
60
|
+
```powershell
|
|
61
|
+
py -m pip install engram-memory-vault; engram init; engram integrate claude
|
|
62
|
+
```
|
|
63
|
+
Registers the MCP server with the Claude Code CLI (user scope, all
|
|
64
|
+
projects) and prints the Claude Desktop config block. The server describes
|
|
65
|
+
itself over the MCP handshake - it tells the model to recall before answering
|
|
66
|
+
and to store durable facts, credentials, names, and decisions - so Claude
|
|
67
|
+
treats engRAM as its memory with no hand-written instruction; `integrate
|
|
68
|
+
claude` also writes a managed, idempotent block into your CLAUDE.md as backup.
|
|
69
|
+
|
|
70
|
+
**Hermes** - macOS / Linux:
|
|
71
|
+
```bash
|
|
72
|
+
pip install engram-memory-vault && engram init && engram integrate hermes
|
|
73
|
+
```
|
|
74
|
+
Windows (PowerShell):
|
|
75
|
+
```powershell
|
|
76
|
+
py -m pip install engram-memory-vault; engram init; engram integrate hermes
|
|
77
|
+
```
|
|
78
|
+
Installs the provider plugin, wires the Hermes venv, and runs
|
|
79
|
+
`hermes memory setup engram`. engRAM then appears in the
|
|
80
|
+
`hermes memory setup` picker beside hindsight and mem0, the only entry
|
|
81
|
+
marked **"no setup needed"**: no API key, no cloud account, no daemon.
|
|
82
|
+
Verify with `hermes memory status`. See everything Hermes remembers at
|
|
83
|
+
any time with **`engram dash`** - one command, and the vault opens in
|
|
84
|
+
your browser (memories by kind, growth, the relation graph, live
|
|
85
|
+
search); Ctrl-C closes it.
|
|
86
|
+
|
|
87
|
+
**OpenClaw** - macOS / Linux:
|
|
88
|
+
```bash
|
|
89
|
+
pip install engram-memory-vault && engram init && engram integrate openclaw
|
|
90
|
+
```
|
|
91
|
+
Windows (PowerShell):
|
|
92
|
+
```powershell
|
|
93
|
+
py -m pip install engram-memory-vault; engram init; engram integrate openclaw
|
|
94
|
+
```
|
|
95
|
+
Writes the `mcpServers` entry into `~/.openclaw/openclaw.json` (with a
|
|
96
|
+
backup), then: `openclaw gateway restart` and confirm with
|
|
97
|
+
`openclaw mcp list`.
|
|
98
|
+
|
|
99
|
+
Anything else that speaks MCP gets the same server with one config block;
|
|
100
|
+
see [docs/INTEGRATIONS.md](docs/INTEGRATIONS.md). Until the PyPI release,
|
|
101
|
+
replace `pip install engram-memory-vault` with a clone + `pip install .`;
|
|
102
|
+
everything else is identical.
|
|
103
|
+
|
|
104
|
+
## Measured, on an 8 GB baseline laptop
|
|
105
|
+
|
|
106
|
+
Every number below is reproducible on your machine with `engram selftest`
|
|
107
|
+
and `engram bench`.
|
|
108
|
+
|
|
109
|
+
| Metric | Measured |
|
|
110
|
+
|---|---|
|
|
111
|
+
| Fresh install → open vault, offline | seconds, zero network |
|
|
112
|
+
| Vector search, 20k records (HNSW) | p95 0.68 ms |
|
|
113
|
+
| Full hybrid search (embed + vector + BM25 + fuse) | p95 8.8 ms |
|
|
114
|
+
| Peak RSS, model + vault + index resident | 319 MB |
|
|
115
|
+
| Store one memory (embed + encrypt + fsync journal) | ~40 ms |
|
|
116
|
+
| Wheel size, model included | ~30 MB |
|
|
117
|
+
| Test suite (crypto, tamper, crash, offline, concurrency, 2FA, graph, dash) | 88 tests, ~40 s |
|
|
118
|
+
|
|
119
|
+
A single network round-trip to a cloud memory API costs more than this
|
|
120
|
+
entire pipeline. The property that makes engRAM secure (no plaintext
|
|
121
|
+
index ever on disk, so all search is RAM-resident) is the same property
|
|
122
|
+
that makes it fast: below 20k records search is exact SIMD matrix math,
|
|
123
|
+
recall = 1.0 by construction; above it, SIMD HNSW at ~99% recall.
|
|
124
|
+
|
|
125
|
+
## The memory logic
|
|
126
|
+
|
|
127
|
+
Full write-path, decision math, and comparisons in
|
|
128
|
+
[docs/MEMORY.md](docs/MEMORY.md). The load-bearing ideas:
|
|
129
|
+
|
|
130
|
+
**Nearly everything is stored; nothing important is buried.** Only empty
|
|
131
|
+
turns are dropped. A bare "OK" is not noise, it is a decision: when the
|
|
132
|
+
agent asks *"Want me to send this reply to the client now?"* and the user
|
|
133
|
+
answers *"OK"*, engRAM resolves the question from the conversation and
|
|
134
|
+
stores
|
|
135
|
+
`[decision 2026-07-20] Approved (answered "OK"): Want me to send this
|
|
136
|
+
reply to the client now?` at the top importance tier. Asking *"did the
|
|
137
|
+
user say to email the client?"* later retrieves exactly that record.
|
|
138
|
+
|
|
139
|
+
**Deterministic importance tiers rank recall**: decisions/consent 0.90,
|
|
140
|
+
personal facts and preferences 0.80, the user's machine and configuration
|
|
141
|
+
0.75, other substantive statements 0.55, pleasantries 0.20 (kept, ranked
|
|
142
|
+
last). The fused score is
|
|
143
|
+
`RRF(vector) + RRF(keyword) + 0.02·cosine + 0.006·importance`: cosine
|
|
144
|
+
magnitude keeps the genuinely best match on top, importance settles
|
|
145
|
+
near-ties in favor of what matters. The agent learns the user and the
|
|
146
|
+
computer first, the world second, and forgets nothing.
|
|
147
|
+
|
|
148
|
+
**One pinned embedding space.** The model's SHA-256 is recorded in the
|
|
149
|
+
vault and enforced at open; cosine comparisons stay mathematically valid
|
|
150
|
+
forever instead of silently degrading when a model changes. Migration is
|
|
151
|
+
explicit: `engram reindex --re-embed`.
|
|
152
|
+
|
|
153
|
+
**No LLM inside.** Embeddings run locally (bundled 384-dim int8 ONNX
|
|
154
|
+
model, <300 MB RAM). Judgment belongs to the host model you already run,
|
|
155
|
+
via `engram_store` / `engram_forget`; engRAM contributes deterministic
|
|
156
|
+
capture, encryption, and total recall. That split is what makes the
|
|
157
|
+
offline guarantee absolute and every decision reproducible. Pair engRAM
|
|
158
|
+
with an offline LLM and the whole agent stack can run usefully with no
|
|
159
|
+
network at all.
|
|
160
|
+
|
|
161
|
+
## Agent-native by design
|
|
162
|
+
|
|
163
|
+
engRAM is built to sit under agents you already use, not as a separate
|
|
164
|
+
app you babysit.
|
|
165
|
+
|
|
166
|
+
- **Hermes native provider** - shows up in `hermes memory setup` with
|
|
167
|
+
**"no setup needed"**. Turns sync automatically; search injects only
|
|
168
|
+
what is relevant, tagged as data not instructions.
|
|
169
|
+
- **Claude over MCP** - one `integrate claude` step registers the server
|
|
170
|
+
and gives you the Desktop config block plus a managed CLAUDE.md block so memory
|
|
171
|
+
is part of normal work.
|
|
172
|
+
- **OpenClaw and any MCP client** - same stdio server, zero open ports,
|
|
173
|
+
same tools (`memory_search`, `memory_store`, `memory_forget`, lock).
|
|
174
|
+
- **A memory graph, not just a memory pile** - `memory_link` records
|
|
175
|
+
explicit relations (who works where, what belongs to what), with
|
|
176
|
+
optional validity windows; `memory_relations` answers entity,
|
|
177
|
+
predicate, and as-of queries. Deterministic storage, host-model
|
|
178
|
+
judgment - the same split as everything else in engRAM.
|
|
179
|
+
- **CLI for everything else** - scripts, cron, other agents: `engram
|
|
180
|
+
store`, `engram search`, `engram forget`, `engram link`,
|
|
181
|
+
`engram relations`, `engram lock`.
|
|
182
|
+
- **See the vault: `engram dash`** - one command opens a local page with
|
|
183
|
+
everything at a glance: how many memories of what kind, growth over
|
|
184
|
+
time, the relation graph, tags, per-agent counts, live search. Served
|
|
185
|
+
from RAM, 127.0.0.1-only behind a random URL token, read-only, zero
|
|
186
|
+
outbound requests, zero configuration.
|
|
187
|
+
- **Panic lock from the agent** - `memory_lock` / `engram lock` clears
|
|
188
|
+
stored credentials instantly when you need the vault closed now.
|
|
189
|
+
- **One vault, many hosts** - Hermes, Claude, and the CLI can share a
|
|
190
|
+
vault at once; each caller gets its own identity and namespace ACLs.
|
|
191
|
+
- **One memory, no sections** - the starting memories seeded at `init`
|
|
192
|
+
live in `main` as ordinary records, editable and forgettable like
|
|
193
|
+
anything the agent stores; older vaults reorganize automatically.
|
|
194
|
+
|
|
195
|
+
Day to day, the point is simple: the agent remembers *you*, your
|
|
196
|
+
decisions, and your machine - encrypted, offline, and fast - without a
|
|
197
|
+
cloud account.
|
|
198
|
+
|
|
199
|
+
## The lock model
|
|
200
|
+
|
|
201
|
+
You lock and unlock the vault yourself whenever you want. Manual control
|
|
202
|
+
is always available:
|
|
203
|
+
|
|
204
|
+
- **`engram unlock`** - open the vault with YOUR passphrase. You choose
|
|
205
|
+
it; engRAM never auto-generates a password, seed, or recovery phrase,
|
|
206
|
+
and there is no credential it knows that you don't. (Vaults made by
|
|
207
|
+
older versions that received an auto-generated recovery phrase still
|
|
208
|
+
open with it.)
|
|
209
|
+
- **`engram lock`** - close it again and clear every stored credential.
|
|
210
|
+
Agents can do the same via the `memory_lock` panic tool.
|
|
211
|
+
- **`engram 2fa enable`** - optional two-factor unlock: your passphrase
|
|
212
|
+
(knowledge) plus a keyfile (possession - keep it on a USB stick).
|
|
213
|
+
Both factors feed Argon2id together, so needing both is enforced by
|
|
214
|
+
arithmetic, not a policy check; a stolen vault file plus your
|
|
215
|
+
passphrase still opens nothing without the keyfile. One command, zero
|
|
216
|
+
configuration: the keyfile's location is remembered, so day-to-day
|
|
217
|
+
unlocking feels exactly the same while the file is present.
|
|
218
|
+
|
|
219
|
+
The default unlock mode is convenience, not a cage: after a normal
|
|
220
|
+
unlock, the vault stays usable across processes, logouts, and logins -
|
|
221
|
+
for weeks or months if you leave it that way - until the next restart or
|
|
222
|
+
power loss, or until you lock it yourself. Restart/power loss always
|
|
223
|
+
locks it: the stored credential is the master key wrapped by a key
|
|
224
|
+
derived from the kernel's boot timestamp plus the stable machine id; a
|
|
225
|
+
new boot can never open the old wrap. That is arithmetic, not a policy
|
|
226
|
+
check.
|
|
227
|
+
|
|
228
|
+
If you prefer reboot-surviving unlock on macOS, that is an explicit
|
|
229
|
+
opt-in (`engram unlock --keychain`), with the tradeoff documented. At any
|
|
230
|
+
time you can lock, unlock, lock again - on your schedule.
|
|
231
|
+
|
|
232
|
+
## Security, in one paragraph
|
|
233
|
+
|
|
234
|
+
XChaCha20-Poly1305 AEAD on everything at rest including vectors
|
|
235
|
+
(embedding-inversion resistance) · Argon2id keyslots, LUKS-style, opened
|
|
236
|
+
only by the user's own passphrase (no auto-generated credentials),
|
|
237
|
+
optionally two-factor with a keyfile · per-record keys enabling `forget --shred`
|
|
238
|
+
(crypto-shred: key destroyed, content mathematically unrecoverable) ·
|
|
239
|
+
fsync'd sealed journal, atomic compaction, verified kill-9 crash recovery ·
|
|
240
|
+
hash-chained tamper-evident audit log (`engram audit verify`) · per-caller
|
|
241
|
+
namespace ACLs, quarantine tier for untrusted content, signed vault
|
|
242
|
+
manifests · stdio MCP transport: zero open ports · runtime offline guard
|
|
243
|
+
that aborts on any socket attempt; CI runs the whole suite with it active
|
|
244
|
+
on Linux, macOS, and Windows · no telemetry, ever. Full honest threat
|
|
245
|
+
model, including what engRAM cannot protect against, in
|
|
246
|
+
[SECURITY.md](SECURITY.md).
|
|
247
|
+
|
|
248
|
+
## One vault, many agents
|
|
249
|
+
|
|
250
|
+
Hermes, Claude, and the CLI can share a single vault simultaneously:
|
|
251
|
+
writes are serialized by an advisory file lock, every process detects
|
|
252
|
+
foreign writes and reloads, and each host gets its own caller identity
|
|
253
|
+
and namespace with rw/ro grants. A locked vault is one portable file,
|
|
254
|
+
safe to move over any channel; `engram lock --sign` seals it with an
|
|
255
|
+
Ed25519 manifest the recipient can verify without any credential.
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
engram lock
|
|
259
|
+
scp ~/.engram/memory.vault other-machine:
|
|
260
|
+
engram --vault memory.vault unlock # your passphrase (+ keyfile if 2FA)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Documentation
|
|
264
|
+
|
|
265
|
+
| | |
|
|
266
|
+
|---|---|
|
|
267
|
+
| [docs/MEMORY.md](docs/MEMORY.md) | how memory is stored, what gets remembered, why the math wins |
|
|
268
|
+
| [docs/INTEGRATIONS.md](docs/INTEGRATIONS.md) | selecting engRAM in Hermes, OpenClaw, Claude, everything else |
|
|
269
|
+
| [SECURITY.md](SECURITY.md) | full threat model, honest limits |
|
|
270
|
+
| [FORMAT.md](FORMAT.md) | byte-level `.vault` and `.mpack` specs (language-agnostic) |
|
|
271
|
+
| [PACKS.md](PACKS.md) | authoring and shipping signed memory packs |
|
|
272
|
+
|
|
273
|
+
## License
|
|
274
|
+
|
|
275
|
+
MIT.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "engram-memory-vault"
|
|
7
|
+
version = "1.8.1"
|
|
8
|
+
description = "engRAM - high-security, fully offline, encrypted vector memory for AI agents (MCP)"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
dependencies = [
|
|
13
|
+
"pynacl>=1.5",
|
|
14
|
+
"argon2-cffi>=23.1",
|
|
15
|
+
"onnxruntime>=1.17",
|
|
16
|
+
"tokenizers>=0.15",
|
|
17
|
+
"numpy>=1.26",
|
|
18
|
+
"mcp>=1.0",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.scripts]
|
|
22
|
+
engram = "engram.cli:main"
|
|
23
|
+
|
|
24
|
+
[project.optional-dependencies]
|
|
25
|
+
# usearch (SIMD HNSW) is only needed ABOVE 20k records; below that engRAM
|
|
26
|
+
# uses an exact brute-force index. Keeping it optional means the default
|
|
27
|
+
# `pip install` compiles nothing and installs cleanly everywhere; large
|
|
28
|
+
# corpora add it with `pip install engram-memory-vault[hnsw]`.
|
|
29
|
+
hnsw = ["usearch>=2.9"]
|
|
30
|
+
dev = ["pytest>=8", "usearch>=2.9"]
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.packages.find]
|
|
33
|
+
where = ["src"]
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.package-data]
|
|
36
|
+
engram = ["models/**/*", "data/**/*"]
|