NWcortex 1.4.1__tar.gz → 1.4.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 (321) hide show
  1. {nwcortex-1.4.1 → nwcortex-1.4.2/NWcortex.egg-info}/PKG-INFO +3 -16
  2. {nwcortex-1.4.1 → nwcortex-1.4.2}/NWcortex.egg-info/SOURCES.txt +2 -11
  3. {nwcortex-1.4.1 → nwcortex-1.4.2}/NWcortex.egg-info/entry_points.txt +0 -1
  4. {nwcortex-1.4.1/NWcortex.egg-info → nwcortex-1.4.2}/PKG-INFO +3 -16
  5. {nwcortex-1.4.1 → nwcortex-1.4.2}/README.md +194 -207
  6. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/__init__.py +1 -1
  7. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/api/server.py +18 -9
  8. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/config/__init__.py +1 -1
  9. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/config/config.py +186 -186
  10. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/core/__init__.py +1 -1
  11. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/core/cortex.py +607 -586
  12. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/embeddings/__init__.py +4 -4
  13. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/embeddings/providers.py +94 -94
  14. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/llm/__init__.py +22 -22
  15. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/llm/anthropic.py +72 -72
  16. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/llm/base.py +54 -54
  17. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/llm/deepseek.py +12 -12
  18. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/llm/gemini.py +83 -83
  19. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/llm/ollama.py +66 -66
  20. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/llm/openai.py +98 -98
  21. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/mcp/server.py +2 -2
  22. {nwcortex-1.4.1 → nwcortex-1.4.2}/pyproject.toml +1 -2
  23. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/__init__.py +11 -6
  24. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/abstraction_chain.py +516 -516
  25. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/activation_engine.py +560 -560
  26. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/activation_graph.py +73 -28
  27. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/agent_state.py +413 -413
  28. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/anchor.py +2 -2
  29. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/async_manager.py +1 -1
  30. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/autonomous_reasoning.py +309 -309
  31. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/batch_vectorizer.py +199 -199
  32. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/belief_system.py +448 -448
  33. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/bm25.py +2 -2
  34. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cognitive_cache.py +2 -2
  35. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cognitive_closure.py +558 -558
  36. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cognitive_compression.py +353 -353
  37. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cognitive_identity.py +248 -248
  38. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cognitive_priority.py +232 -232
  39. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cognitive_workspace.py +616 -616
  40. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/community.py +1 -1
  41. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/competition.py +1 -1
  42. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/concept_cortex.py +463 -463
  43. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/conflict_detection.py +1 -1
  44. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/evolution.py +22 -30
  45. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/sleep_consolidate.py +8 -16
  46. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/context_routing.py +319 -319
  47. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/contrib/mcp_server.py +13 -3
  48. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/async_manager.py +1 -1
  49. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/manager.py +7 -4
  50. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/runtime.py +28 -14
  51. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/runtime_core.py +57 -7
  52. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/runtime_lifecycle.py +45 -18
  53. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/working_memory.py +9 -3
  54. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cross_encoder.py +2 -2
  55. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/defaults.yaml +36 -18
  56. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/domain_graph.py +316 -316
  57. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/domain_router.py +1 -1
  58. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/dual_channel.py +2 -2
  59. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/embedding.py +56 -5
  60. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/embedding_provider/providers.py +37 -15
  61. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/evolution.py +1 -1
  62. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/exact_cache.py +2 -2
  63. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/forget_certificate.py +225 -225
  64. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/ghost.py +1 -1
  65. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/goal_system.py +468 -468
  66. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/hebbian_learning.py +301 -301
  67. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/hub.py +1 -1
  68. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/importance_engine.py +135 -31
  69. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/index.py +2 -2
  70. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/manager.py +1 -1
  71. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/manager_stats.py +1 -1
  72. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/markdown_export.py +274 -274
  73. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/mcp_server.py +1 -1
  74. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_budget.py +271 -271
  75. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/anchor.py +50 -50
  76. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/graph.py +29 -21
  77. nwcortex-1.4.2/star_graph/memory_core/index.py +109 -0
  78. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/qdrant_storage.py +113 -21
  79. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/sqlite_storage.py +153 -57
  80. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/storage.py +67 -11
  81. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_layers.py +381 -382
  82. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_lifecycle.py +17 -3
  83. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_revision.py +1 -1
  84. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/perception.py +553 -553
  85. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/personality_formation.py +581 -581
  86. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/quality_score.py +212 -212
  87. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/reflection_loop.py +1 -1
  88. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_budget.py +2 -2
  89. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_core.py +2 -2
  90. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/cognitive_cache.py +1 -1
  91. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/cross_encoder.py +110 -110
  92. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/retrieval_budget.py +51 -10
  93. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/retrieval_core.py +61 -10
  94. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/retriever.py +80 -19
  95. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_pipeline.py +2 -2
  96. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/runtime.py +1 -1
  97. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/runtime_core.py +1 -1
  98. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/runtime_lifecycle.py +1 -1
  99. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/runtime_stats.py +1 -1
  100. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/salience.py +265 -265
  101. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/self_model.py +340 -340
  102. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/self_org.py +1 -1
  103. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/server.py +1 -1
  104. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/sleep.py +1 -1
  105. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/sleep_consolidate.py +1 -1
  106. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/sleep_nrem.py +1 -1
  107. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/sleep_rem.py +1 -1
  108. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/sleep_report.py +1 -1
  109. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/stability_control.py +350 -350
  110. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/storage.py +2 -2
  111. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/storage_backend.py +2 -2
  112. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/survival.py +1 -1
  113. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/thought_object.py +234 -234
  114. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/tiered.py +2 -2
  115. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/typed_memory.py +376 -376
  116. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/write_gate.py +1 -1
  117. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/zero_llm_pipeline.py +312 -312
  118. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_anchor.py +63 -30
  119. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_brain_sphere.py +2 -2
  120. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_evolution.py +9 -3
  121. nwcortex-1.4.2/tests/test_forget_never_delete.py +122 -0
  122. nwcortex-1.4.2/tests/test_qdrant_serialization.py +259 -0
  123. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_sleep_consolidation.py +6 -2
  124. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_sqlite_storage.py +85 -0
  125. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_topology.py +11 -2
  126. nwcortex-1.4.1/benchmarks/ablation.py +0 -177
  127. nwcortex-1.4.1/benchmarks/baselines/baseline_pure_vector.py +0 -92
  128. nwcortex-1.4.1/benchmarks/baselines/run_baseline_comparison.py +0 -227
  129. nwcortex-1.4.1/benchmarks/baselines/run_baseline_vector.py +0 -95
  130. nwcortex-1.4.1/benchmarks/longbench_adapter.py +0 -154
  131. nwcortex-1.4.1/benchmarks/run_benchmarks.py +0 -487
  132. nwcortex-1.4.1/benchmarks/run_locomo_full.py +0 -327
  133. nwcortex-1.4.1/benchmarks/run_locomo_standard.py +0 -401
  134. nwcortex-1.4.1/benchmarks/scalability_test.py +0 -86
  135. nwcortex-1.4.1/benchmarks/statistical_analysis.py +0 -68
  136. nwcortex-1.4.1/benchmarks/visualize.py +0 -141
  137. nwcortex-1.4.1/star_graph/memory_core/index.py +0 -98
  138. {nwcortex-1.4.1 → nwcortex-1.4.2}/LICENSE +0 -0
  139. {nwcortex-1.4.1 → nwcortex-1.4.2}/MANIFEST.in +0 -0
  140. {nwcortex-1.4.1 → nwcortex-1.4.2}/NWcortex.egg-info/dependency_links.txt +0 -0
  141. {nwcortex-1.4.1 → nwcortex-1.4.2}/NWcortex.egg-info/requires.txt +0 -0
  142. {nwcortex-1.4.1 → nwcortex-1.4.2}/NWcortex.egg-info/top_level.txt +0 -0
  143. {nwcortex-1.4.1 → nwcortex-1.4.2}/examples/ablation_benchmark.py +0 -0
  144. {nwcortex-1.4.1 → nwcortex-1.4.2}/examples/emergence_demo.py +0 -0
  145. {nwcortex-1.4.1 → nwcortex-1.4.2}/examples/locomo_eval.py +0 -0
  146. {nwcortex-1.4.1 → nwcortex-1.4.2}/examples/locomo_llm_eval.py +0 -0
  147. {nwcortex-1.4.1 → nwcortex-1.4.2}/examples/locomo_test.py +0 -0
  148. {nwcortex-1.4.1 → nwcortex-1.4.2}/examples/memory_basic.py +0 -0
  149. {nwcortex-1.4.1 → nwcortex-1.4.2}/examples/memory_benchmark.py +0 -0
  150. {nwcortex-1.4.1 → nwcortex-1.4.2}/examples/paper_demo.py +0 -0
  151. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/api/__init__.py +0 -0
  152. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/cli/__init__.py +0 -0
  153. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/cli/main.py +0 -0
  154. {nwcortex-1.4.1 → nwcortex-1.4.2}/nwc/mcp/__init__.py +0 -0
  155. {nwcortex-1.4.1 → nwcortex-1.4.2}/setup.cfg +0 -0
  156. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/__main__.py +0 -0
  157. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/abstraction.py +0 -0
  158. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/atom_facts.py +0 -0
  159. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/autobiography.py +0 -0
  160. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/benchmark.py +0 -0
  161. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/brain_sphere.py +0 -0
  162. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cascade.py +0 -0
  163. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/causal_edges.py +0 -0
  164. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cli.py +0 -0
  165. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cluster_memory.py +0 -0
  166. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/compiler.py +0 -0
  167. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/compression.py +0 -0
  168. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/config.py +0 -0
  169. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/__init__.py +0 -0
  170. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/abstraction.py +0 -0
  171. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/community.py +0 -0
  172. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/competition.py +0 -0
  173. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/compression.py +0 -0
  174. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/conflict_detection.py +0 -0
  175. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/domain_router.py +0 -0
  176. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/ghost.py +0 -0
  177. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/hub.py +0 -0
  178. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/memory_revision.py +0 -0
  179. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/micro_sleep.py +0 -0
  180. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/reflection_loop.py +0 -0
  181. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/self_org.py +0 -0
  182. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/sleep.py +0 -0
  183. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/sleep_nrem.py +0 -0
  184. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/sleep_rem.py +0 -0
  185. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/sleep_report.py +0 -0
  186. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/consolidation/survival.py +0 -0
  187. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/contrib/__init__.py +0 -0
  188. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/contrib/benchmark.py +0 -0
  189. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/contrib/snapshot.py +0 -0
  190. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/contrib/streaming.py +0 -0
  191. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/contrib/symbolic_filter.py +0 -0
  192. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex.py +0 -0
  193. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/__init__.py +0 -0
  194. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/gate.py +0 -0
  195. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/manager_stats.py +0 -0
  196. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/mcp_server.py +0 -0
  197. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/runtime_stats.py +0 -0
  198. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/scheduler.py +0 -0
  199. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/server.py +0 -0
  200. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cortex_api/write_gate.py +0 -0
  201. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/cost_estimator.py +0 -0
  202. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/edge_budget.py +0 -0
  203. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/edge_decay.py +0 -0
  204. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/edge_management.py +0 -0
  205. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/embedding_provider/__init__.py +0 -0
  206. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/episodic_memory.py +0 -0
  207. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/extras/__init__.py +0 -0
  208. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/extras/autobiography.py +0 -0
  209. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/extras/resonance.py +0 -0
  210. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/four_layer.py +0 -0
  211. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/gate.py +0 -0
  212. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/goal_tree.py +0 -0
  213. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/graph.py +0 -0
  214. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/gravity_well.py +0 -0
  215. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/hippocampus.py +0 -0
  216. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/layers.py +0 -0
  217. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/logger.py +0 -0
  218. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/math_utils.py +0 -0
  219. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/__init__.py +0 -0
  220. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/storage_backend.py +0 -0
  221. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/tier.py +0 -0
  222. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/memory_core/tiered.py +0 -0
  223. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/metrics.py +0 -0
  224. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/micro_sleep.py +0 -0
  225. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/multimodal.py +0 -0
  226. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/observatory.py +0 -0
  227. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/online.py +0 -0
  228. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/personality.py +0 -0
  229. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/qdrant_storage.py +0 -0
  230. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/raw_buffer.py +0 -0
  231. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/resonance.py +0 -0
  232. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/__init__.py +0 -0
  233. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/bm25.py +0 -0
  234. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/dual_channel.py +0 -0
  235. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/exact_cache.py +0 -0
  236. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retrieval_engine/retrieval_pipeline.py +0 -0
  237. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/retriever.py +0 -0
  238. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/router.py +0 -0
  239. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/scheduler.py +0 -0
  240. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/seed.py +0 -0
  241. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/shard.py +0 -0
  242. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/snapshot.py +0 -0
  243. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/spreading.py +0 -0
  244. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/sqlite_storage.py +0 -0
  245. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/streaming.py +0 -0
  246. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/symbolic_filter.py +0 -0
  247. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/thermal_store.py +0 -0
  248. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/tier.py +0 -0
  249. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/timespine.py +0 -0
  250. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/topology.py +0 -0
  251. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/tracing.py +0 -0
  252. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/versioned_memory.py +0 -0
  253. {nwcortex-1.4.1 → nwcortex-1.4.2}/star_graph/working_memory.py +0 -0
  254. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_abstraction.py +0 -0
  255. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_abstractive_memory.py +0 -0
  256. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_atom_facts.py +0 -0
  257. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_autobiography.py +0 -0
  258. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_bm25.py +0 -0
  259. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_cascade.py +0 -0
  260. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_causal_edges.py +0 -0
  261. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_cluster_memory.py +0 -0
  262. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_cognitive_cache.py +0 -0
  263. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_cognitive_compiler.py +0 -0
  264. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_community.py +0 -0
  265. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_competition.py +0 -0
  266. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_compiler.py +0 -0
  267. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_compression.py +0 -0
  268. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_config_schema.py +0 -0
  269. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_cortex_hierarchy.py +0 -0
  270. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_cost_estimator.py +0 -0
  271. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_domain_router.py +0 -0
  272. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_edge_budget.py +0 -0
  273. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_edge_decay.py +0 -0
  274. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_edge_management.py +0 -0
  275. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_embedding.py +0 -0
  276. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_episodic_memory.py +0 -0
  277. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_four_layer.py +0 -0
  278. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_gate.py +0 -0
  279. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_ghost.py +0 -0
  280. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_ghost_intensity.py +0 -0
  281. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_goal_tree.py +0 -0
  282. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_graph.py +0 -0
  283. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_hippocampus.py +0 -0
  284. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_index.py +0 -0
  285. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_layers.py +0 -0
  286. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_logger.py +0 -0
  287. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_manager_stats.py +0 -0
  288. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_math_utils.py +0 -0
  289. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_memory_tier.py +0 -0
  290. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_metrics.py +0 -0
  291. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_micro_sleep.py +0 -0
  292. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_multimodal.py +0 -0
  293. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_online.py +0 -0
  294. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_oscillation_match.py +0 -0
  295. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_personality.py +0 -0
  296. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_raw_buffer.py +0 -0
  297. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_readme_doctest.py +0 -0
  298. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_reflection_loop.py +0 -0
  299. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_resonance.py +0 -0
  300. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_retrieval_budget.py +0 -0
  301. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_retrieval_trace.py +0 -0
  302. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_retriever.py +0 -0
  303. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_router.py +0 -0
  304. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_scheduler.py +0 -0
  305. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_seed.py +0 -0
  306. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_self_org.py +0 -0
  307. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_shard.py +0 -0
  308. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_sleep_report.py +0 -0
  309. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_spreading.py +0 -0
  310. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_storage.py +0 -0
  311. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_storage_backend.py +0 -0
  312. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_streaming.py +0 -0
  313. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_survival.py +0 -0
  314. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_thermal_store.py +0 -0
  315. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_tier.py +0 -0
  316. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_timespine.py +0 -0
  317. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_tracing.py +0 -0
  318. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_v08_modules.py +0 -0
  319. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_versioned_memory.py +0 -0
  320. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_working_memory.py +0 -0
  321. {nwcortex-1.4.1 → nwcortex-1.4.2}/tests/test_write_gate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: NWcortex
