MemoryOps AI

Governed memory and context infrastructure for AI agents.

The Problem

Naive vector databases treat agent memory as an unmanaged embedding dump. In production, this causes memory staleness, conflicting facts, accidental PII/secret persistence, token budget bloat, and the lack of a provable audit trail for regulated compliance.

Key Decisions

  • Deterministic Governance Policies: Implemented pre-write policy validation (secret/credential scanning, slot mutation grammar, utility filtering) before state touches disk.
  • PostgreSQL Row-Level Security (RLS): Enforced tenant and user isolation directly at the database engine level rather than fragile application code.
  • Hybrid Retrieval & Context Admission: Combined dense vector cosine similarity with lexical BM25 ranking, followed by context redaction and token budgeting.

Results

  • Evaluation: 100% pass rate across 28/28 golden evaluation benchmark scenarios.
  • Auditability: Complete tamper-evident audit trail for every memory admission, update, block, and deletion.

What I Learned

Embeddings are merely mathematical lookup indices; memory is system state that demands deterministic database rigor, lifecycle compaction, and formal governance.


[Built as a production-grade agent memory OS. Source code is public.]