Temporal-Stratified Retrieval for AI Agent Memory: A Structure-First Alternative to Vector Search
Large language model (LLM) agents operating in fast-paced domains require memory systems that prioritize recency and precision over semantic similarity. We present Cortex, a hierarchical-temporal retrieval engine that indexes markdown-based memory atoms using structured metadata (project, type, tag, temporal layer) without embeddings. Cortex stratifies atoms into hot, warm, and cold layers based on recency, applies a deterministic keyword scoring algorithm with temporal bonuses, and maintains live documentation through marker-based auto-refresh. On a reproducible benchmark of 500 synthetic atoms and 100 queries, Cortex achieves mean search latency of 1.6ms with 100% top-1 precision on tag-matched queries, with the hot layer containing the top result in 66% of cases. Deployed since March 2026 on a production system managing 470 atoms across 14 projects, the system requires zero external dependencies. We argue that for structured, high-velocity knowledge domains, temporal stratification with multi-dimensional indexing provides a practical, interpretable, and low-cost complement to dense vector retrieval.
Authors
- Andres Hartmann
Institutions
- Liberty Science Center (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-04-17
- DOI
- https://doi.org/10.5281/zenodo.19617134
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00