CortexDB Docs
Core Concepts

Core Concepts

The architecture behind CortexDB — five memory layers, event sourcing, bi-temporal time, scopes, and hybrid retrieval.

CortexDB is built on a small set of ideas that fit together. Read these in order for the full model, or jump to what you need.

  • The Five Memory Layers — Events → Episodes → Facts → Beliefs → Understanding. Only Events are not derived.
  • Event Sourcing — the immutable event log is the source of truth; every other store is a rebuildable cache.
  • Bi-temporal Model — two time axes: when something was true, and when CortexDB learned it.
  • Scopes — the single hierarchical namespace primitive that carries ACLs, quotas, and audit.
  • The Experience Envelope — one payload shape for every kind of ingest.
  • Lifecycle & Async Writes — the six atomic operations and the SSE stream; writes are async by default.
  • Authorization — PASETO tokens and the four-tier capability stack.
  • Knowledge Graph — an entity graph emergent from Facts and Beliefs (opt-in).
  • Hybrid Retrieval — BM25 + vectors + graph + rerank, fused with RRF.

Running CortexDB yourself? Several capabilities (Facts/Beliefs extraction, graph traversal, cross-encoder rerank) are opt-in and off by default self-hosted. See Self-hosting defaults.