How to Give Your AI Coding Agent Infinite Memory A developer has created an open-source system that gives AI coding agents persistent memory by indexing past conversation transcripts locally. The setup uses a FastMCP server connected to an SQLite FTS5 database, allowing agents to query historical decisions in under 10 milliseconds with minimal token overhead. The implementation, designed for Google Antigravity, filters raw transcripts to preserve key reasoning and decisions, enabling agents to retrieve exact past trade-offs on demand. AI coding agents are stateless. Once a session closes, the context window resets, and the agent forgets every architectural trade-off, rejected alternative, and subtle debugging edge case you worked through. Cramming 100k-token transcripts into prompt context causes latency spikes, attention dilution, and cost bloat. Naive automated summaries strip away the exact chronological rationale and specific trade-offs you actually need. Don't stuff context. Index your past trajectories locally and let the agent query them on demand. Think of it as giving your agent an active retrieval reflex instead of asking it to carry its entire life history in working memory. By connecting a lightweight FastMCP server to an embedded SQLite FTS5 database, the agent can search its own historical conversations in sub-10ms and pull exact past decisions using fewer than 120 tokens. ~/.gemini/antigravity/brain/ │