3
- Version: 1.4.1
3
+ Version: 1.4.2
4
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
5
  Author-email: Thatgfsj <thatgfsj@users.noreply.github.com>
6
6
  License: MIT
@@ -39,7 +39,7 @@ Requires-Dist: aiohttp>=3.8.0; extra == "all"
39
39
  Dynamic: license-file
40
40
 
41
41
  <p align="center">
42
- <img src="https://img.shields.io/badge/version-1.4.0-blue?style=flat-square" alt="version"/>
42
+ <img src="https://img.shields.io/badge/version-1.4.2-blue?style=flat-square" alt="version"/>
43
43
  <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="license"/>
44
44
  <img src="https://img.shields.io/badge/python-3.11%2B-orange?style=flat-square" alt="python"/>
45
45
  <img src="https://img.shields.io/badge/status-beta-yellow?style=flat-square" alt="status"/>
@@ -197,7 +197,7 @@ mgr.save("agent_memory.db")
197
197
  |--------|:----------:|:-----------:|
198
198
  | Pure Vector Search | 25.3% | — |
199
199
  | Cosine + BM25 | 31.5% | +6.2 pp |
200
- | **NWC (BM40+txt60)** | **44.1%** | **+18.8 pp** |
200
+ | **NWC (BM40+txt60)** | **44.2%** | **+18.9 pp** |
201
201
 
