When building autonomous AI agents, developers often start with a flat vector database (like ChromaDB or Pinecone) to store conversation history. However, as agent sessions scale, flat vector search faces a fundamental limitation: it cannot encode time.
The Core Problem: Flat Vectors Don't Know "When"
If a user says "I live in New York" on Monday, and then "I moved to San Francisco" on Friday, a standard vector search for "Where does the user live?" will retrieve both statements with high cosine similarity. The agent receives conflicting facts and hallucinates.
The Solution: Bi-Temporal Dual-Calendar Memory (Smriti)
To solve this, Smriti uses a bi-temporal architecture in PostgreSQL:
-
SVO Event Extraction: Turns are parsed into Subject-Verb-Object (SVO) assertions with explicit
valid_fromandvalid_totimestamps. -
Zero-LLM Fact Supersession: When a new fact arrives, an in-process statistical engine invalidates the prior
valid_totimestamp without needing slow, expensive LLM reflection passes. -
Point-in-Time Queries: Queries evaluate
valid_to IS NULLfor active truths, keeping the context window 100% clean.
Check out the live API and benchmarks at smriti-kaal.vercel.app.
Top comments (0)