aether-cache 0.1.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.
- aether_cache-0.1.0/PKG-INFO +353 -0
- aether_cache-0.1.0/README.md +341 -0
- aether_cache-0.1.0/aether_cache/__init__.py +3 -0
- aether_cache-0.1.0/aether_cache/__main__.py +5 -0
- aether_cache-0.1.0/aether_cache/cli.py +240 -0
- aether_cache-0.1.0/aether_cache/config.py +44 -0
- aether_cache-0.1.0/aether_cache/connect.py +195 -0
- aether_cache-0.1.0/aether_cache/engine/aether-engine.jar +0 -0
- aether_cache-0.1.0/aether_cache/engine.py +253 -0
- aether_cache-0.1.0/aether_cache/server.py +464 -0
- aether_cache-0.1.0/aether_cache.egg-info/PKG-INFO +353 -0
- aether_cache-0.1.0/aether_cache.egg-info/SOURCES.txt +16 -0
- aether_cache-0.1.0/aether_cache.egg-info/dependency_links.txt +1 -0
- aether_cache-0.1.0/aether_cache.egg-info/entry_points.txt +2 -0
- aether_cache-0.1.0/aether_cache.egg-info/requires.txt +3 -0
- aether_cache-0.1.0/aether_cache.egg-info/top_level.txt +1 -0
- aether_cache-0.1.0/pyproject.toml +28 -0
- aether_cache-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aether-cache
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Shared memory for AI coding tools that stays true to your code.
|
|
5
|
+
Author: Anish Chugh
|
|
6
|
+
Project-URL: Homepage, https://github.com/anishchugh05/Aether-Cache-Redis-Compatible-Vector-Store
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: mcp>=1.2
|
|
10
|
+
Requires-Dist: fastembed>=0.3
|
|
11
|
+
Requires-Dist: redis>=5.0
|
|
12
|
+
|
|
13
|
+
[](https://app.codecrafters.io/users/anishchugh05?r=2qF)
|
|
14
|
+
|
|
15
|
+
# Aether Cache
|
|
16
|
+
|
|
17
|
+
**Shared memory for AI coding tools that stays true to your code.**
|
|
18
|
+
|
|
19
|
+
Claude Code, Cursor, and other AI tools each forget your project between sessions, and when they do remember things,
|
|
20
|
+
nothing checks whether those memories are still correct. Aether Cache gives every tool one shared, local memory, and keeps
|
|
21
|
+
it honest:
|
|
22
|
+
|
|
23
|
+
- **Memories go stale when the code changes.** Each memory is linked to the files it's about, with a snapshot of their
|
|
24
|
+
git content hash. When `docker-compose.yml` changes, the memory about it is retired automatically instead of being
|
|
25
|
+
fed to your AI forever.
|
|
26
|
+
- **Contradictions get replaced, not hoarded.** "We migrated to MySQL" retires "we use Postgres" instead of sitting
|
|
27
|
+
next to it and confusing the model. Near-identical repeats are merged.
|
|
28
|
+
- **Every memory can explain itself.** Which tool and session saved it, which file versions it was based on, and every
|
|
29
|
+
change since: created, seen again, went stale, confirmed, replaced.
|
|
30
|
+
- **It works with the files you already use.** Current memories sync into a managed section of `AGENTS.md` and
|
|
31
|
+
`CLAUDE.md`, so they're committed, reviewed in PRs, and visible to teammates who don't run Aether Cache.
|
|
32
|
+
|
|
33
|
+
It runs entirely on your machine, on top of a database engine I wrote from scratch.
|
|
34
|
+
|
|
35
|
+
## Not a Redis clone
|
|
36
|
+
|
|
37
|
+
Aether Cache started as a from-scratch rebuild of Redis in Java, then kept going. Every layer here is written from
|
|
38
|
+
scratch, and each one does something the layer beneath it can't:
|
|
39
|
+
|
|
40
|
+
| Layer | What it adds |
|
|
41
|
+
|---|---|
|
|
42
|
+
| **MCP server** | Claude Code, Cursor, and any MCP tool share one memory |
|
|
43
|
+
| **Git awareness** | Memories retire themselves when the code they describe changes |
|
|
44
|
+
| **Memory layer** | Status, provenance, full history, duplicate merging, and conflict review, inside the engine |
|
|
45
|
+
| **HNSW vector index** | Semantic search: 99.4% recall at 0.84 ms on 100K vectors, 22× faster than exact search |
|
|
46
|
+
| **Redis-compatible engine** | RESP protocol, 50+ commands, replication, transactions, and crash-safe persistence (0 acknowledged writes lost across 1,039,890 writes and 8 `kill -9` crashes), at 88–93% of real Redis's throughput |
|
|
47
|
+
|
|
48
|
+
The bottom layer alone is a working Redis: `redis-cli`, `redis-benchmark`, and `redis-py` talk to it unchanged. The
|
|
49
|
+
memory layer, git awareness, and MCP server are things Redis doesn't do at all.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Claude Code ─┐ ┌─────────────────────────────────────────────┐
|
|
53
|
+
Cursor ──────┼─ MCP ─► aether_cache ─┼─ RESP ─► Java engine (Main.java) │
|
|
54
|
+
other tools ─┘ (Python: embeddings,│ memories, HNSW vector index, │
|
|
55
|
+
git hashing, sync) │ history, append-only file on disk │
|
|
56
|
+
└─────────────────────────────────────────────┘
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## What it looks like
|
|
60
|
+
|
|
61
|
+
A memory linked to a file, the file changes, and the next lookup catches it:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
> remember("The database runs Postgres via docker compose", files=["docker-compose.yml"])
|
|
65
|
+
Saved as m1.
|
|
66
|
+
|
|
67
|
+
... someone edits docker-compose.yml ...
|
|
68
|
+
|
|
69
|
+
> recall("database setup")
|
|
70
|
+
These memories were just retired because files they depend on changed. If one is still true,
|
|
71
|
+
call confirm_memory; if it's wrong, save the corrected fact with remember:
|
|
72
|
+
[m1] "The database runs Postgres via docker compose" is now marked outdated: docker-compose.yml changed.
|
|
73
|
+
|
|
74
|
+
> confirm_memory("m1") # still true, so re-link it to the new version of the file
|
|
75
|
+
Confirmed m1; it's active again and linked to the current file versions.
|
|
76
|
+
|
|
77
|
+
> explain_memory("m1")
|
|
78
|
+
m1: "The database runs Postgres via docker compose"
|
|
79
|
+
status: active, project: demo
|
|
80
|
+
saved by: claude-code (session eea54b5c)
|
|
81
|
+
linked files: docker-compose.yml@02ea346...
|
|
82
|
+
history:
|
|
83
|
+
19:16 created: by claude-code (session eea54b5c), linked to docker-compose.yml@87da641...
|
|
84
|
+
19:16 active -> stale: docker-compose.yml changed since this was saved
|
|
85
|
+
19:16 re-linked: to docker-compose.yml@02ea346... (confirmed still true)
|
|
86
|
+
19:16 stale -> active: confirmed still true
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
A newer fact replacing an older one:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
> remember("The API timeout was raised to 60 seconds")
|
|
93
|
+
Saved as m3.
|
|
94
|
+
Related existing memories:
|
|
95
|
+
[m1] (similarity 0.58) The API timeout is 30 seconds
|
|
96
|
+
If m3 makes any of these no longer true, call replace_memory(old_id, "m3"). Otherwise do nothing.
|
|
97
|
+
|
|
98
|
+
> replace_memory("m1", "m3")
|
|
99
|
+
m1 retired; m3 replaces it.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Quick start
|
|
103
|
+
|
|
104
|
+
You need **Java 11+** (`brew install openjdk@21` on macOS, or [adoptium.net](https://adoptium.net)) and
|
|
105
|
+
[**uv**](https://docs.astral.sh/uv/) (`curl -LsSf https://astral.sh/uv/install.sh | sh`), which also takes care of
|
|
106
|
+
Python for you. Then:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
uv tool install git+https://github.com/anishchugh05/Aether-Cache-Redis-Compatible-Vector-Store
|
|
110
|
+
aether-cache setup
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`setup` starts the engine in the background, downloads the embedding model once (about 90 MB), and connects every
|
|
114
|
+
supported AI tool it finds on your machine: **Claude Code, Cursor, and Codex**. That's it. Open your AI tool in any git
|
|
115
|
+
repo and try:
|
|
116
|
+
|
|
117
|
+
> Remember that our tests need DOCKER_HOST set. It depends on docker-compose.yml.
|
|
118
|
+
|
|
119
|
+
Then start a new session and ask how to run the tests.
|
|
120
|
+
|
|
121
|
+
Memories are kept per project (the git repo's folder name), so projects never mix. Everything stays on your machine:
|
|
122
|
+
the engine only accepts connections from it, and your memories live in `~/.aether-cache`.
|
|
123
|
+
|
|
124
|
+
| Command | What it does |
|
|
125
|
+
|---|---|
|
|
126
|
+
| `aether-cache setup` | One-time setup: engine, model, and AI tools |
|
|
127
|
+
| `aether-cache status` | Is it running, and what's in this project's memory |
|
|
128
|
+
| `aether-cache doctor` | Checks everything and tells you how to fix what's wrong |
|
|
129
|
+
| `aether-cache list` / `recall "query"` / `explain m1` | Look at memories from the terminal |
|
|
130
|
+
| `aether-cache sync` | Writes current memories into `AGENTS.md` / `CLAUDE.md` |
|
|
131
|
+
| `aether-cache connect cursor` | Connects one tool (`--print` shows config for any other MCP tool) |
|
|
132
|
+
| `aether-cache start` / `stop` | Runs or stops the engine (it also starts on its own when a tool needs it) |
|
|
133
|
+
|
|
134
|
+
If `aether-cache` isn't found after installing, run `uv tool update-shell` and open a new terminal. Port 7380 taken?
|
|
135
|
+
Set `AETHER_PORT` and run `setup` again. To uninstall: `aether-cache stop && uv tool uninstall aether-cache`.
|
|
136
|
+
|
|
137
|
+
## Tools the AI can call
|
|
138
|
+
|
|
139
|
+
| Tool | What it does |
|
|
140
|
+
|---|---|
|
|
141
|
+
| `remember(fact, files?)` | Saves a durable fact, optionally linked to files. Merges near-identical repeats and shows related memories so the AI can decide whether the new fact replaces one. |
|
|
142
|
+
| `recall(query, limit?)` | Searches the project's memories by meaning. Checks linked files first, so it never returns a memory whose code changed underneath it. |
|
|
143
|
+
| `explain_memory(id)` | Where a memory came from and its full history. |
|
|
144
|
+
| `replace_memory(old, new)` | Retires an older memory that a newer one makes untrue. |
|
|
145
|
+
| `mark_outdated(id, reason)` | Retires a memory that turned out to be wrong. |
|
|
146
|
+
| `confirm_memory(id)` | Brings back a memory that's still true after its files changed, re-linked to the current versions. |
|
|
147
|
+
| `check_stale()` | Runs the file check on demand. |
|
|
148
|
+
| `list_conflicts()` / `resolve_conflict(...)` | Reviews pairs of very similar memories that may contradict each other. |
|
|
149
|
+
| `sync_to_files()` | Writes current memories into `AGENTS.md` / `CLAUDE.md` (also: `aether-cache sync`). |
|
|
150
|
+
|
|
151
|
+
## Design decisions, and what the measurements said
|
|
152
|
+
|
|
153
|
+
### Similarity can't detect contradictions, so the AI judges
|
|
154
|
+
|
|
155
|
+
The first version flagged a new memory as a possible contradiction when it was similar to an existing one. Calibrating
|
|
156
|
+
with real `all-MiniLM-L6-v2` embeddings showed that can't work:
|
|
157
|
+
|
|
158
|
+
| Pair | Kind | Similarity |
|
|
159
|
+
|---|---|---|
|
|
160
|
+
| "we use Postgres" / "the database is Postgres" | duplicate | 0.73 |
|
|
161
|
+
| "tests need DOCKER_HOST set" / "you have to set DOCKER_HOST before running tests" | duplicate | 0.92 |
|
|
162
|
+
| "we use Postgres" / "we migrated to MySQL" | **contradiction** | **0.30** |
|
|
163
|
+
| "API timeout is 30 seconds" / "API timeout is 60 seconds" | **contradiction** | **0.94** |
|
|
164
|
+
| "tests need DOCKER_HOST set" / "integration tests need a running Redis" | related, both true | 0.34 |
|
|
165
|
+
|
|
166
|
+
Duplicates scored 0.73 to 0.92 and contradictions 0.30 to 0.94, so no threshold separates them. A threshold low enough
|
|
167
|
+
to merge real duplicates would silently merge "timeout is 30s" with "timeout is 60s", the worst bug this product could
|
|
168
|
+
have. So the engine only auto-merges near-identical text (similarity ≥ 0.97). For everything else, embeddings *find*
|
|
169
|
+
the related memories and the AI, which already understands the sentences, *decides* whether one replaces another.
|
|
170
|
+
|
|
171
|
+
### Staleness compares file contents, not commits
|
|
172
|
+
|
|
173
|
+
Each linked file is stored as `path@<git blob hash>`, computed with `git hash-object`. Comparing contents rather than
|
|
174
|
+
commit ids catches uncommitted edits, ignores commits that didn't touch the file, and needs no git hooks: `recall`
|
|
175
|
+
re-hashes the handful of linked files before every search.
|
|
176
|
+
|
|
177
|
+
### Memories never mutate silently
|
|
178
|
+
|
|
179
|
+
Every change is a logged event with a timestamp and a reason. The engine logs each memory *with* the id and timestamp
|
|
180
|
+
it assigned, so replaying the log after a restart rebuilds the exact same memories and histories, down to the
|
|
181
|
+
millisecond, instead of minting new ones.
|
|
182
|
+
|
|
183
|
+
## The engine underneath
|
|
184
|
+
|
|
185
|
+
A Redis-compatible server written from scratch in Java. It speaks RESP, so `redis-cli`, `redis-benchmark`, and
|
|
186
|
+
`redis-py` work with it unchanged. The core was built by completing every stage and extension of the
|
|
187
|
+
[CodeCrafters "Build Your Own Redis"](https://codecrafters.io/challenges/redis) challenge; the vector index,
|
|
188
|
+
persistence hardening, and the memory layer are my own additions.
|
|
189
|
+
|
|
190
|
+
### Throughput vs. official Redis
|
|
191
|
+
|
|
192
|
+
`redis-benchmark -t set,get`, 100K requests, 50 parallel clients, 3-byte values, same machine:
|
|
193
|
+
|
|
194
|
+
| | Aether Cache | Redis 8.10.2 | Aether Cache as % of Redis |
|
|
195
|
+
|---|---|---|---|
|
|
196
|
+
| SET | 205.8K ops/sec | 233.6K ops/sec | 88% |
|
|
197
|
+
| GET | 225.7K ops/sec | 242.7K ops/sec | 93% |
|
|
198
|
+
| p50 latency | 0.119 ms | 0.111 ms | |
|
|
199
|
+
| p99 latency (SET / GET) | 0.375 / 0.231 ms | 0.359 / 0.159 ms | |
|
|
200
|
+
| max latency (SET) | 19.7 ms | 1.3 ms | JVM GC / JIT pauses |
|
|
201
|
+
|
|
202
|
+
Typical latency is on par with Redis. The gap is in worst-case latency, from JVM garbage collection and JIT warm-up,
|
|
203
|
+
which Redis (written in C) doesn't have.
|
|
204
|
+
|
|
205
|
+
### HNSW vector search vs. exact search
|
|
206
|
+
|
|
207
|
+
100,000 AG News headlines embedded with `all-MiniLM-L6-v2` (384 dimensions, cosine similarity), 500 held-out queries,
|
|
208
|
+
k = 10. Recall is measured against exact brute-force search on the same data.
|
|
209
|
+
|
|
210
|
+
| Mode | Recall@10 | p50 latency | p99 latency |
|
|
211
|
+
|---|---|---|---|
|
|
212
|
+
| Exact (brute force) | 1.000 | 18.58 ms | 20.52 ms |
|
|
213
|
+
| HNSW, ef=10 | 0.905 | 0.49 ms | 1.38 ms |
|
|
214
|
+
| HNSW, ef=20 | 0.951 | 0.52 ms | 0.73 ms |
|
|
215
|
+
| HNSW, ef=50 | 0.985 | 0.66 ms | 0.89 ms |
|
|
216
|
+
| **HNSW, ef=100** | **0.994** | **0.84 ms** | **1.41 ms** |
|
|
217
|
+
| HNSW, ef=200 | 0.998 | 1.24 ms | 2.19 ms |
|
|
218
|
+
|
|
219
|
+
At ef=100, HNSW returns 99.4% of the true top-10 about **22× faster** than exact search. Building the index for 100K
|
|
220
|
+
vectors took 136 seconds (M=16, M0=32, efConstruction=200). Latencies are measured from the Python client, so they
|
|
221
|
+
include network and client overhead. Full setup and raw numbers: `results.json`.
|
|
222
|
+
|
|
223
|
+
**How it works:** each vector links to its nearest neighbors in a layered graph. A search starts on a sparse top layer
|
|
224
|
+
of long-range links, hops greedily toward the query, drops down a layer at a time, and finishes with a best-first search
|
|
225
|
+
on the bottom layer that keeps the `ef` best candidates. Neighbor selection uses the diversity heuristic from the HNSW
|
|
226
|
+
paper (prefer neighbors in different directions over near-duplicates), which is what keeps recall high.
|
|
227
|
+
|
|
228
|
+
**Filtered search:** HNSW doesn't know about memory status, so searches over-fetch candidates, drop the ones that don't
|
|
229
|
+
match (stale or superseded), widen the search if too few survive, and fall back to an exact scan if needed. In a test
|
|
230
|
+
with 2,000 memories where only 2% were active, filtered searches returned exactly the correct top 10 on 30/30 queries.
|
|
231
|
+
The catch: at that selectivity, the exact fallback runs most of the time, which is the known weak spot of
|
|
232
|
+
post-filtering on graph indexes.
|
|
233
|
+
|
|
234
|
+
### Crash safety
|
|
235
|
+
|
|
236
|
+
Every write goes to an append-only file (AOF) that is replayed on startup.
|
|
237
|
+
|
|
238
|
+
**`kill -9` crash test** (`crash_test.py`): a client writes as fast as it can, the server is killed at a random moment,
|
|
239
|
+
restarted, and every write the server acknowledged is checked.
|
|
240
|
+
|
|
241
|
+
| fsync policy | Crashes | Acknowledged writes | Lost |
|
|
242
|
+
|---|---|---|---|
|
|
243
|
+
| `everysec` | 5 | 757,295 | **0** |
|
|
244
|
+
| `always` | 3 | 282,595 | **0** |
|
|
245
|
+
|
|
246
|
+
Recovery took 0.6 seconds per restart, replaying up to ~185K writes.
|
|
247
|
+
|
|
248
|
+
**Torn writes:** a machine crash can cut the last write off halfway. The first version refused to start on such a file;
|
|
249
|
+
now replay stops at the last complete command, trims the partial one, and starts normally with all earlier data intact.
|
|
250
|
+
|
|
251
|
+
**Cost of each fsync policy** (SET throughput, 50 clients):
|
|
252
|
+
|
|
253
|
+
| Policy | Throughput | p50 latency |
|
|
254
|
+
|---|---|---|
|
|
255
|
+
| `always` (sync every write) | 42.9K/sec | 1.159 ms |
|
|
256
|
+
| `everysec` (sync once a second) | 113.9K/sec | 0.103 ms |
|
|
257
|
+
| `no` (let the OS decide) | 118.8K/sec | 0.103 ms |
|
|
258
|
+
|
|
259
|
+
`everysec` is 2.7× faster than `always` and within 4% of `no`, which is why it's the sensible default. On macOS, `fsync`
|
|
260
|
+
doesn't force the SSD's own cache to flush, so `always` looks cheaper here than it would on a Linux server.
|
|
261
|
+
|
|
262
|
+
### Full command list
|
|
263
|
+
|
|
264
|
+
- **Memory:**
|
|
265
|
+
- `MEM.ADD`, `MEM.GET`, `MEM.SEARCH` (with `STATUS` filter), `MEM.STATUS`, `MEM.WHY`, `MEM.LIST`
|
|
266
|
+
- `MEM.FILES`, `MEM.SEEN`, `MEM.CONFLICTS`, `MEM.RESOLVE`
|
|
267
|
+
- **Vectors:** `VADD`, `VSEARCH` (HNSW, tunable `EF`, `EXACT` mode)
|
|
268
|
+
- **Strings:** `GET`, `SET` (`EX` / `PX`), `INCR`, `STRLEN`, `TYPE`, `KEYS *`
|
|
269
|
+
- **Lists:** `RPUSH`, `LPUSH`, `LRANGE`, `LLEN`, `LPOP`, blocking `BLPOP`
|
|
270
|
+
- **Streams:** `XADD` (explicit, partial, and auto IDs), `XRANGE`, `XREAD` (with `BLOCK` and `$`)
|
|
271
|
+
- **Sorted sets:** `ZADD`, `ZRANK`, `ZRANGE`, `ZCARD`, `ZSCORE`, `ZREM`
|
|
272
|
+
- **Bitmaps:** `SETBIT`, `GETBIT`, `BITCOUNT`, `BITOP AND` / `OR` (binary-safe strings)
|
|
273
|
+
- **Geospatial:** `GEOADD`, `GEOPOS`, `GEODIST`, `GEOSEARCH ... FROMLONLAT ... BYRADIUS`
|
|
274
|
+
- **Transactions:** `MULTI`, `EXEC`, `DISCARD`, `WATCH`, `UNWATCH` (optimistic locking via per-key write versions)
|
|
275
|
+
- **Pub/Sub:** `SUBSCRIBE`, `UNSUBSCRIBE`, `PUBLISH`
|
|
276
|
+
- **Replication:**
|
|
277
|
+
- Master–replica handshake (`PING`, `REPLCONF`, `PSYNC`) and command propagation
|
|
278
|
+
- `REPLCONF GETACK` offset tracking and `WAIT`
|
|
279
|
+
- **Persistence:** RDB loading; AOF with a manifest, `appendfsync always` / `everysec` / `no`, and torn-write recovery
|
|
280
|
+
- **Auth:** `AUTH`, `ACL WHOAMI` / `GETUSER` / `SETUSER` (SHA-256 password hashes)
|
|
281
|
+
|
|
282
|
+
### Running the engine on its own
|
|
283
|
+
|
|
284
|
+
```sh
|
|
285
|
+
java src/main/java/Main.java # port 6379
|
|
286
|
+
java src/main/java/Main.java --bind 127.0.0.1 # accept connections from this machine only
|
|
287
|
+
java src/main/java/Main.java --port 6380 --replicaof "localhost 6379"
|
|
288
|
+
java src/main/java/Main.java --dir /tmp/data --appendonly yes --appendfsync everysec
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Reproducing the benchmarks
|
|
292
|
+
|
|
293
|
+
Each benchmark runs against the engine you've started:
|
|
294
|
+
|
|
295
|
+
```sh
|
|
296
|
+
redis-benchmark -p 6379 -t set,get # throughput; also run against redis-server to compare
|
|
297
|
+
python vector_bench.py # HNSW recall and latency (start the engine with -Xmx4g)
|
|
298
|
+
python crash_test.py everysec 5 # kill -9 crash test
|
|
299
|
+
python memory_mcp/calibrate.py # embedding similarity calibration
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Related work
|
|
303
|
+
|
|
304
|
+
Aether Cache is an early, open-source project. These are the production systems in the same space:
|
|
305
|
+
|
|
306
|
+
- **Vector search in Redis-style stores:**
|
|
307
|
+
- [Redis 8 vector sets](https://redis.io/docs/latest/develop/data-types/vector-sets/) and
|
|
308
|
+
[valkey-search](https://github.com/valkey-io/valkey-search) add HNSW vector search to Redis and Valkey.
|
|
309
|
+
- [hnswlib](https://github.com/nmslib/hnswlib) is the reference HNSW implementation.
|
|
310
|
+
- [Malkov & Yashunin (2016)](https://arxiv.org/abs/1603.09320) is the paper this index follows.
|
|
311
|
+
- **Memory for AI agents:** [Mem0](https://github.com/mem0ai/mem0), [Zep](https://www.getzep.com/),
|
|
312
|
+
[Letta](https://github.com/letta-ai/letta), and the
|
|
313
|
+
[MCP reference memory server](https://github.com/modelcontextprotocol/servers).
|
|
314
|
+
- **Instruction files:** [AGENTS.md](https://agents.md/) and `CLAUDE.md`. Aether Cache syncs into these rather than
|
|
315
|
+
replacing them.
|
|
316
|
+
|
|
317
|
+
## Status and limitations
|
|
318
|
+
|
|
319
|
+
Aether Cache is v1 and early. It works end to end in automated tests and is now being tried in real Claude Code sessions.
|
|
320
|
+
|
|
321
|
+
**Not done yet:**
|
|
322
|
+
- **A with-memory vs. without-memory evaluation** on real coding tasks, to measure whether it actually reduces
|
|
323
|
+
re-explaining.
|
|
324
|
+
- **AOF compaction:** the log only grows, and every status change adds a line.
|
|
325
|
+
- **A dashboard** to browse, confirm, and retire memories in the browser.
|
|
326
|
+
|
|
327
|
+
**Engine limitations:**
|
|
328
|
+
- **Threading:** one OS thread per connection, not an event loop. That's fine for a local tool, but it won't scale to
|
|
329
|
+
thousands of clients like Redis.
|
|
330
|
+
- **Transactions:** `EXEC` isn't isolated, so other clients' commands can interleave with a transaction's commands.
|
|
331
|
+
- **Vector index:** re-adding a vector updates it without rewiring its graph links, and there's no delete. Retired
|
|
332
|
+
memories are filtered out, not removed.
|
|
333
|
+
- **Replication:** full resync only, and a new replica assumes the master's dataset is empty.
|
|
334
|
+
- **Smaller gaps:**
|
|
335
|
+
- `KEYS *` lists only string keys.
|
|
336
|
+
- `GEOSEARCH` scans every member.
|
|
337
|
+
- ACL supports only the `default` user.
|
|
338
|
+
- `HELLO` (RESP3) isn't supported, so clients must use RESP2.
|
|
339
|
+
|
|
340
|
+
## Project layout
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
src/main/java/Main.java the engine (single file, from the CodeCrafters setup)
|
|
344
|
+
aether_cache/ the Python package behind the `aether-cache` command
|
|
345
|
+
server.py MCP server: embeddings, git staleness, AGENTS.md/CLAUDE.md sync
|
|
346
|
+
engine.py finds Java, starts and stops the engine in the background
|
|
347
|
+
connect.py registers Aether Cache with Claude Code, Cursor, and Codex
|
|
348
|
+
cli.py the `aether-cache` command
|
|
349
|
+
engine/aether-engine.jar the prebuilt engine (rebuild with `python scripts/build_engine.py`)
|
|
350
|
+
memory_mcp/calibrate.py similarity calibration for duplicate/contradiction thresholds
|
|
351
|
+
vector_bench.py HNSW benchmark (writes results.json)
|
|
352
|
+
crash_test.py kill -9 crash-safety test
|
|
353
|
+
```
|