202
202
  ---
203
203
 
@@ -221,19 +221,6 @@ pytest tests/ -v
221
221
 
222
222
  ---
223
223
 
224
- ## 📄 Citation
225
-
226
- ```bibtex
227
- @software{neuroweave_cortex,
228
- title = {NeuroWeave Cortex: A Hippocampal-Inspired Cognitive Memory System},
229
- author = {Thatgfsj},
230
- year = {2026},
231
- url = {https://github.com/Thatgfsj/neuroweave-cortex}
232
- }
233
- ```
234
-
235
- ---
236
-
237
224
  ## ⚖️ License
238
225
 
239
226
  MIT
@@ -8,17 +8,6 @@ NWcortex.egg-info/dependency_links.txt
8
8
  NWcortex.egg-info/entry_points.txt
9
9
  NWcortex.egg-info/requires.txt
10
10
  NWcortex.egg-info/top_level.txt
11
- benchmarks/ablation.py
12
- benchmarks/longbench_adapter.py
13
- benchmarks/run_benchmarks.py
14
- benchmarks/run_locomo_full.py
15
- benchmarks/run_locomo_standard.py
16
- benchmarks/scalability_test.py
17
- benchmarks/statistical_analysis.py
18
- benchmarks/visualize.py
19
- benchmarks/baselines/baseline_pure_vector.py
20
- benchmarks/baselines/run_baseline_comparison.py
21
- benchmarks/baselines/run_baseline_vector.py
22
11
  examples/ablation_benchmark.py
