mykungfu.ai — Systems / Memory Layer

The Lucid Memory Layer

The durable substrate the Decision System and the Deliberations pipeline both read from and write to.

It serves the theory of context activation defined at thelucidmind.ai: memory is stored; context is activated. This page is the implementation.

Two Layers
L1 (Postgres) and L2 (Qdrant)
L1 · Postgres

Source of truth

All epistemic content lives in epistemic_objects with a type discriminator and a content JSONB field. This is the authoritative store.

L2 · Qdrant

Rebuildable index

The vector store is derived, never authoritative: L2 must be fully rebuildable from L1. Lose it and nothing is lost.

Embedding

Embedding writes are fire-and-forget. A Redis outage must never fail a Postgres write.

Embeddings are produced asynchronously through Celery using Ollama (nomic-embed-text, 768-dim). The L1 write commits first and independently; the embed task is dispatched after, wrapped so a broker outage degrades search quality temporarily but never blocks or fails the authoritative write.

Retrieval Broker

Retrieval ranks candidates with a live composite of four terms — not similarity alone:

similarity×0.30
ecs×0.40
recency×0.20
stance_bonus×0.10
Temporal Graph Layer — Under Evaluation

A temporal graph layer (Graphiti is the candidate) is being evaluated for relational and domain memory — the “Lucid Atlas”. It is scheduled, not built: this page marks it as evaluation, not a live component.

→ The Decision System that uses it→ Context Architecture (theory)