Building Reliable Shared Memory for AI Agents With Git, Hybrid Search, and Temporal Retrieval
A firsthand look at debugging persistent AI agent memory, from multilingual retrieval failures and outdated instructions to a temporal search bug.
For Claude Code, OpenAI's Codex coding agent and Google's Antigravity IDE, the goal was to create a reliable shared memory system for AI agents. The author built a shared knowledge base called KYB (Know Your Business) to ensure information was consistently available across sessions. The base held instructions, decisions, and write-ups of mistakes, using Markdown files stored in Git. The search index was built separately and could be rebuilt from the stored data. The source code for KYB is open source.
However, there were several issues that needed addressing. First, agents could miss entries due to the language of their query. For example, on July 20th, the knowledge base returned nothing for queries related to the Russian knowledge registry, as entries were mixed in both Russian and English. To improve cross-language search, the multilingual-e5-small model was chosen, which turned questions and entries into numerical representations to compare meaning.
Another issue arose when Antigravity skipped an installed guide due to a YAML error. The description at the top of the file contained "Triggers, in any language: remember this," which caused a parsing error. The issue was resolved by rewriting the description as a text block.
Lastly, on August 16th, a bug was found in the installation process of the guide. The YAML parser reported that mapping values were not allowed in a certain context. The fix involved rewriting the description as a text block with proper YAML formatting. Once these issues were addressed, all three environments loaded the guide and confirmed their connection to the server.
Written by urgent.news from HackerNoon's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.