wavemind 2.0.1__tar.gz → 2.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {wavemind-2.0.1/wavemind.egg-info → wavemind-2.0.2}/PKG-INFO +72 -9
  2. {wavemind-2.0.1 → wavemind-2.0.2}/README.md +71 -8
  3. {wavemind-2.0.1 → wavemind-2.0.2}/pyproject.toml +1 -1
  4. {wavemind-2.0.1 → wavemind-2.0.2/wavemind.egg-info}/PKG-INFO +72 -9
  5. {wavemind-2.0.1 → wavemind-2.0.2}/LICENSE +0 -0
  6. {wavemind-2.0.1 → wavemind-2.0.2}/setup.cfg +0 -0
  7. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_agent_memory_benchmark.py +0 -0
  8. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_api.py +0 -0
  9. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_api_process_persistence.py +0 -0
  10. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_cli_smoke.py +0 -0
  11. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_core_persistence.py +0 -0
  12. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_examples.py +0 -0
  13. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_import_benchmark.py +0 -0
  14. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_indexes_encoders.py +0 -0
  15. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_langchain_integration.py +0 -0
  16. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_packaging_files.py +0 -0
  17. {wavemind-2.0.1 → wavemind-2.0.2}/tests/test_semantic_and_latency.py +0 -0
  18. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/__init__.py +0 -0
  19. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/__main__.py +0 -0
  20. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/api.py +0 -0
  21. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/benchmark.py +0 -0
  22. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/cli.py +0 -0
  23. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/core.py +0 -0
  24. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/encoders.py +0 -0
  25. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/importers.py +0 -0
  26. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/indexes.py +0 -0
  27. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/integrations/__init__.py +0 -0
  28. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/integrations/langchain.py +0 -0
  29. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind/storage.py +0 -0
  30. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind.egg-info/SOURCES.txt +0 -0
  31. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind.egg-info/dependency_links.txt +0 -0
  32. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind.egg-info/entry_points.txt +0 -0
  33. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind.egg-info/requires.txt +0 -0
  34. {wavemind-2.0.1 → wavemind-2.0.2}/wavemind.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wavemind
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Persistent dynamic memory engine with vector search and wave-field re-ranking
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/CaspianG/wavemind
@@ -37,6 +37,8 @@ Dynamic: license-file
37
37
 
38
38
  ## Terminal Demo
39
39
 
40
+ From a cloned repository:
41
+
40
42
  ```text
41
43
  $ python examples/demo.py
42
44
  ✓ Remembered: "Andrey is a trader who tracks market breakouts."
@@ -51,23 +53,51 @@ The demo is offline, keyless, and uses the built-in hash encoder.
51
53
 
52
54
  ## Quick Start
53
55
 
56
+ Install from PyPI and create your first local memory:
57
+
54
58
  ```sh
55
- python -m pip install -e .
59
+ python -m pip install wavemind
56
60
  wavemind remember "Andrey is a trader" --namespace demo
57
61
  wavemind query "trader" --namespace demo
58
62
  ```
59
63
 
60
- This creates `wavemind.sqlite3` in your current working directory.
64
+ What happens here:
65
+
66
+ - `remember` writes the text and its vector pattern into a local SQLite database.
67
+ - By default, the database file is `wavemind.sqlite3` in your current working directory.
68
+ - `--namespace demo` keeps this memory separate from other users, agents, or projects.
69
+ - `query` reads from the same SQLite file and returns the closest remembered texts.
70
+
71
+ ## Optional Embeddings
61
72
 
62
73
  For sentence-transformer embeddings:
63
74
 
64
75
  ```sh
65
- python -m pip install -e ".[sentence]"
76
+ python -m pip install "wavemind[sentence]"
66
77
  wavemind --encoder sentence remember "Andrey is a trader" --namespace demo
67
78
  wavemind --encoder sentence query "What does Andrey do?" --namespace demo
