THE AI SERVER
AI ARCHITECTURE · CODACUS SERIES
Systems Engineering · Multi-Agent Memory

Shared Memory for Local AI: The Codacus LLM Wiki + OKF System Breakdown

C
Analysis of Research by Codacus (@Codacus)
Systems Engineer · Independent Local AI Researcher
πŸ’‘ The Core Breakthrough

Traditional vector databases (RAG) are notoriously fragile for personal agents: embeddings lose temporal context, chunk retrieval is probabilistic, and running vector indexes adds compute overhead. In his landmark investigation "Every Local AI I Run Now Shares ONE Memory", engineer Codacus introduced the LLM Wiki + OKF (Open Knowledge Format). It stores structured human-readable Markdown files as an interconnected graph on the local filesystem, letting multiple independent agents read, cross-reference, and update one unified memory in real time.

The Problem: The "Amnesia Silo" in Local AI

If you run a local AI stack, you likely use multiple models and interfaces:

Each of these tools lives in total isolation. If your coding assistant refactors your database schema, your voice assistant has no idea. If you tell your chat model about an upcoming project deadline, your IDE agent is completely blind to it.

How Codacus Solved It: The LLM Wiki Architecture

Instead of injecting millions of dense vector floats into a ChromaDB or Milvus collection, Codacus constructed a deterministic, file-system-native Wiki structure:

~/.local-ai-memory/
β”œβ”€β”€ index.md               # Master entity index & tag map
β”œβ”€β”€ entities/
β”‚   β”œβ”€β”€ projects.md        # Active projects, stack decisions, milestones
β”‚   β”œβ”€β”€ people.md          # Collaborators, contacts, communication rules
β”‚   └── infrastructure.md  # Server IPs, GPU specs, local ports, paths
β”œβ”€β”€ daily/
β”‚   β”œβ”€β”€ 2026-09-15.md      # Raw conversational append-log
β”‚   └── 2026-09-16.md      # Incremental diffs and updates
└── graph.json             # Lightweight entity-relationship cache

The 3-Step OKF Synchronization Engine

The brilliance of the Open Knowledge Format (OKF) is that any LLMβ€”from a lightweight 7B model to Qwen 27Bβ€”can read and write to it with standard tool calls:

1. The "Read-Before-Act" Hook

When any agent starts a task, a lightweight bash or Python hook passes index.md and relevant entity files directly into the system prompt. Because Markdown is token-efficient, the memory load rarely exceeds 600–900 tokens.

2. Structured Write Diffs (No Hallucinatory Overwriting)

Agents do not overwrite the master files directly. Instead, when an agent learns a new fact (e.g., "Akshat migrated to swappiness=25"), it emits a structured OKF diff to the daily log:

```okf:update
entity: infrastructure.md
target_section: Kernel & Memory Tweaks
action: append
payload: - 2026-09-16: Swappiness set to 25 and page-cluster to 0. Verified stable.
```

3. Nightly Compaction Loop

At 2:00 AM, a cron job spins up a local model for 90 seconds. It processes the daily append-logs, resolves conflicts, and consolidates the knowledge graph into the primary entity files.

Empirical Results: RAG vs. LLM Wiki