Diagnose memory failures without guessing.
When an agent behaves wrong, the question is: did it fail to write, write the wrong thing, retrieve the wrong entry, or retrieve correctly and ignore? MemexAI separates these failure modes with access logs, revision history, and file-level inspection.
Embedding-based memory conflates four different failure modes.
Personalization failures have four distinct causes: the agent didn't write the fact, the agent wrote the wrong fact, retrieval returned something else, or retrieval worked but the model ignored it. Debugging any of these is hard when memory is a vector index.
You can query for similar entries, but you can't see a write log. You can look at retrieval results, but you can't see the reads that happened during a specific session. You can inspect current embeddings, but you can't roll back to the state the agent had when it made the wrong call.
In practice, infrastructure teams spend hours on failures that should take minutes. You know the output was wrong. You know it involves memory. But the memory layer gives you no surface to separate "wasn't there" from "was there but not retrieved" from "was retrieved but not used."
The situation is worse when failures are intermittent — a retrieval that usually works, failing for specific users under specific conditions. Without a read log tied to specific sessions and tool calls, reproducing the issue requires either sampling luck or expensive synthetic testing.
At scale, you also need to know which changes improved personalization quality. Without a revision trail, you can't attribute behavioral changes to specific memory writes.
Three surfaces for three failure modes.
Access logs — separate reads from writes
Every read and write is logged with a timestamp, the tool call ID, the user ID, and the file path. When an agent session goes wrong, pull the access log for that session: you can see exactly which files were read (and which were not), which were written, and in what order.
This immediately separates "agent didn't write" from "wrote but didn't retrieve" from "retrieved but not injected." The failure mode determines the fix: a prompt change, a retrieval tuning, or an injection issue.
Revisions — separate current state from history
Every write creates a revision with the full file content at that point. You can open any file and see every version it has ever had, when each was written, and which tool call wrote it.
For an incident at a specific time, reconstruct the exact memory state the agent had: what was in each file at that moment, what had been written by then, what had been read. No guessing about what the agent knew.
// Incident reconstruction // 1. Find the session from access logs // 2. Pull revisions for relevant files at that timestamp // 3. Reconstruct the exact prompt block the agent received SELECT content_text, created_at, actor FROM mx_revision WHERE file_id = $fileId AND created_at <= $incidentTime ORDER BY created_at DESC LIMIT 1;