68
79
  ```
69
80
 
70
- One-file setup scripts are also included:
81
+ ## Data Location
82
+
83
+ For an explicit database path, put global options before the command:
84
+
85
+ ```sh
86
+ wavemind --db ./agent_memory.sqlite3 remember "Andrey is a trader" --namespace demo
87
+ wavemind --db ./agent_memory.sqlite3 query "trader" --namespace demo
88
+ ```
89
+
90
+ ## Install From Source
91
+
92
+ For contributors installing from a local clone:
93
+
94
+ ```sh
95
+ git clone https://github.com/CaspianG/wavemind.git
96
+ cd wavemind
97
+ python -m pip install -e ".[sentence]"
98
+ ```
99
+
100
+ One-file setup scripts are also included in the repository:
71
101
 
72
102
  ```sh
73
103
  sh install.sh
@@ -94,12 +124,41 @@ memory = WaveMindMemory(db_path="agent_memory.sqlite3")
94
124
  # Replace: memory = ConversationBufferMemory()
95
125
  ```
96
126
 
97
- Offline runnable example:
127
+ Offline runnable example from a cloned repository:
98
128
 
99
129
  ```sh
100
130
  python examples/langchain_memory.py
101
131
  ```
102
132
 
133
+ ## Why Dynamic Memory
134
+
135
+ WaveMind is not positioned as "a faster Chroma." Chroma, Qdrant, Pinecone, and Weaviate are vector databases: they store embeddings and return nearest neighbors. That is the right tool for many static RAG workloads.
136
+
137
+ WaveMind is an agent memory layer. It still uses vector search first, but then applies memory-specific signals that a plain vector store does not model by default:
138
+
139
+ | memory behavior | Why it matters for agents | WaveMind mechanism |
140
+ |---|---|---|
141
+ | Hot memories | Facts recalled repeatedly should become easier to recall again. | Wave-field hotness and priority updates. |
142
+ | Aging memories | Old low-value facts should fade instead of competing forever. | TTL and decay-aware scoring. |
143
+ | Scoped memory | One user, agent, workspace, or project should not leak into another. | Namespaces and tags. |
144
+ | Explicit forgetting | Agents need deletion, privacy cleanup, and correction workflows. | `forget()` plus SQLite persistence. |
145
+ | Stable restart behavior | A memory system must survive process restarts. | SQLite source of truth, reloadable indexes. |
146
+ | Vector plus memory rank | Semantic similarity is necessary but not sufficient for long-running agents. | k-NN candidates first, wave field as re-ranker. |
147
+
148
+ The current Chroma benchmark below is intentionally conservative: it compares static retrieval on the same facts and the same hash embeddings. That benchmark is useful, but it does not exercise WaveMind's main product thesis: memory that changes over time as an agent recalls, reinforces, ages, and forgets information.
149
+
150
+ The benchmark that should decide whether WaveMind is worth using is a dynamic agent-memory benchmark:
151
+
152
+ | scenario | What should happen |
153
+ |---|---|
154
+ | A user repeats a preference many times. | WaveMind should rank it higher than equally similar but unused facts. |
155
+ | A fact expires via TTL. | WaveMind should suppress it without requiring manual vector cleanup. |
156
+ | A user corrects an old fact. | WaveMind should prefer the newer or reinforced memory. |
157
+ | A query is ambiguous across namespaces. | WaveMind should return only the scoped user's memory. |
158
+ | A long conversation has many irrelevant facts. | WaveMind should preserve useful recall instead of treating all vectors equally. |
159
+
160
+ In short: static vector search answers "what is nearest?" Agent memory also asks "what is still relevant, reinforced, scoped, and allowed to be remembered?"
161
+
103
162
  ## Benchmark
104
163
 
105
164
  Real Russian sentences from Tatoeba, 50 one-word queries, NumPy exact index.
@@ -118,7 +177,7 @@ Capacity check with the hash encoder:
118
177
  | 1000 | 0.88 | 1.00 | 1.50 ms |
119
178
  | 5000 | 0.72 | 0.88 | 5.68 ms |
120
179
 
121
- Run locally:
180
+ Run locally from a cloned repository:
122
181
 
123
182
  ```sh
124
183
  python benchmarks/ru_sentences_benchmark.py --sentences 200 --queries 50 --encoder hash --index numpy
@@ -130,12 +189,14 @@ Agent-memory benchmark against Chroma:
130
189
  200 Russian user facts, 50 natural-language questions, same precomputed `HashingTextEncoder` embeddings for WaveMind and Chroma.
131
190
  Full machine-readable result: `benchmarks/agent_memory_results.json`.
132
191
 
