I built an open-source local LLM engine that replaces traditional vector DBs with a Skyrim-style Memory with what I envision as the mix that solves the memory crash problem I call "Level-of-Importance" memory decay and IPFS .pmem sharding. Here is a look at the architecture.
Hey everyone,
If you run local models for long-form coding, research, or personal knowledge bases, you already know the core bottleneck: context bloat and token waste. Traditional RAG and vector DBs treat memory like a giant, flat linear log, dragging down inference speed and requiring heavy cloud footprints to stay organized.
Over the last three days, I got tired of the standard setup and built a local-first, peer-to-peer alternative from scratch. I call it a Synthetic Brain Emulator, and it borrows memory management techniques from 80s retro game design and neuroscience.
Here is how the architecture handles memory, context, and cross-device sync locally:
- Skyrim-Style LoI Memory Engine & Pointer Chaining
Instead of keeping every past conversation or document active in the context window, memory units are assigned a Level-of-Importance (LoI) score and categorized by domain.
Homeostatic Temporal Decay: Just like the Synaptic Homeostasis Hypothesis (SHY), low-LoI memories undergo temporal decay (\text{LoI} = (\text{Base} + \text{Access Boost}) \times e^{-\lambda t}). They automatically compress into immutable IPFS CIDs (.pmem files) and sit dormant in archival rings.
Pointer-Chained Traversal: Inspired by 80s pointer-chaining constraints, high-LoI anchor memories explicitly point to their logical successors. When a query hits the system, it traverses a deterministic neural path instead of executing expensive, brute-force vector scans across millions of tokens.
- The Conscious-Thought-Processor Unit (CTPU)
I wanted a way to see the model thinking rather than just watching a terminal scroll text. Based loosely on Global Workspace Theory (GWT):
When a prompt comes in, relevant memory nodes across cortical regions are pulled into a semantic nexus.
The UI renders a real-time Conflagration Wrapper—a translucent color-gradient sheath over the active cluster. It shifts from deep blue to bright white based on processing intensity, complete with swirling red eddies when the subconscious filter is pruning conflicting noise.
- The AI Sleep Simulation Array (Overnight Consolidation)
For local multi-node setups or independent research teams, the app includes a background simulation array that runs when your hardware goes idle overnight:
Slow-Wave Pruning: Cleans up redundant noise and recalibrates LoI tables.
REM Conflagration: Autonomous background loops sweep across disparate local chat sessions and .pmem vaults to discover latent cross-references.
Morning Briefs: Wakes up to auto-generated markdown architectural schematics and dependency graphs derived from yesterday's raw chat logs.
- P2P Mesh & Research Swarms
Everything runs locally via FastAPI, Tailwind, and P2P sockets. You can shard heavy datasets into .pmem files, set granular seeding permissions, and safely sync encrypted memory vaults with a team without relying on a central server.
I’m currently wrapping up the codebase to push to GitHub for open-source contribution.
What do you guys think of this approach to context management? Would love feedback from fellow local-hosting devs on how to optimize the LoI decay loops and pointer-chain lookups!
Posted Sep 1, 2026, 4:42 PM UTC