MemGUARD is a memory integrity layer for long-running AI agents. Instead of naively truncating conversation history when context windows fill up, it runs a three-stage pipeline: compress (scoring and summarizing messages locally using BART and MMR selection), eliminate (checking every claim in the summary against the original transcript via cosine similarity, dropping anything that drifted), and reconstruct (injecting only verified claims into the next prompt).

Everything runs locally — no extra API calls. The original transcript is treated as immutable ground truth, and every dropped claim is logged with a similarity score and reason. The result is a drop-in three-line wrapper for any chat loop that actually audits what it remembers.

Built With

Share this project:

Updates