192
+ This is a static retrieval benchmark. It measures baseline ranking and latency, not hotness, TTL, repeated recall, or memory aging.
193
+
133
194
  | engine | precision@1 | precision@3 | avg latency |
134
195
  |---|---:|---:|---:|
135
196
  | WaveMind | 0.82 | 0.90 | 2.25 ms |
136
197
  | Chroma | 0.82 | 0.88 | 0.93 ms |
137
198
 
138
- Run locally:
199
+ Run locally from a cloned repository:
139
200
 
140
201
  ```sh
141
202
  pip install -e ".[bench]"
@@ -154,7 +215,7 @@ python benchmarks/agent_memory_benchmark.py --engines wavemind chroma --facts 20
154
215
  | Best fit | Small to medium agent memory with dynamic recall | Local RAG apps and prototypes | Large-scale vector search |
155
216
  | Scale target today | Up to 1000 optimal on NumPy, FAISS recommended beyond 5000 | Larger than WaveMind local mode | Production scale |
156
217
 
157
- WaveMind is not trying to replace dedicated vector databases at scale. Its difference is dynamic priority: frequently used memories can become hotter while old or low-priority memories fade.
218
+ WaveMind is not trying to replace dedicated vector databases at scale. The intended product gap is dynamic priority: frequently used memories can become hotter while old or low-priority memories fade. For static RAG over large document collections, use a mature vector database. For agent memory that needs persistence, scoped recall, TTL, forgetting, and reinforcement, WaveMind is designed to sit above or beside the vector index.
158
219
 
159
220
  ## Known Limitations
160
221
 
@@ -164,10 +225,12 @@ WaveMind is not trying to replace dedicated vector databases at scale. Its diffe
164
225
  - `sentence-transformers/paraphrase-multilingual-mpnet-base-v2` requires about 420 MB of model files and measured about 53 ms per query on the benchmark machine.
165
226
  - The Chroma comparison currently uses shared precomputed hash embeddings to isolate retrieval/ranking behavior; semantic model comparisons should be run separately.
166
227
  - In the 200-fact agent benchmark, Chroma is faster on average while WaveMind is slightly higher at `precision@3`.
228
+ - The current public benchmark does not yet prove the dynamic-memory advantage. The next benchmark must test hotness, TTL, corrections, namespace isolation, and repeated recall.
167
229
 
168
230
  ## Roadmap
169
231
 
170
232
  - FAISS-first production index path with persisted index rebuilds.
233
+ - Dynamic agent-memory benchmark against Chroma/Qdrant: hotness, TTL, stale-fact suppression, corrections, and namespace isolation.
171
234
  - Expand the agent-memory benchmark to sentence-transformers, FAISS, Chroma default embeddings, and Qdrant.
172
235
  - Better semantic query expansion for short and ambiguous queries.
173
236
  - Namespace quotas, backups, and daemon hardening for SaaS use.
@@ -6,6 +6,8 @@
6
6
 
7
7
  ## Terminal Demo
8
8
 
9
+ From a cloned repository:
10
+
9
11
  ```text
10
12
  $ python examples/demo.py
11
13
  ✓ Remembered: "Andrey is a trader who tracks market breakouts."
@@ -20,23 +22,51 @@ The demo is offline, keyless, and uses the built-in hash encoder.
20
22
 
21
23
  ## Quick Start
22
24
 
25
+ Install from PyPI and create your first local memory:
26
+
23
27
  ```sh
24
- python -m pip install -e .
28
+ python -m pip install wavemind
25
29
  wavemind remember "Andrey is a trader" --namespace demo
26
30
  wavemind query "trader" --namespace demo
27
31
  ```
28
32
 
29
- This creates `wavemind.sqlite3` in your current working directory.
33
+ What happens here:
34
+
35
+ - `remember` writes the text and its vector pattern into a local SQLite database.
36
+ - By default, the database file is `wavemind.sqlite3` in your current working directory.
37
+ - `--namespace demo` keeps this memory separate from other users, agents, or projects.
38
+ - `query` reads from the same SQLite file and returns the closest remembered texts.
39
+
40
+ ## Optional Embeddings
30
41
 
31
42
  For sentence-transformer embeddings:
32
43
 
