NWcortex 1.0.1__py3-none-any.whl
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.
- nwcortex-1.0.1.dist-info/METADATA +317 -0
- nwcortex-1.0.1.dist-info/RECORD +111 -0
- nwcortex-1.0.1.dist-info/WHEEL +5 -0
- nwcortex-1.0.1.dist-info/entry_points.txt +5 -0
- nwcortex-1.0.1.dist-info/licenses/LICENSE +21 -0
- nwcortex-1.0.1.dist-info/top_level.txt +1 -0
- star_graph/__init__.py +398 -0
- star_graph/__main__.py +20 -0
- star_graph/abstraction.py +518 -0
- star_graph/anchor.py +869 -0
- star_graph/async_manager.py +463 -0
- star_graph/atom_facts.py +541 -0
- star_graph/autobiography.py +4 -0
- star_graph/benchmark.py +10 -0
- star_graph/bm25.py +129 -0
- star_graph/brain_sphere.py +247 -0
- star_graph/cascade.py +264 -0
- star_graph/causal_edges.py +217 -0
- star_graph/cli.py +210 -0
- star_graph/cluster_memory.py +200 -0
- star_graph/cognitive_cache.py +625 -0
- star_graph/community.py +642 -0
- star_graph/competition.py +242 -0
- star_graph/compiler.py +524 -0
- star_graph/compression.py +959 -0
- star_graph/config.py +486 -0
- star_graph/consolidation/__init__.py +37 -0
- star_graph/contrib/__init__.py +33 -0
- star_graph/contrib/benchmark.py +820 -0
- star_graph/contrib/mcp_server.py +416 -0
- star_graph/contrib/snapshot.py +567 -0
- star_graph/contrib/streaming.py +399 -0
- star_graph/contrib/symbolic_filter.py +182 -0
- star_graph/cortex.py +534 -0
- star_graph/cortex_api/__init__.py +31 -0
- star_graph/cost_estimator.py +325 -0
- star_graph/defaults.yaml +543 -0
- star_graph/domain_router.py +401 -0
- star_graph/dual_channel.py +691 -0
- star_graph/edge_budget.py +4 -0
- star_graph/edge_decay.py +4 -0
- star_graph/edge_management.py +264 -0
- star_graph/embedding.py +225 -0
- star_graph/embedding_provider/__init__.py +43 -0
- star_graph/embedding_provider/providers.py +404 -0
- star_graph/episodic_memory.py +264 -0
- star_graph/evolution.py +548 -0
- star_graph/exact_cache.py +4 -0
- star_graph/extras/__init__.py +41 -0
- star_graph/extras/autobiography.py +329 -0
- star_graph/extras/resonance.py +214 -0
- star_graph/four_layer.py +624 -0
- star_graph/gate.py +218 -0
- star_graph/ghost.py +536 -0
- star_graph/goal_tree.py +365 -0
- star_graph/graph.py +1244 -0
- star_graph/hippocampus.py +262 -0
- star_graph/hub.py +847 -0
- star_graph/index.py +98 -0
- star_graph/layers.py +143 -0
- star_graph/logger.py +118 -0
- star_graph/manager.py +128 -0
- star_graph/manager_stats.py +49 -0
- star_graph/math_utils.py +43 -0
- star_graph/mcp_server.py +4 -0
- star_graph/memory_core/__init__.py +43 -0
- star_graph/metrics.py +181 -0
- star_graph/micro_sleep.py +295 -0
- star_graph/multimodal.py +561 -0
- star_graph/online.py +116 -0
- star_graph/personality.py +299 -0
- star_graph/raw_buffer.py +275 -0
- star_graph/reflection_loop.py +426 -0
- star_graph/resonance.py +4 -0
- star_graph/retrieval_budget.py +125 -0
- star_graph/retrieval_core.py +1029 -0
- star_graph/retrieval_engine/__init__.py +36 -0
- star_graph/retrieval_pipeline.py +37 -0
- star_graph/retriever.py +879 -0
- star_graph/router.py +304 -0
- star_graph/runtime.py +1045 -0
- star_graph/runtime_core.py +440 -0
- star_graph/runtime_lifecycle.py +407 -0
- star_graph/runtime_stats.py +2 -0
- star_graph/scheduler.py +881 -0
- star_graph/seed.py +34 -0
- star_graph/self_org.py +302 -0
- star_graph/server.py +166 -0
- star_graph/shard.py +231 -0
- star_graph/sleep.py +563 -0
- star_graph/sleep_consolidate.py +943 -0
- star_graph/sleep_nrem.py +206 -0
- star_graph/sleep_rem.py +148 -0
- star_graph/sleep_report.py +125 -0
- star_graph/snapshot.py +4 -0
- star_graph/spreading.py +211 -0
- star_graph/sqlite_storage.py +371 -0
- star_graph/storage.py +176 -0
- star_graph/storage_backend.py +66 -0
- star_graph/streaming.py +4 -0
- star_graph/survival.py +294 -0
- star_graph/symbolic_filter.py +4 -0
- star_graph/thermal_store.py +260 -0
- star_graph/tier.py +960 -0
- star_graph/tiered.py +4 -0
- star_graph/timespine.py +296 -0
- star_graph/topology.py +332 -0
- star_graph/tracing.py +366 -0
- star_graph/versioned_memory.py +217 -0
- star_graph/working_memory.py +267 -0
- star_graph/write_gate.py +326 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: NWcortex
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: NeuroWeave Cortex (NWC) — Graph-first cognitive memory runtime for AI agents. Hippocampal-inspired architecture with domain routing, spreading activation, edge budget management, 4-layer compression, thermal storage, personality modeling, and 8-phase sleep consolidation.
|
|
5
|
+
Author-email: Thatgfsj <thatgfsj@users.noreply.github.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: repository, https://github.com/Thatgfsj/neuroweave-cortex
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: numpy>=1.24.0
|
|
23
|
+
Requires-Dist: PyYAML>=6.0
|
|
24
|
+
Requires-Dist: scikit-learn>=1.3.0
|
|
25
|
+
Provides-Extra: embeddings
|
|
26
|
+
Requires-Dist: sentence-transformers>=2.2.0; extra == "embeddings"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# NeuroWeave Cortex (NWC) — Cognitive Memory Runtime
|
|
30
|
+
|
|
31
|
+
An infrastructure-grade memory system for AI agents. Not a vector database. Not a graph database. A **memory runtime** — it remembers, forgets, strengthens, connects, abstracts, and evolves, the way biological memory does.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Anchors: 131 Edges: 211 Ghosts: 0 Schemas: 9 Abstracts: 1
|
|
35
|
+
Memory Stability: 0.72 Recall Plasticity: 0.58 Compression: 1.6x
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## What makes it different
|
|
39
|
+
|
|
40
|
+
Vector databases retrieve. Graph databases traverse. NeuroWeave Cortex runs a **cognitive lifecycle**:
|
|
41
|
+
|
|
42
|
+
| Capability | Vector DB | Graph DB | NeuroWeave Cortex |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| Semantic retrieval | yes | no | yes |
|
|
45
|
+
| Graph traversal | no | yes | yes |
|
|
46
|
+
| Automatic forgetting (survival decay) | no | no | yes |
|
|
47
|
+
| Memory strengthening (rehearsal) | no | no | yes |
|
|
48
|
+
| Conflict detection (contradiction edges) | no | no | yes |
|
|
49
|
+
| Fuzzy recall ("I think I remember...") | no | no | yes |
|
|
50
|
+
| Emergent abstraction (pattern discovery) | no | no | yes |
|
|
51
|
+
| Temporal context (TimeSpine-indexed) | no | no | yes |
|
|
52
|
+
| 8-phase sleep consolidation | no | no | yes |
|
|
53
|
+
| Ghost revival (savings effect) | no | no | yes |
|
|
54
|
+
| Autobiographical self-model | no | no | yes |
|
|
55
|
+
|
|
56
|
+
## Quick Start
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from star_graph import MemoryManager
|
|
60
|
+
from star_graph.scheduler import AgentContext
|
|
61
|
+
|
|
62
|
+
# One-line setup
|
|
63
|
+
mgr = MemoryManager()
|
|
64
|
+
|
|
65
|
+
# Remember things
|
|
66
|
+
mgr.remember("User debugs Redis connection timeout — pool was 10, fixed to 20",
|
|
67
|
+
tags=["redis", "debug", "timeout"])
|
|
68
|
+
mgr.remember("User knows Python async programming with asyncio",
|
|
69
|
+
tags=["python", "knowledge"])
|
|
70
|
+
mgr.remember("User prefers type hints and concise code",
|
|
71
|
+
tags=["preference", "style"])
|
|
72
|
+
|
|
73
|
+
# Working memory — fast, ephemeral buffer for active context
|
|
74
|
+
mgr.remember_working("Currently debugging auth middleware timeout",
|
|
75
|
+
tags=["debug", "auth"])
|
|
76
|
+
|
|
77
|
+
# Context-aware recall — working memory gets retrieval priority
|
|
78
|
+
ctx = AgentContext(task_type="debugging", active_goals=["fix Redis connection"])
|
|
79
|
+
memories = mgr.recall("Redis connection pool config", context=ctx)
|
|
80
|
+
print(memories.memory_summary)
|
|
81
|
+
|
|
82
|
+
# System-2 deep recall for exhaustive or low-confidence queries
|
|
83
|
+
memories = mgr.dual_recall("list all Redis-related issues", context=ctx)
|
|
84
|
+
|
|
85
|
+
# Micro-consolidation — incremental, non-blocking
|
|
86
|
+
mgr.micro_consolidate()
|
|
87
|
+
|
|
88
|
+
# Let the system sleep — 8-phase consolidation
|
|
89
|
+
report = mgr.sleep()
|
|
90
|
+
print(report)
|
|
91
|
+
|
|
92
|
+
# Persist
|
|
93
|
+
mgr.save("agent_memory.json")
|
|
94
|
+
mgr.load("agent_memory.json")
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Architecture
|
|
98
|
+
|
|
99
|
+
Three-layer design. Each layer depends only on the one below.
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Layer 3: Behavior │ Cortex routing, memory gating, working memory,
|
|
103
|
+
(cortex.py, │ dual-channel retrieval, adaptive replay, autobiographical memory
|
|
104
|
+
router.py, │ "What should I recall right now, at what detail level?"
|
|
105
|
+
gate.py, │
|
|
106
|
+
working_memory.py,│
|
|
107
|
+
scheduler.py, │
|
|
108
|
+
autobiography.py)│
|
|
109
|
+
│
|
|
110
|
+
Layer 2: Cognitive │ Hub abstraction, cascade recall, TimeSpine temporal index,
|
|
111
|
+
(retriever.py, │ sleep consolidation, evolution, ghost revival,
|
|
112
|
+
sleep.py, │ abstraction, community detection, competition
|
|
113
|
+
evolution.py, │ "How do memories connect, strengthen, and fade?"
|
|
114
|
+
ghost.py, │
|
|
115
|
+
abstraction.py, │
|
|
116
|
+
community.py, │
|
|
117
|
+
competition.py, │
|
|
118
|
+
timespine.py, │
|
|
119
|
+
cascade.py, │
|
|
120
|
+
hub.py) │
|
|
121
|
+
│
|
|
122
|
+
Layer 1: Storage │ CRUD, persistence, ANN indexing, tiered storage,
|
|
123
|
+
(graph.py, │ BM25 keyword index, multi-level caching
|
|
124
|
+
anchor.py, │ "Where is this memory stored?"
|
|
125
|
+
storage.py, │
|
|
126
|
+
sqlite_storage.py,│
|
|
127
|
+
index.py, │
|
|
128
|
+
bm25.py, │
|
|
129
|
+
cognitive_cache.py,│
|
|
130
|
+
tier.py) │
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Core modules
|
|
134
|
+
|
|
135
|
+
| Module | Role |
|
|
136
|
+
|---|---|
|
|
137
|
+
| `manager.py` | High-level facade — `remember()`, `recall()`, `sleep()`, `save()` |
|
|
138
|
+
| `runtime.py` | Dependency container — manages all subsystem lifecycles |
|
|
139
|
+
| `retrieval_pipeline.py` | 5-layer dimensional descent (L0→L4) with automatic degradation |
|
|
140
|
+
| `scheduler.py` | Context-aware retrieval with memory type selection |
|
|
141
|
+
| `working_memory.py` | Short-term buffer (15-item, 1h TTL) — auto-promotes to long-term |
|
|
142
|
+
| `sleep.py` | 8-phase sleep: N1_Replay → N2_Merge → N3_Compression → N3b_AtomFacts → REM_Emotion → N4_Prune → N5_HubConnect → N6_IndexRebuild |
|
|
143
|
+
| `evolution.py` | Survival-based decay (Ebbinghaus/Power-law/Exponential), belief transitions, interference |
|
|
144
|
+
| `retriever.py` | HybridFusion + OscillationResonance + VectorSimilarity + Personalized PageRank + explainable scores |
|
|
145
|
+
| `dual_channel.py` | System-1 (fast) + System-2 (deep) dual-channel retrieval with auto-trigger |
|
|
146
|
+
| `bm25.py` | Sparse keyword retrieval (BM25) with reciprocal rank fusion for hybrid search |
|
|
147
|
+
| `ghost.py` | Latent memory traces with fuzzy recall and contradiction tracking (NegativeGhost) |
|
|
148
|
+
| `abstraction.py` | Emergent category discovery from anchor clusters |
|
|
149
|
+
| `community.py` | Louvain community detection with centroid routing |
|
|
150
|
+
| `anchor.py` | Memory unit with 6-state lifecycle, 10-dim AnchorVector, multiplicative retention |
|
|
151
|
+
| `graph.py` | Star graph with RichEdge (temporal, causal, state-transition), Schema, ReflectionNode |
|
|
152
|
+
| `timespine.py` | Temporal index for O(days×buckets) time-scoped retrieval |
|
|
153
|
+
| `cascade.py` | Causal chain traversal across connected memory sequences |
|
|
154
|
+
| `hub.py` | Hierarchical hub-and-spoke abstraction (leaf→domain→global) |
|
|
155
|
+
| `cortex.py` | Partitioned memory cortices with independent sleep and retrieval |
|
|
156
|
+
| `cognitive_cache.py` | Multi-level cache (query/session/topic/activation) + exact-match entity lookup |
|
|
157
|
+
| `tier.py` | STM/MTM/LTM/Core cognitive tiering + HOT/WARM/COLD storage tiers |
|
|
158
|
+
| `autobiography.py` | Self-narrative formation and autobiographical memory |
|
|
159
|
+
| `atom_facts.py` | LLM-powered atomic fact extraction from memory clusters |
|
|
160
|
+
| `survival.py` | Pluggable survival functions (Ebbinghaus, Power-law, Exponential, Custom) |
|
|
161
|
+
| `compression.py` | Multi-level session compression (episodic/strategic/meta) |
|
|
162
|
+
| `resonance.py` | Phase-locked oscillation resonance for temporal-coherent retrieval |
|
|
163
|
+
| `streaming.py` | Streaming memory buffer with backpressure |
|
|
164
|
+
| `benchmark.py` | Built-in benchmark suite (5 categories) |
|
|
165
|
+
| `config.py` | Centralized YAML config with schema validation, dot-path access, overrides |
|
|
166
|
+
|
|
167
|
+
## Retrieval Benchmarks
|
|
168
|
+
|
|
169
|
+
### LoCoMo Benchmark (real-world conversations)
|
|
170
|
+
|
|
171
|
+
Evaluated on the [LoCoMo-10 dataset](https://github.com/snap-research/LoCoMo): 10 conversations, 5,882 turns across 272 sessions, 1,986 QA pairs across 5 categories. Pure retrieval (no LLM generation).
|
|
172
|
+
|
|
173
|
+
| Method | has_answer | F1 | Latency |
|
|
174
|
+
|---|---|---|---|
|
|
175
|
+
| VectorSimilarity | 13.1% | 0.026 | 122.2ms |
|
|
176
|
+
| OscillationResonance | 11.9% | 0.026 | 110.4ms |
|
|
177
|
+
| **HybridFusion + BM25** | **15.3%** | **0.025** | <200ms |
|
|
178
|
+
|
|
179
|
+
Per-category has_answer:
|
|
180
|
+
|
|
181
|
+
| Category | #QA | VecSim | OscRes | HybFus |
|
|
182
|
+
|---|---|---|---|---|
|
|
183
|
+
| Temporal (1) | 282 | 3.5% | 2.8% | 4.3% |
|
|
184
|
+
| Short Memory (2) | 321 | 1.9% | 2.2% | 1.9% |
|
|
185
|
+
| Long Memory (3) | 96 | 2.1% | 2.1% | 3.1% |
|
|
186
|
+
| Composite (4) | 841 | 18.0% | 16.4% | 21.0% |
|
|
187
|
+
| Adversarial (5) | 446 | 20.4% | 18.4% | 23.5% |
|
|
188
|
+
|
|
189
|
+
### Internal Benchmark (synthetic multi-session)
|
|
190
|
+
|
|
191
|
+
6 sessions × 80 turns, 5 categories. 1.7x compression (6,708 → 3,982 tokens) with maintained or improved recall.
|
|
192
|
+
|
|
193
|
+
| Method | C-R@3 | C-R@5 | Interf |
|
|
194
|
+
|---|---|---|---|
|
|
195
|
+
| VectorSimilarity | 0.933 | 0.933 | N/A |
|
|
196
|
+
| **OscillationResonance** | **0.967** | **0.967** | 0.667 |
|
|
197
|
+
| HybridFusion | 0.900 | 0.900 | 0.667 |
|
|
198
|
+
|
|
199
|
+
## Memory Lifecycle
|
|
200
|
+
|
|
201
|
+
Every anchor moves through 6 states:
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
ACTIVE → REHEARSING → CONSOLIDATING → DORMANT → GHOST → REACTIVATED
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
- **Active**: Just created or recently accessed — fully plastic, easy to update
|
|
208
|
+
- **Rehearsing**: Being replayed during sleep — temporarily elevated importance
|
|
209
|
+
- **Consolidating**: Transferring from hippocampal to cortical — increasing stability
|
|
210
|
+
- **Dormant**: Stable, low-activity — read-only, cortical retrieval
|
|
211
|
+
- **Ghost**: Pruned but with residual trace — can partially recall or fully revive
|
|
212
|
+
- **Reactivated**: Ghost revived by new relevant experience — reduced stability, high plasticity
|
|
213
|
+
|
|
214
|
+
Paired with **ThermalState** (HOT → WARM → COLD → DEAD) for storage tier switching:
|
|
215
|
+
- HOT: in-memory, fully accessible
|
|
216
|
+
- WARM: in-memory, periodically flushed to disk
|
|
217
|
+
- COLD: disk-only, transparent thaw on access
|
|
218
|
+
|
|
219
|
+
## Sleep Consolidation
|
|
220
|
+
|
|
221
|
+
Sleep is not cleanup. Sleep **changes the graph**:
|
|
222
|
+
|
|
223
|
+
1. **N1_Replay** — prioritizes surprising and emotional memories for replay via SWR scoring
|
|
224
|
+
2. **N2_Merge** — fuses near-duplicate anchors (ANN-accelerated, O(n×k)), bridges constellations
|
|
225
|
+
3. **N3_Compression** — transfers memories from hippocampal to cortical, forms schemas
|
|
226
|
+
4. **N3b_AtomFacts** — LLM extraction of atomic facts from compressed clusters
|
|
227
|
+
5. **REM_Emotion** — strips emotional charge from consolidated memories
|
|
228
|
+
6. **N4_Prune** — removes weak anchors/edges, creates ghost traces for savings effect
|
|
229
|
+
7. **N5_HubConnect** — cross-cortex hub bridge formation
|
|
230
|
+
8. **N6_IndexRebuild** — refreshes ANN, BM25, and community indices
|
|
231
|
+
|
|
232
|
+
## Dual-Channel Retrieval
|
|
233
|
+
|
|
234
|
+
System-1 (fast, embedding + BM25 hybrid) and System-2 (deep, hierarchical traversal) with automatic triggering:
|
|
235
|
+
|
|
236
|
+
- Low-confidence System-1 results (<0.35) automatically trigger System-2
|
|
237
|
+
- Structural keywords ("all", "every", "list", "which", "before", "last") trigger exhaustive search
|
|
238
|
+
- Results merged via weighted reciprocal rank fusion
|
|
239
|
+
|
|
240
|
+
## Configuration
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
from star_graph.config import config, override, load_config
|
|
244
|
+
|
|
245
|
+
# Dot-path access
|
|
246
|
+
threshold = config.sleep.merge.default_threshold # 0.85
|
|
247
|
+
|
|
248
|
+
# Programmatic override
|
|
249
|
+
override('sleep.merge.default_threshold', 0.75)
|
|
250
|
+
override('gate.k', 30)
|
|
251
|
+
|
|
252
|
+
# Schema validation
|
|
253
|
+
warnings = config.validate() # type, range, and cross-section checks
|
|
254
|
+
|
|
255
|
+
# Load custom YAML
|
|
256
|
+
cfg = load_config("my_params.yaml")
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
See `star_graph/defaults.yaml` for all 300+ tunable parameters.
|
|
260
|
+
|
|
261
|
+
## Installation
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
# From PyPI (package name: NWcortex, import as: star_graph)
|
|
265
|
+
pip install NWcortex
|
|
266
|
+
|
|
267
|
+
# With sentence-transformers for semantic embeddings (~2GB model download on first use)
|
|
268
|
+
pip install "NWcortex[embeddings]"
|
|
269
|
+
|
|
270
|
+
# Optional: for SQLite storage backend
|
|
271
|
+
pip install aiosqlite
|
|
272
|
+
|
|
273
|
+
# Run demo
|
|
274
|
+
python examples/emergence_demo.py
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**Note:** Without `[embeddings]`, the system uses a lightweight TF-IDF fallback for text encoding. Install `sentence-transformers` only if you need semantic-quality embeddings.
|
|
278
|
+
|
|
279
|
+
## Interactive Demo
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
python examples/emergence_demo.py
|
|
283
|
+
|
|
284
|
+
# Or use the CLI:
|
|
285
|
+
# sg-add "Discussed microservices deployment patterns" --tags architecture --emotional 0.6
|
|
286
|
+
# sg-query "database connection pooling best practices"
|
|
287
|
+
# sg-query --trace "When did Alice visit Hawaii?"
|
|
288
|
+
# sg-stats --schemas --ghosts
|
|
289
|
+
# sg-sleep --retention 0.15 --edge-prune 0.1
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Benchmarks
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
python examples/memory_benchmark.py --quick # 4 sessions, ~200 turns
|
|
296
|
+
python examples/memory_benchmark.py --full # 12 sessions, ~5000 turns
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Running Tests
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
pip install pytest pytest-cov
|
|
303
|
+
pytest tests/ -v
|
|
304
|
+
|
|
305
|
+
# With coverage report
|
|
306
|
+
pytest tests/ --cov=star_graph --cov-report=term
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Status:** 1,989 tests passing, 80% coverage (v1.0.0).
|
|
310
|
+
|
|
311
|
+
## Roadmap
|
|
312
|
+
|
|
313
|
+
See [ROADMAP.md](ROADMAP.md) for planned work.
|
|
314
|
+
|
|
315
|
+
## License
|
|
316
|
+
|
|
317
|
+
MIT
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
nwcortex-1.0.1.dist-info/licenses/LICENSE,sha256=c7SQY1Au9u-eXS2X5Bhs7drJwCn8CJcrjuYrmqTp_V0,1065
|
|
2
|
+
star_graph/__init__.py,sha256=9Qbgd_v43fsKcdSqf94jXQwt3ricW4g9U0f4KPrAepY,20261
|
|
3
|
+
star_graph/__main__.py,sha256=BmHTHo1V7_zCn6k_Zzkz0yzL3n6ZE62iBdeTGdw5tX4,622
|
|
4
|
+
star_graph/abstraction.py,sha256=xf0VjqxbZWUeMP89nhDyXO_WfAYsG-dzjQ8SBxX9NZE,21728
|
|
5
|
+
star_graph/anchor.py,sha256=upi4Xlkopb-P64eF55rYQ6oNNkr9YVARMykzIBLpE2g,36296
|
|
6
|
+
star_graph/async_manager.py,sha256=wPJ84s7LjkBjGjYTIin2I61RJCi0cdi169fyK91zWnw,16432
|
|
7
|
+
star_graph/atom_facts.py,sha256=TkOq6nElWIcMMIC1kKk2EY52q2GuSUapR6Djmn_fAzI,20416
|
|
8
|
+
star_graph/autobiography.py,sha256=HuOTUXxY6GEX3cNRVBq2IW1WlKAJcA-qzewl-r9Bk90,219
|
|
9
|
+
star_graph/benchmark.py,sha256=PQO1TUrfoUrUEna9jFUBQNkHVhRUDKzYuITv_GL8NZ4,380
|
|
10
|
+
star_graph/bm25.py,sha256=XPf4REWSmypclpYjp709p4Y3u7MG6MS6QfHsN8FZENo,4385
|
|
11
|
+
star_graph/brain_sphere.py,sha256=e0ARty1nftHfRg8MoSGeq9S1ZTxL2qdDqgrpo830g_Q,9591
|
|
12
|
+
star_graph/cascade.py,sha256=7cO3k88b6GL2lsoiLHsg_80DqnAHxl8jmqJFlDRpO5M,10700
|
|
13
|
+
star_graph/causal_edges.py,sha256=y4XW9J-VDpaYEDhXMhiliLEcVyzBs90ZJCr8JIFveuU,7765
|
|
14
|
+
star_graph/cli.py,sha256=M2fk7Nyt6RDT6_9F9WhTrGNFbo7SqJ1ZOuXumSOVIjQ,8602
|
|
15
|
+
star_graph/cluster_memory.py,sha256=yQWfvPrBuhbowpEWc4R5zWspU9wCUl_PjcbLKiwKpAQ,7870
|
|
16
|
+
star_graph/cognitive_cache.py,sha256=DdOrVJNH2WwVD4gPIaDhgnmNPHnW4JICQk_CAbrJkb4,22568
|
|
17
|
+
star_graph/community.py,sha256=ikFIZIXy0hyoEoby9tv6KKMsYxuM8MPxiKqNOQDveyU,24184
|
|
18
|
+
star_graph/competition.py,sha256=lLLlL0xsURquXTRAhxd4nrMId5nx1hDfqnXlGTbR0nk,9413
|
|
19
|
+
star_graph/compiler.py,sha256=S8k0T5rSWInaNabVfEMmS2rwQaWo3dITWHxn1wUCm-M,20905
|
|
20
|
+
star_graph/compression.py,sha256=q97kB_eCS1-2H0knNjCJVanoaWZ5P9EOpy5hXvBxhLE,37799
|
|
21
|
+
star_graph/config.py,sha256=bOz8vYgi59_bu2To5qqYDKHL05eOAQjHPPjFwUxCBKU,21369
|
|
22
|
+
star_graph/cortex.py,sha256=NMnORD8SlE1Zu6jxUbllZlRudYN9Np4mtHXZV6VnRXs,21663
|
|
23
|
+
star_graph/cost_estimator.py,sha256=8J-ZVnAx1bVmE9uadWNT4nYKnddPhxdxnYEVtgfOyUc,14175
|
|
24
|
+
star_graph/defaults.yaml,sha256=n_Iw5aEL8ZiU2PKK64jJPFEtiOYotu5X2PliusRWEMk,16419
|
|
25
|
+
star_graph/domain_router.py,sha256=WTaRzlU5_hFsl8wpSlP8NUo4I_mMeFFYugxPNvpw0a4,15826
|
|
26
|
+
star_graph/dual_channel.py,sha256=gUouHUiV6BRw1gRArrjWkR_4B3Lb0H6LcKq7d6sjm0Y,28979
|
|
27
|
+
star_graph/edge_budget.py,sha256=KZ1RcSSYKkZO1PXwxLJ1JfoHucb6hf9X2nkEpsODLrU,217
|
|
28
|
+
star_graph/edge_decay.py,sha256=Qru34hHvYudthx3jT-8mWOFHZX17F55_plrvmhNpx2M,196
|
|
29
|
+
star_graph/edge_management.py,sha256=AyMCfeBIiGO8bXVraueN-_m5uyYFVw1-hhSuVVNv8WU,10272
|
|
30
|
+
star_graph/embedding.py,sha256=7insqIm4bQVffmxFvRPP3fR9lX00MvXMJfNu-31OCAE,9175
|
|
31
|
+
star_graph/episodic_memory.py,sha256=M8RsiAA-3SCJBPYnYRocQL40v1tb9pvOAhgzmf5ofxs,10180
|
|
32
|
+
star_graph/evolution.py,sha256=jucFroByEmLd5NTkQSvGN04ZT_kVogAjD5j_RmkF2ec,24139
|
|
33
|
+
star_graph/exact_cache.py,sha256=bofkJJ7_kmwRC4CGTQZna_tSahrneNuf_86e8vf2TMg,237
|
|
34
|
+
star_graph/four_layer.py,sha256=TNtEv2GbaE3QknSKso4cwP1Eb7YpV3nmUVFuqeX-Mqg,23197
|
|
35
|
+
star_graph/gate.py,sha256=U9xrkTxIO88zWhOnWI8O5JH5XAUVzxekLZnCZbH1juo,8538
|
|
36
|
+
star_graph/ghost.py,sha256=8low7Asp5H5mAZ4Rjq_VhlGxglz9ZVIl-M0AHg7gmPM,23006
|
|
37
|
+
star_graph/goal_tree.py,sha256=KZrShCAqI5dvw9ecNijaeGZON1fFFv7TCU-s3GEj4ho,14370
|
|
38
|
+
star_graph/graph.py,sha256=NosZl8izEYuwaiWyGjA5wEj96WHxjh8wal2Y2xcB_B0,54618
|
|
39
|
+
star_graph/hippocampus.py,sha256=EISImqioft3zwO7bKLKPrJuHdT9U5sgEI5RK1wHVeds,9909
|
|
40
|
+
star_graph/hub.py,sha256=-Bi1yTv2Qjc0IqkzzSgZfQR4ojmBiuukmXoaXT-9zY0,32721
|
|
41
|
+
star_graph/index.py,sha256=LeErOHK208JLhTcSybVJyOKRtPQuzkx2AqWK9n2nYsY,3397
|
|
42
|
+
star_graph/layers.py,sha256=kxWq8-tP0qWRD6SPfiW0rrpGWe3wteyKl6cjBCV1uCI,4839
|
|
43
|
+
star_graph/logger.py,sha256=3H-5N1BITDmU6U_6Gz1anB2NC_eJYH_iE1awvYAhBOU,3500
|
|
44
|
+
star_graph/manager.py,sha256=kVjrov72al8PYKIPytfRTvWLAidFdm9RlstHmgxfAbA,4388
|
|
45
|
+
star_graph/manager_stats.py,sha256=2KzsRcdqwjAHTsPzI02kwEo2uvWZgli1-VLqzqG3FMg,1576
|
|
46
|
+
star_graph/math_utils.py,sha256=QweVtakFbtqZ6iXAnEdQwDGRl_qFZ37wY0bbtiaLYaA,1256
|
|
47
|
+
star_graph/mcp_server.py,sha256=Z4pHeCwQA13CWwwy78gOqclvOeUzWMXJSeUObH-BEgE,154
|
|
48
|
+
star_graph/metrics.py,sha256=djCPrOrO3HaCBv4FIrriJOTFR99VXQcfKcTj19c7Ppg,7285
|
|
49
|
+
star_graph/micro_sleep.py,sha256=uCHRpU6IOLs2wZ3MiewcpjQXeyPCtL8OCHo7o1JvOzw,11473
|
|
50
|
+
star_graph/multimodal.py,sha256=bkK2N0kggy6pHdC8B8B3wi6gnVEDgrb7gXgCdCfjFs8,23668
|
|
51
|
+
star_graph/online.py,sha256=H4xlVc6aECsMaE2h44mgonXLwwB4VqVnccmotvBGIF4,4309
|
|
52
|
+
star_graph/personality.py,sha256=3fTU-oMszbxy1PTfUNArCNkk-qeOA4cTK7B4TEY6wlM,12751
|
|
53
|
+
star_graph/raw_buffer.py,sha256=aEU9iGdWpvqF0qFzCjuYsLBV1m4CRhMgJ_Awq_kUVKk,10161
|
|
54
|
+
star_graph/reflection_loop.py,sha256=yARRk4L6mjg0DG7xDsCdt0KVaUeciV-gRCe4QUm_qy0,17305
|
|
55
|
+
star_graph/resonance.py,sha256=LTX1-2rhW-cGNNxQcovbaF-fifsnd8IEiE41UzQSucQ,187
|
|
56
|
+
star_graph/retrieval_budget.py,sha256=YMZW6OI8KdgvLH1C7QvolvkGMbR9rwDTPSBEV8x_Khg,4135
|
|
57
|
+
star_graph/retrieval_core.py,sha256=kobKu05xXOnn9z9YmuIik9Lrpq4PyY2PrNPo84oPn5I,44685
|
|
58
|
+
star_graph/retrieval_pipeline.py,sha256=sTu4lGPhS4fsr1SToopCsCyoC0hR2m7Yfhp8Mqh3LjE,1391
|
|
59
|
+
star_graph/retriever.py,sha256=Ge2JCquBj5XpoCke8D9AuyTIm9XUqKNXVNGl91gKMSo,34233
|
|
60
|
+
star_graph/router.py,sha256=RnrR4gZ7QyNTFB8PbrNIv6A09Of4nnejIGYJFNelPUE,11870
|
|
61
|
+
star_graph/runtime.py,sha256=dCnKkuoGklG3Ed6NAwDOaQQ93B_dO5doGnI3qRO9-l8,44148
|
|
62
|
+
star_graph/runtime_core.py,sha256=kdJ04IHCac5TKlX3xyrqSHKvwKLogciJhxnqGna7TQw,17955
|
|
63
|
+
star_graph/runtime_lifecycle.py,sha256=Q9I-aknmqvdnO9zvjfR6bES-ud9J_RpMjhr93RaI4O8,17119
|
|
64
|
+
star_graph/runtime_stats.py,sha256=Joyai5Cw8CAFxQMg90wCgIez8tcV2Eer3bX0RySgMts,97
|
|
65
|
+
star_graph/scheduler.py,sha256=LGOx4I2PzR8IqnXge4yhujByIQs18OtkTd5u1PTLRrE,38073
|
|
66
|
+
star_graph/seed.py,sha256=sqWtErzOhjjXA3OxImcLaxlvRx8E3r3nboaSDSihIkw,778
|
|
67
|
+
star_graph/self_org.py,sha256=5YLUXELxPwrDsEYgCI6CyNCvKexs-7EDLXsSYwfGBMQ,11594
|
|
68
|
+
star_graph/server.py,sha256=qlNpXLXPYacJNLgzLI-89aJTTeU1PwlB2tIjPfKh250,5993
|
|
69
|
+
star_graph/shard.py,sha256=jeW9mhjnEdXTalUEky1H1yL7CTJGWVTODvNa6dKO1As,9059
|
|
70
|
+
star_graph/sleep.py,sha256=OSfkI_iM351PZhFtAjmbmGmMNHZix5wVIwFLucnnlwk,24631
|
|
71
|
+
star_graph/sleep_consolidate.py,sha256=Yxl7MOi3vDNQETxtGuHUBZ3aThK6aWEcsqZbTdprfug,41793
|
|
72
|
+
star_graph/sleep_nrem.py,sha256=j9SnvN62_7T-gmkF7mgHPb86DwC9uyHQ2t0QYCsNXLA,9271
|
|
73
|
+
star_graph/sleep_rem.py,sha256=6skVOAf-M8XB7uric21e6EGHn-ZEb_MD1LuZ-DissUY,5686
|
|
74
|
+
star_graph/sleep_report.py,sha256=QUDiUGLm3e69Ro6SqCuaWXV-78zBQtVnp3ScFreYsrw,5103
|
|
75
|
+
star_graph/snapshot.py,sha256=vEjl5fmx-9RhjFB6XG9uQKjn7aohjSXgmVYzz4Oihmw,188
|
|
76
|
+
star_graph/spreading.py,sha256=PUHC-5oAFztCfY9FUMrnD5fpJYDv2LqMp64qNw3kgIM,8343
|
|
77
|
+
star_graph/sqlite_storage.py,sha256=X5Lb9mzY0eUE2IojeLkm9z1s5dDitDIrixs8vOBg74g,14938
|
|
78
|
+
star_graph/storage.py,sha256=m7-s_BnoNQ08XlrN5sy1JpO6d7uC3iihoCvMmeFwFzE,6915
|
|
79
|
+
star_graph/storage_backend.py,sha256=7k9FS6t5B-g0vWx0a13ZhbrEYt5KebrrgPVEQ6MocMk,1814
|
|
80
|
+
star_graph/streaming.py,sha256=Z8-DPhkQtQ0EhRbH2zturAGP7Z8tkxo9GBIcXxYF3KE,260
|
|
81
|
+
star_graph/survival.py,sha256=yOEVI9oK43q6wU2WNq1LaSy_knWQ1NXFowFTZVl7IwQ,11103
|
|
82
|
+
star_graph/symbolic_filter.py,sha256=AH53Ne6tcA16sNVUQbp6GXfwX9bPbUNiqVZo9uawI70,192
|
|
83
|
+
star_graph/thermal_store.py,sha256=PZ6FrdmFqNktmNobUSjIBO8Ai-CfGr7n3FhFFUwTyHA,10335
|
|
84
|
+
star_graph/tier.py,sha256=cHrua-mQNulnlGQ-zloEDha2PqRv0V4n1yjZwuR5RgY,35783
|
|
85
|
+
star_graph/tiered.py,sha256=ch1bqlUkx1iXSVjPMu_bt4bA15pjYCsF9HdWe9jhilA,178
|
|
86
|
+
star_graph/timespine.py,sha256=P2rjG_CKUlWSGuiG2kL997S96_v00Ry89b0uv5jUabw,11681
|
|
87
|
+
star_graph/topology.py,sha256=7zKzE8k67VgrLOwmWbDD5M82m7JSKAKxmfsjl10iXn0,11830
|
|
88
|
+
star_graph/tracing.py,sha256=55wZ3O7PGvzJhwrIAokZ_U-GPqwUhNzBMfQiLj5SFY0,11996
|
|
89
|
+
star_graph/versioned_memory.py,sha256=AimYnxcQQUGniae5lFvHecY2GVHFfVJlvaQQRfy8VJs,9060
|
|
90
|
+
star_graph/working_memory.py,sha256=Ji0mRbGbY6uOD9psAzWVv49j-NYrjuiRikFCqjnZqFk,9693
|
|
91
|
+
star_graph/write_gate.py,sha256=dP1Ylt1VkQ6C8QU2YMHfUIhW0UOfEnTUzFV9XvCOv5M,13402
|
|
92
|
+
star_graph/consolidation/__init__.py,sha256=Js3kF3BGyvnrNpVdjWThukQ1kz8PUozE3ATJqAKTFbs,1676
|
|
93
|
+
star_graph/contrib/__init__.py,sha256=95PjZnmUIlC8ShcxCwngdRMMkkEKqDkzgNTMlU3ziWI,1061
|
|
94
|
+
star_graph/contrib/benchmark.py,sha256=C4LSZNmw4ohZPx973BXg1H5NFLiXFXOoPxKak7LN2DE,31593
|
|
95
|
+
star_graph/contrib/mcp_server.py,sha256=IsU3-FkC9R_thwulGajbx8USSBTHNJqLxERKVLQvhwA,16142
|
|
96
|
+
star_graph/contrib/snapshot.py,sha256=XQOFWpT6uOwxqcjkxR0NhCHb9kQpM0puHvHvUGGIksU,21803
|
|
97
|
+
star_graph/contrib/streaming.py,sha256=BvDsIzMsC1VLVTje-31nk4sU6orC9RENLEsEdiAK_C8,14271
|
|
98
|
+
star_graph/contrib/symbolic_filter.py,sha256=HEqzU1syeOmpw76xweL1P145caRtnNrVg3yzaPkDcbg,7168
|
|
99
|
+
star_graph/cortex_api/__init__.py,sha256=u-BY7ne8pxshVIZ1MDTBkFI48OIvkjJxb5A8ZTaNbqA,1391
|
|
100
|
+
star_graph/embedding_provider/__init__.py,sha256=-0ICfMxFT3C4e_imiaRpKNNa7CS21a4NAU6ORaYjZio,1230
|
|
101
|
+
star_graph/embedding_provider/providers.py,sha256=IsaTtw7sDCQjRsgYMDJIN1Hlt1nousF4Il669tXqIbg,15239
|
|
102
|
+
star_graph/extras/__init__.py,sha256=Ym-YhFz7y6b_Z-pgYXefQmU_TpRX_ocl0eqfMGhY3Mw,1041
|
|
103
|
+
star_graph/extras/autobiography.py,sha256=ayoIWCdp6Mok_s6my3ldjV96IFKzLVyyyrliQnAUUSA,13288
|
|
104
|
+
star_graph/extras/resonance.py,sha256=m2JWithFmqBFh-7oe9EbAMK-LO7i90BhmgrsQYRb2k4,8459
|
|
105
|
+
star_graph/memory_core/__init__.py,sha256=VcFSLS5RAvXsdCUWz1SWZccvOojstwn6Sr-GsdHl84c,2050
|
|
106
|
+
star_graph/retrieval_engine/__init__.py,sha256=IkyzgUJxvQHwlTLSAG4jzwIToooeeB2ObddpYFnz7Qw,1688
|
|
107
|
+
nwcortex-1.0.1.dist-info/METADATA,sha256=B00pv4nD3a1jxejfYyMR2uTKfBx2qMpuDgcS3IfxvCA,13121
|
|
108
|
+
nwcortex-1.0.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
109
|
+
nwcortex-1.0.1.dist-info/entry_points.txt,sha256=beGqKYksbX1w0_3fR34dsuV0ic9qoG5UnQ2SPNcz6KQ,150
|
|
110
|
+
nwcortex-1.0.1.dist-info/top_level.txt,sha256=X7EVnFFOU6XrP_d1H0Bjg_xSNjq4FtzZTMS7eZwVw-8,11
|
|
111
|
+
nwcortex-1.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Thatgfsj
|
|
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 @@
|
|
|
1
|
+
star_graph
|