23
12
  examples/emergence_demo.py
24
13
  examples/locomo_eval.py
@@ -266,6 +255,7 @@ tests/test_edge_management.py
266
255
  tests/test_embedding.py
267
256
  tests/test_episodic_memory.py
268
257
  tests/test_evolution.py
258
+ tests/test_forget_never_delete.py
269
259
  tests/test_four_layer.py
270
260
  tests/test_gate.py
271
261
  tests/test_ghost.py
@@ -285,6 +275,7 @@ tests/test_multimodal.py
285
275
  tests/test_online.py
286
276
  tests/test_oscillation_match.py
287
277
  tests/test_personality.py
278
+ tests/test_qdrant_serialization.py
288
279
  tests/test_raw_buffer.py
289
280
  tests/test_readme_doctest.py
290
281
  tests/test_reflection_loop.py
@@ -3,7 +3,6 @@ nwc = nwc.cli.main:entry
3
3
  nwc-export = star_graph.cli:export_cmd
4
4
  nwc-forget = star_graph.cli:forget_cmd
5
5
  nwc-mcp = star_graph.mcp_server:entry
6
- nwc-paper = neuroweave_cortex:reproduce_paper_results
7
6
  nwc-server = star_graph.server:entry
8
7
  nwc-verify = star_graph.cli:verify_cmd
9
8
  sg-add = star_graph.cli:add
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: NWcortex
3
- Version: 1.4.1
3
+ Version: 1.4.2
4
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
5
  Author-email: Thatgfsj <thatgfsj@users.noreply.github.com>
6
6
  License: MIT
@@ -39,7 +39,7 @@ Requires-Dist: aiohttp>=3.8.0; extra == "all"
39
39
  Dynamic: license-file
40
40
 
41
41
  <p align="center">
42
- <img src="https://img.shields.io/badge/version-1.4.0-blue?style=flat-square" alt="version"/>
42
+ <img src="https://img.shields.io/badge/version-1.4.2-blue?style=flat-square" alt="version"/>
43
43
  <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="license"/>
44
44
  <img src="https://img.shields.io/badge/python-3.11%2B-orange?style=flat-square" alt="python"/>
45
45
  <img src="https://img.shields.io/badge/status-beta-yellow?style=flat-square" alt="status"/>
@@ -197,7 +197,7 @@ mgr.save("agent_memory.db")
197
197
  |--------|:----------:|:-----------:|
198
198
  | Pure Vector Search | 25.3% | — |
199
199
  | Cosine + BM25 | 31.5% | +6.2 pp |
200
- | **NWC (BM40+txt60)** | **44.1%** | **+18.8 pp** |
200
+ | **NWC (BM40+txt60)** | **44.2%** | **+18.9 pp** |
201
201
 
202
202
  ---
203
203
 
@@ -221,19 +221,6 @@ pytest tests/ -v
221
221
 
222
222
  ---
223
223
 
224
- ## 📄 Citation
225
-
226
- ```bibtex
227
- @software{neuroweave_cortex,
228
- title = {NeuroWeave Cortex: A Hippocampal-Inspired Cognitive Memory System},
229
- author = {Thatgfsj},
230
- year = {2026},
231
- url = {https://github.com/Thatgfsj/neuroweave-cortex}
232
- }
233
- ```
234
-
235
- ---
236
-
237
224
  ## ⚖️ License
238
225
 
239
226
  MIT