33
44
  ```sh
34
- python -m pip install -e ".[sentence]"
45
+ python -m pip install "wavemind[sentence]"
35
46
  wavemind --encoder sentence remember "Andrey is a trader" --namespace demo
36
47
  wavemind --encoder sentence query "What does Andrey do?" --namespace demo
37
48
  ```
38
49
 
39
- One-file setup scripts are also included:
50
+ ## Data Location
51
+
52
+ For an explicit database path, put global options before the command:
53
+
54
+ ```sh
55
+ wavemind --db ./agent_memory.sqlite3 remember "Andrey is a trader" --namespace demo
56
+ wavemind --db ./agent_memory.sqlite3 query "trader" --namespace demo
57
+ ```
58
+
59
+ ## Install From Source
60
+
61
+ For contributors installing from a local clone:
62
+
63
+ ```sh
64
+ git clone https://github.com/CaspianG/wavemind.git
65
+ cd wavemind
66
+ python -m pip install -e ".[sentence]"
67
+ ```
68
+
69
+ One-file setup scripts are also included in the repository:
40
70
 
41
71
  ```sh
42
72
  sh install.sh
@@ -63,12 +93,41 @@ memory = WaveMindMemory(db_path="agent_memory.sqlite3")
63
93
  # Replace: memory = ConversationBufferMemory()
64
94
  ```
65
95
 
66
- Offline runnable example:
96
+ Offline runnable example from a cloned repository:
67
97
 
68
98
  ```sh
69
99
  python examples/langchain_memory.py
70
100
  ```
71
101
 
102
+ ## Why Dynamic Memory
103
+
104
+ WaveMind is not positioned as "a faster Chroma." Chroma, Qdrant, Pinecone, and Weaviate are vector databases: they store embeddings and return nearest neighbors. That is the right tool for many static RAG workloads.
105
+
106
+ WaveMind is an agent memory layer. It still uses vector search first, but then applies memory-specific signals that a plain vector store does not model by default:
107
+
108
+ | memory behavior | Why it matters for agents | WaveMind mechanism |
109
+ |---|---|---|
110
+ | Hot memories | Facts recalled repeatedly should become easier to recall again. | Wave-field hotness and priority updates. |
111
+ | Aging memories | Old low-value facts should fade instead of competing forever. | TTL and decay-aware scoring. |
112
+ | Scoped memory | One user, agent, workspace, or project should not leak into another. | Namespaces and tags. |
113
+ | Explicit forgetting | Agents need deletion, privacy cleanup, and correction workflows. | `forget()` plus SQLite persistence. |
114
+ | Stable restart behavior | A memory system must survive process restarts. | SQLite source of truth, reloadable indexes. |
115
+ | Vector plus memory rank | Semantic similarity is necessary but not sufficient for long-running agents. | k-NN candidates first, wave field as re-ranker. |
116
+
117
+ The current Chroma benchmark below is intentionally conservative: it compares static retrieval on the same facts and the same hash embeddings. That benchmark is useful, but it does not exercise WaveMind's main product thesis: memory that changes over time as an agent recalls, reinforces, ages, and forgets information.
118
+
119
+ The benchmark that should decide whether WaveMind is worth using is a dynamic agent-memory benchmark:
120
+
121
+ | scenario | What should happen |
122
+ |---|---|
123
+ | A user repeats a preference many times. | WaveMind should rank it higher than equally similar but unused facts. |
124
+ | A fact expires via TTL. | WaveMind should suppress it without requiring manual vector cleanup. |
125
+ | A user corrects an old fact. | WaveMind should prefer the newer or reinforced memory. |
126
+ | A query is ambiguous across namespaces. | WaveMind should return only the scoped user's memory. |
127
+ | A long conversation has many irrelevant facts. | WaveMind should preserve useful recall instead of treating all vectors equally. |
128
+
129
+ In short: static vector search answers "what is nearest?" Agent memory also asks "what is still relevant, reinforced, scoped, and allowed to be remembered?"
130
+
72
131
  ## Benchmark
73
132
 
74
133
  Real Russian sentences from Tatoeba, 50 one-word queries, NumPy exact index.
@@ -87,7 +146,7 @@ Capacity check with the hash encoder:
87
146
  | 1000 | 0.88 | 1.00 | 1.50 ms |
88
147
  | 5000 | 0.72 | 0.88 | 5.68 ms |
89
148
 
