Not a vector database. Not a graph database. Not RAG.
Not even an "LLM-powered memory system".
A self-organizing cognitive memory β memory is structured by use, not by prompt.
No memory is ever deleted. Only accessibility changes.
LLM reads memory. LLM does not decide what memory says.
Memory structure is decided by the memory system, not by the LLM.
The LLM can read memory. The LLM can maintain memory (summarize, merge, archive).
But the LLM does not determine retrieval paths, edge weights, or relevance scores.
Brightness = f(historical access frequency, recency, edge strength)
NOT f(LLM-generated vector at query time)
This is the difference between a memory system that learns and one that re-computes every time.
Vector databases retrieve. Graph databases traverse. RAG systems query.
NeuroWeave Cortex learns from use:
| Capability | Vector DB | Graph DB | RAG | NWC |
|---|---|---|---|---|
| Semantic retrieval | β | β | β | β |
| Graph traversal | β | β | β | β |
| Activation-based retrieval | β | β | β | β |
| Edge decay (no deletion) | β | β | β | β |
| Memory never deleted | β | β | β | β |
| Memory lifecycle (L1βL2βL3) | β | β | β | β |
| LLM-free retrieval routing | β | β | β | β |
| LLM for maintenance only | β | β | β | β |
| Sleep consolidation | β | β | β | β |
| Source attribution & trust | β | β | β | β |
Query β LLM generates embedding β LLM decides what's relevant β Return
Problem: LLM is the router. Every retrieval is a new LLM computation. Nothing stabilizes.
Query β Embedding β Find seed nodes β Activation spread β Return
The LLM never touches the retrieval path. Retrieval is driven by:
- Historical activation β how often has each memory been accessed?
- Edge strength β how strongly are memories connected (reinforced by co-use)?
- Temporal decay β edges weaken naturally over days of disuse (but NEVER to zero)
- Recency boost β recently accessed memories activate more readily
Traditional memory systems: Store β Retrieve β Delete (when full)
NWC memory system: Create β Activate β Dim β Dormant β Reactivate βΎοΈ
Memories do NOT have a "delete" state. They transition between activation levels:
- 1.0 β currently active (just recalled)
- 0.7 β frequent access
- 0.3 β infrequent but known
- 0.1 β dormant (not accessed in a long time)
- 0.01 β deep dormant (years old)
Even a memory with activation_level = 0.01 is retrievable β if activation
propagation from a connected query reaches it. This mimics human memory:
you may not think about your elementary school classmates for decades,
but a single photo can bring everything flooding back.
NWC organizes memory into four cognitively-grounded layers:
L0: Input βββ Ephemeral, per-session only (minutes)
β promote on repeated access (>3 times) or age (>30 days)
L1: Working βββ Recent active memories (hours-days)
β LLM maintains: add, merge, summarize
β System routes: retrieval is LLM-free
β consolidate
L2: Long-term βββ Stable facts, experiences, relationships (months-years)
β ONLY operations: strengthen, supplement, weaken
β NEVER: full reconstruction
β archive on 90d no-access or low importance
L3: Dormant βββ Low-activation memories retrievable via propagation (years)
β NEVER deleted. Only activation_level approaches 0.
β reactivate on query similarity or activation propagation
This is not a flat table. Memories physically transition between layers based on access patterns β just like human memory.
pip install NWcortexfrom star_graph import MemoryManager, AgentContext
mgr = MemoryManager()
# Remember
mgr.remember("User prefers type hints and concise code", tags=["preference"])
mgr.remember("Debugged Redis timeout β pool 10 β 20", tags=["redis","debug"])
# Recall (LLM-free activation spreading)
ctx = AgentContext(task_type="debugging")
memories = mgr.recall("Redis connection pool config", context=ctx)
# Sleep: consolidate, migrate layers, decay weak edges
report = mgr.sleep()
# Persist
mgr.save("agent_memory.db")10 conversations Β· 5,882 turns Β· 1,986 QA pairs Β· Zero LLM calls
| Method | has_answer | Ξ vs Vector |
|---|---|---|
| Pure Vector Search | 25.3% | β |
| Cosine + BM25 | 31.5% | +6.2 pp |
| NWC (BM40+txt60) | 44.1% | +18.8 pp |
| Command | Includes |
|---|---|
pip install NWcortex |
Core engine (138 modules) |
pip install "NWcortex[embeddings]" |
+ sentence-transformers |
pip install "NWcortex[mcp]" |
+ MCP Server |
pip install "NWcortex[all]" |
Everything |
pip install pytest pytest-cov
pytest tests/ -vMIT
Report a bug Β· Discussion Β· Roadmap