@@ -1,207 +1,194 @@
1
- <p align="center">
2
- <img src="https://img.shields.io/badge/version-1.4.0-blue?style=flat-square" alt="version"/>
3
- <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="license"/>
4
- <img src="https://img.shields.io/badge/python-3.11%2B-orange?style=flat-square" alt="python"/>
5
- <img src="https://img.shields.io/badge/status-beta-yellow?style=flat-square" alt="status"/>
6
- <img src="https://img.shields.io/github/stars/Thatgfsj/neuroweave-cortex?style=flat-square" alt="stars"/>
7
- <img src="https://img.shields.io/badge/LLM-routing%20free-success?style=flat-square" alt="llm-free"/>
8
- <img src="https://img.shields.io/badge/retrieval-activation%20graph-8A2BE2?style=flat-square" alt="activation"/>
9
- <img src="https://img.shields.io/badge/lifecycle-L1%E2%86%92L2%E2%86%92L3-blueviolet?style=flat-square" alt="lifecycle"/>
10
- </p>
11
-
12
- <h1 align="center">🧠 NeuroWeave Cortex</h1>
13
- <h3 align="center"><i>A Hippocampal-Inspired Cognitive Memory Engine for AI Agents</i></h3>
14
-
15
- <p align="center">
16
- <b>Not a vector database. Not a graph database. Not RAG.</b><br>
17
- <b>Not even an "LLM-powered memory system".</b><br>
18
- A <b>self-organizing cognitive memory</b> — memory is structured by <b>use, not by prompt</b>.<br>
19
- <b>No memory is ever deleted. Only accessibility changes.</b><br>
20
- LLM reads memory. LLM does <b>not</b> decide what memory says.
21
- </p>
22
-
23
- <br>
24
-
25
- ---
26
-
27
- ## ✨ Core Design Principle
28
-
29
- > **Memory structure is decided by the memory system, not by the LLM.**
30
-
31
- The LLM can *read* memory. The LLM can *maintain* memory (summarize, merge, archive).
32
- But the LLM does **not** determine retrieval paths, edge weights, or relevance scores.
33
-
34
- **Brightness = f(historical access frequency, recency, edge strength)**
35
- **NOT f(LLM-generated vector at query time)**
36
-
37
- This is the difference between a memory system that *learns* and one that *re-computes* every time.
38
-
39
- ---
40
-
41
- ## 🔬 What Makes It Different
42
-
43
- Vector databases retrieve. Graph databases traverse. RAG systems query.
44
- NeuroWeave Cortex **learns from use**:
45
-
46
- | Capability | Vector DB | Graph DB | RAG | NWC |
47
- |------------|:---------:|:--------:|:---:|:---:|
48
- | Semantic retrieval | ✅ | ❌ | ✅ | ✅ |
49
- | Graph traversal | ❌ | ✅ | ❌ | ✅ |
50
- | **Activation-based retrieval** | ❌ | ❌ | ❌ | ✅ |
51
- | **Edge decay (no deletion)** | ❌ | ❌ | ❌ | ✅ |
52
- | **Memory never deleted** | ❌ | ❌ | ❌ | ✅ |
53
- | **Memory lifecycle (L1→L2→L3)** | ❌ | ❌ | ❌ | ✅ |
54
- | **LLM-free retrieval routing** | ✅ | ✅ | ❌ | ✅ |
55
- | **LLM for maintenance only** | ❌ | ❌ | ❌ | ✅ |
56
- | Sleep consolidation | ❌ | ❌ | ❌ | ✅ |
57
- | Source attribution & trust | ❌ | ❌ | ❌ | ✅ |
58
-
59
- ---
60
-
61
- ## 🧠 How Retrieval Actually Works
62
-
63
- ### The Wrong Way (what most systems do):
64
- ```
65
- Query → LLM generates embedding → LLM decides what's relevant → Return
66
- ```
67
- Problem: **LLM is the router.** Every retrieval is a new LLM computation. Nothing stabilizes.
68
-
69
- ### The NWC Way (v1.4.0):
70
- ```
71
- Query → Embedding → Find seed nodes → Activation spread → Return
72
- ```
73
- The LLM never touches the retrieval path. Retrieval is driven by:
74
- 1. **Historical activation** — how often has each memory been accessed?
75
- 2. **Edge strength** — how strongly are memories connected (reinforced by co-use)?
76
- 3. **Temporal decay** — edges weaken naturally over days of disuse (but NEVER to zero)
77
- 4. **Recency boost** — recently accessed memories activate more readily
78
-
79
- ### 🗝️ Core Design Principle: No Memory Is Ever Deleted
80
-
81
- ```
82
- Traditional memory systems: Store → Retrieve → Delete (when full)
83
- NWC memory system: Create → Activate → Dim → Dormant → Reactivate ♾️
84
- ```
85
-
86
- Memories do NOT have a "delete" state. They transition between activation levels:
87
- - **1.0** — currently active (just recalled)
88
- - **0.7** — frequent access
89
- - **0.3** — infrequent but known
90
- - **0.1** — dormant (not accessed in a long time)
91
- - **0.01** — deep dormant (years old)
92
-
93
- Even a memory with `activation_level = 0.01` is retrievable — if activation
94
- propagation from a connected query reaches it. This mimics human memory:
95
- you may not think about your elementary school classmates for decades,
96
- but a single photo can bring everything flooding back.
97
-
98
- ---
99
-
100
- ## 🏗️ Memory Layers (L0–L3)
101
-
102
- NWC organizes memory into four cognitively-grounded layers:
103
-
104
- ```
105
- L0: Input ─── Ephemeral, per-session only (minutes)
106
- ↓ promote on repeated access (>3 times) or age (>30 days)
107
- L1: Working ─── Recent active memories (hours-days)
108
- │ LLM maintains: add, merge, summarize
109
- │ System routes: retrieval is LLM-free
110
- ↓ consolidate
111
- L2: Long-term ─── Stable facts, experiences, relationships (months-years)
112
- │ ONLY operations: strengthen, supplement, weaken
113
- │ NEVER: full reconstruction
114
- ↓ archive on 90d no-access or low importance
115
- L3: Dormant ─── Low-activation memories retrievable via propagation (years)
116
- │ NEVER deleted. Only activation_level approaches 0.
117
- ↑ reactivate on query similarity or activation propagation
118
- ```
119
-
120
- This is **not** a flat table. Memories physically transition between layers
121
- based on access patterns — just like human memory.
122
-
123
- ---
124
-
125
- ## 🚀 Quick Start
126
-
127
- ```bash
128
- pip install NWcortex
129
- ```
130
-
131
- ```python
132
- from star_graph import MemoryManager, AgentContext
133
-
134
- mgr = MemoryManager()
135
-
136
- # Remember
137
- mgr.remember("User prefers type hints and concise code", tags=["preference"])
138
- mgr.remember("Debugged Redis timeout — pool 10 → 20", tags=["redis","debug"])
139
-
140
- # Recall (LLM-free activation spreading)
141
- ctx = AgentContext(task_type="debugging")
142
- memories = mgr.recall("Redis connection pool config", context=ctx)
143
-
144
- # Sleep: consolidate, migrate layers, decay weak edges
145
- report = mgr.sleep()
146
-
147
- # Persist
148
- mgr.save("agent_memory.db")
149
- ```
150
-
151
- ---
152
-
153
- ## ⚡ LoCoMo-10 Benchmark
154
- 10 conversations · 5,882 turns · 1,986 QA pairs · **Zero LLM calls**
155
-
156
- | Method | has_answer | Δ vs Vector |
157
- |--------|:----------:|:-----------:|
158
- | Pure Vector Search | 25.3% | — |
159
- | Cosine + BM25 | 31.5% | +6.2 pp |
160
- | **NWC (BM40+txt60)** | **44.1%** | **+18.8 pp** |
161
-
162
- ---
163
-
164
- ## 📦 Installation
165
-
166
- | Command | Includes |
167
- |---------|---------|
168
- | `pip install NWcortex` | Core engine (138 modules) |
169
- | `pip install "NWcortex[embeddings]"` | + sentence-transformers |
170
- | `pip install "NWcortex[mcp]"` | + MCP Server |
171
- | `pip install "NWcortex[all]"` | Everything |
172
-
173
- ---
174
-
175
- ## 🧪 Running Tests
176
-
177
- ```bash
178
- pip install pytest pytest-cov
179
- pytest tests/ -v
180
- ```
181
-
182
- ---
183
-
184
- ## 📄 Citation
185
-
186
- ```bibtex
187
- @software{neuroweave_cortex,
188
- title = {NeuroWeave Cortex: A Hippocampal-Inspired Cognitive Memory System},
189
- author = {Thatgfsj},
190
- year = {2026},
191
- url = {https://github.com/Thatgfsj/neuroweave-cortex}
192
- }
193
- ```
194
-
195
- ---
196
-
197
- ## ⚖️ License
198
-
199
- MIT
200
-
201
- ---
202
-
203
- <p align="center">
204
- <a href="https://github.com/Thatgfsj/neuroweave-cortex/issues">Report a bug</a> ·
205
- <a href="https://github.com/Thatgfsj/neuroweave-cortex/discussions">Discussion</a> ·
206
- <a href="https://github.com/Thatgfsj/neuroweave-cortex/blob/main/ROADMAP.md">Roadmap</a>
207
- </p>
1
+ <p align="center">
2
+ <img src="https://img.shields.io/badge/version-1.4.2-blue?style=flat-square" alt="version"/>
3
+ <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="license"/>
4
+ <img src="https://img.shields.io/badge/python-3.11%2B-orange?style=flat-square" alt="python"/>
5
+ <img src="https://img.shields.io/badge/status-beta-yellow?style=flat-square" alt="status"/>
6
+ <img src="https://img.shields.io/github/stars/Thatgfsj/neuroweave-cortex?style=flat-square" alt="stars"/>
7
+ <img src="https://img.shields.io/badge/LLM-routing%20free-success?style=flat-square" alt="llm-free"/>
8
+ <img src="https://img.shields.io/badge/retrieval-activation%20graph-8A2BE2?style=flat-square" alt="activation"/>
9
+ <img src="https://img.shields.io/badge/lifecycle-L1%E2%86%92L2%E2%86%92L3-blueviolet?style=flat-square" alt="lifecycle"/>
10
+ </p>
11
+
12
+ <h1 align="center">🧠 NeuroWeave Cortex</h1>
13
+ <h3 align="center"><i>A Hippocampal-Inspired Cognitive Memory Engine for AI Agents</i></h3>
14
+
15
+ <p align="center">
16
+ <b>Not a vector database. Not a graph database. Not RAG.</b><br>
17
+ <b>Not even an "LLM-powered memory system".</b><br>
18
+ A <b>self-organizing cognitive memory</b> — memory is structured by <b>use, not by prompt</b>.<br>
19
+ <b>No memory is ever deleted. Only accessibility changes.</b><br>
20
+ LLM reads memory. LLM does <b>not</b> decide what memory says.
21
+ </p>
22
+
23
+ <br>
24
+
25
+ ---
26
+
27
+ ## ✨ Core Design Principle
28
+
29
+ > **Memory structure is decided by the memory system, not by the LLM.**
30
+
31
+ The LLM can *read* memory. The LLM can *maintain* memory (summarize, merge, archive).
32
+ But the LLM does **not** determine retrieval paths, edge weights, or relevance scores.
33
+
34
+ **Brightness = f(historical access frequency, recency, edge strength)**
35
+ **NOT f(LLM-generated vector at query time)**
36
+
37
+ This is the difference between a memory system that *learns* and one that *re-computes* every time.
38
+
39
+ ---
40
+
41
+ ## 🔬 What Makes It Different
42
+
43
+ Vector databases retrieve. Graph databases traverse. RAG systems query.
44
+ NeuroWeave Cortex **learns from use**:
45
+
46
+ | Capability | Vector DB | Graph DB | RAG | NWC |
47
+ |------------|:---------:|:--------:|:---:|:---:|
48
+ | Semantic retrieval | ✅ | ❌ | ✅ | ✅ |
49
+ | Graph traversal | ❌ | ✅ | ❌ | ✅ |
50
+ | **Activation-based retrieval** | ❌ | ❌ | ❌ | ✅ |
51
+ | **Edge decay (no deletion)** | ❌ | ❌ | ❌ | ✅ |
52
+ | **Memory never deleted** | ❌ | ❌ | ❌ | ✅ |
53
+ | **Memory lifecycle (L1→L2→L3)** | ❌ | ❌ | ❌ | ✅ |
54
+ | **LLM-free retrieval routing** | ✅ | ✅ | ❌ | ✅ |
55
+ | **LLM for maintenance only** | ❌ | ❌ | ❌ | ✅ |
56
+ | Sleep consolidation | ❌ | ❌ | ❌ | ✅ |
57
+ | Source attribution & trust | ❌ | ❌ | ❌ | ✅ |
58
+
59
+ ---
60
+
61
+ ## 🧠 How Retrieval Actually Works
62
+
63
+ ### The Wrong Way (what most systems do):
64
+ ```
65
+ Query → LLM generates embedding → LLM decides what's relevant → Return
66
+ ```
67
+ Problem: **LLM is the router.** Every retrieval is a new LLM computation. Nothing stabilizes.
68
+
69
+ ### The NWC Way (v1.4.0):
70
+ ```
71
+ Query → Embedding → Find seed nodes → Activation spread → Return
72
+ ```
73
+ The LLM never touches the retrieval path. Retrieval is driven by:
74
+ 1. **Historical activation** — how often has each memory been accessed?
75
+ 2. **Edge strength** — how strongly are memories connected (reinforced by co-use)?
76
+ 3. **Temporal decay** — edges weaken naturally over days of disuse (but NEVER to zero)
77
+ 4. **Recency boost** — recently accessed memories activate more readily
78
+
79
+ ### 🗝️ Core Design Principle: No Memory Is Ever Deleted
80
+
81
+ ```
82
+ Traditional memory systems: Store → Retrieve → Delete (when full)
83
+ NWC memory system: Create → Activate → Dim → Dormant → Reactivate ♾️
84
+ ```
85
+
86
+ Memories do NOT have a "delete" state. They transition between activation levels:
87
+ - **1.0** — currently active (just recalled)
88
+ - **0.7** — frequent access
89
+ - **0.3** — infrequent but known
90
+ - **0.1** — dormant (not accessed in a long time)
91
+ - **0.01** — deep dormant (years old)
92
+
93
+ Even a memory with `activation_level = 0.01` is retrievable — if activation
94
+ propagation from a connected query reaches it. This mimics human memory:
95
+ you may not think about your elementary school classmates for decades,
96
+ but a single photo can bring everything flooding back.
97
+
98
+ ---
99
+
100
+ ## 🏗️ Memory Layers (L0–L3)
101
+
102
+ NWC organizes memory into four cognitively-grounded layers:
103
+
104
+ ```
105
+ L0: Input ─── Ephemeral, per-session only (minutes)
106
+ ↓ promote on repeated access (>3 times) or age (>30 days)
107
+ L1: Working ─── Recent active memories (hours-days)
108
+ │ LLM maintains: add, merge, summarize
109
+ │ System routes: retrieval is LLM-free
110
+ ↓ consolidate
111
+ L2: Long-term ─── Stable facts, experiences, relationships (months-years)
112
+ │ ONLY operations: strengthen, supplement, weaken
113
+ │ NEVER: full reconstruction
114
+ ↓ archive on 90d no-access or low importance
115
+ L3: Dormant ─── Low-activation memories retrievable via propagation (years)
116
+ │ NEVER deleted. Only activation_level approaches 0.
117
+ ↑ reactivate on query similarity or activation propagation
118
+ ```
119
+
120
+ This is **not** a flat table. Memories physically transition between layers
121
+ based on access patterns — just like human memory.
122
+
123
+ ---
124
+
125
+ ## 🚀 Quick Start
126
+
127
+ ```bash
128
+ pip install NWcortex
129
+ ```
130
+
131
+ ```python
132
+ from star_graph import MemoryManager, AgentContext
133
+
134
+ mgr = MemoryManager()
135
+
136
+ # Remember
137
+ mgr.remember("User prefers type hints and concise code", tags=["preference"])
138
+ mgr.remember("Debugged Redis timeout — pool 10 → 20", tags=["redis","debug"])
139
+
140
+ # Recall (LLM-free activation spreading)
141
+ ctx = AgentContext(task_type="debugging")
142
+ memories = mgr.recall("Redis connection pool config", context=ctx)
143
+
144
+ # Sleep: consolidate, migrate layers, decay weak edges
145
+ report = mgr.sleep()
146
+
147
+ # Persist
148
+ mgr.save("agent_memory.db")
149
+ ```
150
+
151
+ ---
152
+
153
+ ## ⚡ LoCoMo-10 Benchmark
154
+ 10 conversations · 5,882 turns · 1,986 QA pairs · **Zero LLM calls**
155
+
156
+ | Method | has_answer | Δ vs Vector |
157
+ |--------|:----------:|:-----------:|
158
+ | Pure Vector Search | 25.3% | — |
159
+ | Cosine + BM25 | 31.5% | +6.2 pp |
160
+ | **NWC (BM40+txt60)** | **44.2%** | **+18.9 pp** |
161
+
162
+ ---
163
+
164
+ ## 📦 Installation
165
+
166
+ | Command | Includes |
167
+ |---------|---------|
168
+ | `pip install NWcortex` | Core engine (138 modules) |
169
+ | `pip install "NWcortex[embeddings]"` | + sentence-transformers |
170
+ | `pip install "NWcortex[mcp]"` | + MCP Server |
171
+ | `pip install "NWcortex[all]"` | Everything |
172
+
173
+ ---
174
+
175
+ ## 🧪 Running Tests
176
+
177
+ ```bash
178
+ pip install pytest pytest-cov
179
+ pytest tests/ -v
180
+ ```
181
+
182
+ ---
183
+
184
+ ## ⚖️ License
185
+
186
+ MIT
187
+
188
+ ---
189
+
190
+ <p align="center">
191
+ <a href="https://github.com/Thatgfsj/neuroweave-cortex/issues">Report a bug</a> ·
192
+ <a href="https://github.com/Thatgfsj/neuroweave-cortex/discussions">Discussion</a> ·
193
+ <a href="https://github.com/Thatgfsj/neuroweave-cortex/blob/main/ROADMAP.md">Roadmap</a>
194
+ </p>
@@ -15,7 +15,7 @@ CLI:
15
15
  nwc recall "query"