90
- Run locally:
149
+ Run locally from a cloned repository:
91
150
 
92
151
  ```sh
93
152
  python benchmarks/ru_sentences_benchmark.py --sentences 200 --queries 50 --encoder hash --index numpy
@@ -99,12 +158,14 @@ Agent-memory benchmark against Chroma:
99
158
  200 Russian user facts, 50 natural-language questions, same precomputed `HashingTextEncoder` embeddings for WaveMind and Chroma.
100
159
  Full machine-readable result: `benchmarks/agent_memory_results.json`.
101
160
 
161
+ This is a static retrieval benchmark. It measures baseline ranking and latency, not hotness, TTL, repeated recall, or memory aging.
162
+
102
163
  | engine | precision@1 | precision@3 | avg latency |
103
164
  |---|---:|---:|---:|
104
165
  | WaveMind | 0.82 | 0.90 | 2.25 ms |
105
166
  | Chroma | 0.82 | 0.88 | 0.93 ms |
106
167
 
107
- Run locally:
168
+ Run locally from a cloned repository:
108
169
 
109
170
  ```sh
110
171
  pip install -e ".[bench]"
@@ -123,7 +184,7 @@ python benchmarks/agent_memory_benchmark.py --engines wavemind chroma --facts 20
123
184
  | Best fit | Small to medium agent memory with dynamic recall | Local RAG apps and prototypes | Large-scale vector search |
124
185
  | Scale target today | Up to 1000 optimal on NumPy, FAISS recommended beyond 5000 | Larger than WaveMind local mode | Production scale |
125
186
 
126
- WaveMind is not trying to replace dedicated vector databases at scale. Its difference is dynamic priority: frequently used memories can become hotter while old or low-priority memories fade.
187
+ WaveMind is not trying to replace dedicated vector databases at scale. The intended product gap is dynamic priority: frequently used memories can become hotter while old or low-priority memories fade. For static RAG over large document collections, use a mature vector database. For agent memory that needs persistence, scoped recall, TTL, forgetting, and reinforcement, WaveMind is designed to sit above or beside the vector index.
127
188
 
128
189
  ## Known Limitations
129
190
 
@@ -133,10 +194,12 @@ WaveMind is not trying to replace dedicated vector databases at scale. Its diffe
133
194
  - `sentence-transformers/paraphrase-multilingual-mpnet-base-v2` requires about 420 MB of model files and measured about 53 ms per query on the benchmark machine.
134
195
  - The Chroma comparison currently uses shared precomputed hash embeddings to isolate retrieval/ranking behavior; semantic model comparisons should be run separately.
135
196
  - In the 200-fact agent benchmark, Chroma is faster on average while WaveMind is slightly higher at `precision@3`.
197
+ - The current public benchmark does not yet prove the dynamic-memory advantage. The next benchmark must test hotness, TTL, corrections, namespace isolation, and repeated recall.
136
198
 
137
199
  ## Roadmap
138
200
 
139
201
  - FAISS-first production index path with persisted index rebuilds.
202
+ - Dynamic agent-memory benchmark against Chroma/Qdrant: hotness, TTL, stale-fact suppression, corrections, and namespace isolation.
140
203
  - Expand the agent-memory benchmark to sentence-transformers, FAISS, Chroma default embeddings, and Qdrant.
141
204
  - Better semantic query expansion for short and ambiguous queries.
142
205
  - Namespace quotas, backups, and daemon hardening for SaaS use.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wavemind"
7
- version = "2.0.1"
7
+ version = "2.0.2"
8
8
  description = "Persistent dynamic memory engine with vector search and wave-field re-ranking"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wavemind
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Persistent dynamic memory engine with vector search and wave-field re-ranking
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/CaspianG/wavemind
@@ -37,6 +37,8 @@ Dynamic: license-file
37
37
 
38
38
  ## Terminal Demo
39
39
 
40
+ From a cloned repository:
41
+
40
42
  ```text
41
43
  $ python examples/demo.py
42
44
  ✓ Remembered: "Andrey is a trader who tracks market breakouts."
@@ -51,23 +53,51 @@ The demo is offline, keyless, and uses the built-in hash encoder.
51
53
 
52
54
  ## Quick Start
53
55
 
56
+ Install from PyPI and create your first local memory:
57
+
54
58
  ```sh
