# The loomcycle memory architecture, drawn

> Source: <https://loomcycle.dev/blog/loomcycle-memory-architecture.html>
> Published: 2026-09-03 14:00:00+00:00

Companion to the memory testing story. A structure-diagram tour of the memory subsystem as it stands after v1.75.0. One Memory tool reaches five storage planes: key/value (semantic recall), vector (embedding-backed nearest-neighbor), SQL Memory (per-scope relational store), chunked-graph Documents (hierarchical Markdown with typed chunks), and an entity graph layered on the Document chunks that carries facts with subjects, types, edges, and bi-temporal validity. Four scopes name whose data an op reaches: agent, user, tenant, global (admin-only, fails closed). Owner id is resolved server-side from the run identity, never wire-supplied; a model-supplied owner id would let one tenant's agent read another's data. A fact carries three timestamps (observed_at, valid_at, invalid_at) plus a stored created_at; the as_of predicate walks the timeline at any point, and a correction supersedes rather than deletes, so what was true on a past date still answers correctly and a fact with a known future end date does not disappear today. Ontology-declared placement decides which scope a fact about a given entity type belongs in; the decision tree fails closed on every uncertainty (undeclared type, inconsistently-typed subject, subject matches profile owner, isolated caller, missing grants). Both halves of a fact land in the same scope or neither does. Hybrid recall combines a vector search and a full-text search with Reciprocal Rank Fusion, filters by observed_at window, as_of, source selector, and tenant fold. A sources_applied flag whose zero value is false makes a silently-widened result impossible to pass as filtered. Every row carries a provenance envelope: tenant, session, run, agent, model, compaction_generation, source_quote span, origin (server-stamped from the writer's identity), judged_by, judged_at. An RFC CT P2 harvest bridge banks distillation-evicted spans onto the consolidator's queue so a span the run would have thrown away becomes a durable fact for future runs. Six Mermaid structure diagrams.