16
16
  """
17
17
 
18
- __version__ = "1.4.0"
18
+ __version__ = "1.4.2"
19
19
  __all__ = ["Cortex", "RecallResult", "ContextFrame"]
20
20
 
21
21
  from nwc.core.cortex import Cortex, RecallResult, ContextFrame
@@ -9,6 +9,7 @@ Endpoints:
9
9
  /graph — Get memory graph overview
10
10
  """
11
11
 
12
+ import asyncio
12
13
  from contextlib import asynccontextmanager
13
14
  from typing import Optional
14
15
 
@@ -37,8 +38,11 @@ app = FastAPI(
37
38
 
38
39
  app.add_middleware(
39
40
  CORSMiddleware,
41
+ # "*" origins cannot be combined with allow_credentials=True (browsers
42
+ # reject the response and Starlette will not echo the origin) — keep the
43
+ # wildcard for open local/dev use with credentials disabled.
40
44
  allow_origins=["*"],
41
- allow_credentials=True,
45
+ allow_credentials=False,
42
46
  allow_methods=["*"],
43
47
  allow_headers=["*"],
44
48
  )
@@ -151,7 +155,7 @@ async def chat_completions(req: ChatRequest):
151
155
  if req.inject_memory:
152
156
  user_msg = next((m.content for m in reversed(req.messages) if m.role == "user"), "")
153
157
  if user_msg:
154
- frame = cortex.context(user_msg)
158
+ frame = await asyncio.to_thread(cortex.context, user_msg)
155
159
  system_content = frame.to_system_prompt()
156
160
  # Prepend cognitive context as system message
157
161
  messages = [ChatMessage(role="system", content=system_content)] + list(req.messages)
@@ -165,7 +169,7 @@ async def chat_completions(req: ChatRequest):
165
169
  llm = get_llm(cfg.llm.provider, cfg.llm.model, cfg.llm.api_key, cfg.llm.base_url)
166
170
  from nwc.llm.base import ChatMessage as BaseMsg
167
171
  llm_messages = [BaseMsg(role=m.role, content=m.content) for m in messages]
168
- resp = llm.chat_sync(llm_messages)
172
+ resp = await asyncio.to_thread(llm.chat_sync, llm_messages)
169
173
  return ChatResponse(
170
174
  choices=[ChatChoice(message=ChatMessage(role="assistant", content=resp.content))],
171
175
  model=cfg.llm.model,
@@ -174,7 +178,8 @@ async def chat_completions(req: ChatRequest):
174
178
  pass
175
179
 
176
180
  # Fallback: return memory-augmented context as response
177
- frame = cortex.context(req.messages[-1].content if req.messages else "")
181
+ frame = await asyncio.to_thread(
182
+ cortex.context, req.messages[-1].content if req.messages else "")
178
183
  return ChatResponse(
179
184
  choices=[ChatChoice(message=ChatMessage(
180
185
  role="assistant",
@@ -192,7 +197,7 @@ async def health():
192
197
  """Health check."""
193
198
  if not cortex:
194
199
  raise HTTPException(503, "Cortex not initialized")
195
- s = cortex.stats()
200
+ s = await asyncio.to_thread(cortex.stats)
196
201
  return {"status": "healthy", **s}
197
202
 
198
203
 
@@ -201,7 +206,10 @@ async def memory_write(req: MemoryWriteRequest):
201
206
  """Store a memory."""
202
207
  if not cortex:
203
208
  raise HTTPException(503, "Cortex not initialized")
204
- anchor_id = cortex.remember(req.text, tags=req.tags, importance=req.importance)
209
+ anchor_id = await asyncio.to_thread(
210
+ cortex.remember, req.text,
211
+ tags=req.tags, importance=req.importance,
212
+ emotional_valence=req.emotional_valence)
205
213
  return MemoryWriteResponse(id=anchor_id)
206
214
 
207
215
 
@@ -210,7 +218,8 @@ async def memory_query(req: MemoryQueryRequest):
210
218
  """Retrieve memories by semantic query."""
211
219
  if not cortex:
212
220
  raise HTTPException(503, "Cortex not initialized")
213
- result = cortex.recall(req.query, max_items=req.max_items, context=req.context)
221
+ result = await asyncio.to_thread(
222
+ cortex.recall, req.query, max_items=req.max_items, context=req.context)
214
223
  return MemoryQueryResponse(
215
224
  memory=[MemoryItem(**m) for m in result.memory],
216
225
  entities=result.entities,
@@ -224,7 +233,7 @@ async def memory_context(req: ContextRequest):
224
233
  """Get compressed cognitive context for LLM injection."""
225
234
  if not cortex:
226
235
  raise HTTPException(503, "Cortex not initialized")
227
- frame = cortex.context(req.prompt)
236
+ frame = await asyncio.to_thread(cortex.context, req.prompt)
228
237
  return ContextResponse(
229
238
  focus=frame.focus,
230
239
  active_goals=frame.active_goals,
@@ -241,7 +250,7 @@ async def graph():
241
250
  """Get memory graph overview."""
242
251
  if not cortex:
243
252
  raise HTTPException(503, "Cortex not initialized")
244
- s = cortex.stats()
253
+ s = await asyncio.to_thread(cortex.stats)
245
254
  return GraphResponse(
246
255
  anchors=s.get("anchors", s.get("anchor_count", 0)),
247
256
  edges=s.get("edges", s.get("edge_count", 0)),
@@ -1 +1 @@
1
- from nwc.config.config import NwcConfig, get_config, init_config, reset_config
1
+ from nwc.config.config import NwcConfig, get_config, init_config, reset_config