55
- python -m pip install -e .
59
+ python -m pip install wavemind
56
60
  wavemind remember "Andrey is a trader" --namespace demo
57
61
  wavemind query "trader" --namespace demo
58
62
  ```
59
63
 
60
- This creates `wavemind.sqlite3` in your current working directory.
64
+ What happens here:
65
+
66
+ - `remember` writes the text and its vector pattern into a local SQLite database.
67
+ - By default, the database file is `wavemind.sqlite3` in your current working directory.
68
+ - `--namespace demo` keeps this memory separate from other users, agents, or projects.
69
+ - `query` reads from the same SQLite file and returns the closest remembered texts.
70
+
71
+ ## Optional Embeddings
61
72
 
62
73
  For sentence-transformer embeddings:
63
74
 
64
75
  ```sh
65
- python -m pip install -e ".[sentence]"
76
+ python -m pip install "wavemind[sentence]"
66
77
  wavemind --encoder sentence remember "Andrey is a trader" --namespace demo
67
78
  wavemind --encoder sentence query "What does Andrey do?" --namespace demo
68
79
  ```
69
80
 
70
- One-file setup scripts are also included:
81
+ ## Data Location
82
+
83
+ For an explicit database path, put global options before the command:
84
+
85
+ ```sh
86
+ wavemind --db ./agent_memory.sqlite3 remember "Andrey is a trader" --namespace demo
87
+ wavemind --db ./agent_memory.sqlite3 query "trader" --namespace demo
88
+ ```
89
+
90
+ ## Install From Source
91
+
92
+ For contributors installing from a local clone:
93
+
94
+ ```sh
95
+ git clone https://github.com/CaspianG/wavemind.git
96
+ cd wavemind
97
+ python -m pip install -e ".[sentence]"
98
+ ```
99
+
100
+ One-file setup scripts are also included in the repository:
71
101
 
72
102
  ```sh
73
103
  sh install.sh
@@ -94,12 +124,41 @@ memory = WaveMindMemory(db_path="agent_memory.sqlite3")
94
124
  # Replace: memory = ConversationBufferMemory()
95
125
  ```
96
126
 
97
- Offline runnable example:
127
+ Offline runnable example from a cloned repository:
98
128
 
99
129
  ```sh
100
130
  python examples/langchain_memory.py
101
131
  ```
102
132
 
133
+ ## Why Dynamic Memory
134
+
135
+ WaveMind is not positioned as "a faster Chroma." Chroma, Qdrant, Pinecone, and Weaviate are vector databases: they store embeddings and return nearest neighbors. That is the right tool for many static RAG workloads.
136
+
137
+ WaveMind is an agent memory layer. It still uses vector search first, but then applies memory-specific signals that a plain vector store does not model by default:
138
+
139
+ | memory behavior | Why it matters for agents | WaveMind mechanism |
140
+ |---|---|---|
141
+ | Hot memories | Facts recalled repeatedly should become easier to recall again. | Wave-field hotness and priority updates. |
142
+ | Aging memories | Old low-value facts should fade instead of competing forever. | TTL and decay-aware scoring. |
143
+ | Scoped memory | One user, agent, workspace, or project should not leak into another. | Namespaces and tags. |
144
+ | Explicit forgetting | Agents need deletion, privacy cleanup, and correction workflows. | `forget()` plus SQLite persistence. |
145
+ | Stable restart behavior | A memory system must survive process restarts. | SQLite source of truth, reloadable indexes. |
146
+ | Vector plus memory rank | Semantic similarity is necessary but not sufficient for long-running agents. | k-NN candidates first, wave field as re-ranker. |
147
+
148
+ The current Chroma benchmark below is intentionally conservative: it compares static retrieval on the same facts and the same hash embeddings. That benchmark is useful, but it does not exercise WaveMind's main product thesis: memory that changes over time as an agent recalls, reinforces, ages, and forgets information.
149
+
150
+ The benchmark that should decide whether WaveMind is worth using is a dynamic agent-memory benchmark:
151
+
152
+ | scenario | What should happen |
153
+ |---|---|
154
+ | A user repeats a preference many times. | WaveMind should rank it higher than equally similar but unused facts. |
155
+ | A fact expires via TTL. | WaveMind should suppress it without requiring manual vector cleanup. |
156
+ | A user corrects an old fact. | WaveMind should prefer the newer or reinforced memory. |
157
+ | A query is ambiguous across namespaces. | WaveMind should return only the scoped user's memory. |
158
+ | A long conversation has many irrelevant facts. | WaveMind should preserve useful recall instead of treating all vectors equally. |
159
+
160
+ In short: static vector search answers "what is nearest?" Agent memory also asks "what is still relevant, reinforced, scoped, and allowed to be remembered?"
161
+
103
162
  ## Benchmark
104
163
 
105
164
  Real Russian sentences from Tatoeba, 50 one-word queries, NumPy exact index.
@@ -118,7 +177,7 @@ Capacity check with the hash encoder:
118
177
  | 1000 | 0.88 | 1.00 | 1.50 ms |
119
178
  | 5000 | 0.72 | 0.88 | 5.68 ms |
120
179
 
121
- Run locally:
180
+ Run locally from a cloned repository:
122
181
 
123
182
  ```sh
124
183
  python benchmarks/ru_sentences_benchmark.py --sentences 200 --queries 50 --encoder hash --index numpy
@@ -130,12 +189,14 @@ Agent-memory benchmark against Chroma:
130
189
  200 Russian user facts, 50 natural-language questions, same precomputed `HashingTextEncoder` embeddings for WaveMind and Chroma.
131
190
  Full machine-readable result: `benchmarks/agent_memory_results.json`.
132
191
 
192
+ This is a static retrieval benchmark. It measures baseline ranking and latency, not hotness, TTL, repeated recall, or memory aging.
193
+
133
194
  | engine | precision@1 | precision@3 | avg latency |
134
195
  |---|---:|---:|---:|
135
196
  | WaveMind | 0.82 | 0.90 | 2.25 ms |
136
197
  | Chroma | 0.82 | 0.88 | 0.93 ms |
137
198
 
138
- Run locally:
199
+ Run locally from a cloned repository:
139
200
 
140
201
  ```sh
141
202
  pip install -e ".[bench]"
@@ -154,7 +215,7 @@ python benchmarks/agent_memory_benchmark.py --engines wavemind chroma --facts 20
154
215
  | Best fit | Small to medium agent memory with dynamic recall | Local RAG apps and prototypes | Large-scale vector search |
155
216
  | Scale target today | Up to 1000 optimal on NumPy, FAISS recommended beyond 5000 | Larger than WaveMind local mode | Production scale |
156
217
 
157
- WaveMind is not trying to replace dedicated vector databases at scale. Its difference is dynamic priority: frequently used memories can become hotter while old or low-priority memories fade.
218
+ WaveMind is not trying to replace dedicated vector databases at scale. The intended product gap is dynamic priority: frequently used memories can become hotter while old or low-priority memories fade. For static RAG over large document collections, use a mature vector database. For agent memory that needs persistence, scoped recall, TTL, forgetting, and reinforcement, WaveMind is designed to sit above or beside the vector index.
158
219
 
159
220
  ## Known Limitations
160
221
 
@@ -164,10 +225,12 @@ WaveMind is not trying to replace dedicated vector databases at scale. Its diffe
164
225
  - `sentence-transformers/paraphrase-multilingual-mpnet-base-v2` requires about 420 MB of model files and measured about 53 ms per query on the benchmark machine.
165
226
  - The Chroma comparison currently uses shared precomputed hash embeddings to isolate retrieval/ranking behavior; semantic model comparisons should be run separately.
166
227
  - In the 200-fact agent benchmark, Chroma is faster on average while WaveMind is slightly higher at `precision@3`.
228
+ - The current public benchmark does not yet prove the dynamic-memory advantage. The next benchmark must test hotness, TTL, corrections, namespace isolation, and repeated recall.
167
229
 
168
230
  ## Roadmap
169
231
 
170
232
  - FAISS-first production index path with persisted index rebuilds.
233
+ - Dynamic agent-memory benchmark against Chroma/Qdrant: hotness, TTL, stale-fact suppression, corrections, and namespace isolation.
171
234
  - Expand the agent-memory benchmark to sentence-transformers, FAISS, Chroma default embeddings, and Qdrant.
172
235
  - Better semantic query expansion for short and ambiguous queries.
173
236
  - Namespace quotas, backups, and daemon hardening for SaaS use.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes