agy-brain-memory
Provides indexing, FTS5 full-text search, subagent lineage reconstruction, and health/session-digest analysis over Google Antigravity brain session transcripts and Markdown artifacts stored under ~/.gemini/antigravity/brain.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agy-brain-memory search my past conversations for the HookMultiplexer CRIT-01 fix"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agy-brain-memory
Antigravity Brain Cross-Conversation FTS5 Memory, Subagent Lineage & Context Compaction Engine (v1.0.0).
Overview
Google Antigravity stores session transcripts (transcript.jsonl) and Markdown artifacts across UUID directories in ~/.gemini/antigravity/brain/<conv-id>. Without an index, searching past sessions or reconstructing parent-to-child invoke_subagent trees requires brute-force linear scans across hundreds of megabytes of JSONL files.
agy-brain-memory solves this with zero third-party runtime dependencies (100% Python 3.10+ standard library sqlite3 WAL + FTS5):
Incremental SQLite WAL + FTS5 Brain Indexer (
agy_brain_memory.indexer):Tracks
mtime_nsandfile_sizeper conversation transcript so unchanged sessions are skipped in sub-millisecond time.Tolerates malformed or mid-write truncated JSONL lines without crashing.
Indexes conversation steps, reasoning summaries, tool calls, and top-level Markdown artifacts (
task.md,implementation_plan.md,walkthrough.md).
FTS5 BM25 Cross-Conversation Search & Subagent Lineage (
agy_brain_memory.search):Sanitizes arbitrary punctuation/operator queries (
:,-,(),[],*) into safe FTS5 token queries.Reconstructs parent-to-child
invoke_subagenttrees (parent_conv_id -> child_conv_id), subagent roles, prompts, and child final outcomes.
Brain Health Analyzer & Compact Session Digest (
agy_brain_memory.compactor):Identifies empty/orphaned directories,
BigIntserialization failures, and stalledIN_PROGRESSsessions.Exports token-budgeted Markdown handoff digests (
export_session_digest) withconversation://<conv-id>links.
Turnkey Level-2 (L2) Antigravity Plugin & Stdio MCP Server (
agy_brain_memory.plugin_installer,agy_brain_memory.mcp_server):Exposes 5 MCP tools (
agy_brain_sync,agy_brain_search,agy_brain_subagent_lineage,agy_brain_session_digest,agy_brain_health_report) with composite tool names guaranteed<= 64characters.
Related MCP server: KusiScribe Core
Quickstart
# 1. Sync ~/.gemini/antigravity/brain into SQLite WAL + FTS5
python -m agy_brain_memory.cli sync
# 2. Search across all conversations and artifacts
python -m agy_brain_memory.cli search --query "HookMultiplexer CRIT-01"
# 3. Inspect subagent parent-child call graph
python -m agy_brain_memory.cli lineage --conv-id <conversation-uuid>
# 4. Export a compact session handoff digest (<= 2000 chars)
python -m agy_brain_memory.cli digest --conv-id <conversation-uuid> --max-chars 2000
# 5. Run brain storage health diagnostics
python -m agy_brain_memory.cli health
# 6. Install turnkey Level-2 native Antigravity plugin
python -m agy_brain_memory.cli install-plugin
# 7. Run the 4-sandbox benchmark suite
python -m agy_brain_memory.cli benchmarkLicense
MIT License — Copyright (c) 2026 orakulzero.
Available Tools
5 toolsagy_brain_health_reportB
Analyze Antigravity brain storage health, detecting orphaned folders, BigInt crashes, and stalled sessions.
Inputs: no named parameters.
agy_brain_searchB
Search indexed Antigravity brain conversations and artifacts using sanitized FTS5 BM25 ranking.
Inputs: query (required), limit, step_type, include_artifacts.
agy_brain_session_digestA
Export a compact Markdown handoff digest of a conversation within a strict character budget.
Inputs: conv_id (required), max_chars.
agy_brain_subagent_lineageA
Reconstruct parent-to-child subagent call-graph trees and child outcomes for a conversation.
Inputs: conv_id, role_query.
agy_brain_syncB
Incrementally index Antigravity brain transcripts and Markdown artifacts into SQLite WAL + FTS5.
Inputs: force.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool occupies a clearly distinct role in the memory lifecycle: indexing (sync), querying (search), call-graph reconstruction (subagent_lineage), export (session_digest), and diagnostics (health_report). There is no verb collision—e.g. only one tool writes to the index and only one reads from it—so misselection risk is very low.
All five tools share the uniform `agy_brain_` namespace prefix and snake_case formatting, which makes them easy to recognize as a family. The only minor deviation is the mix of verb-first names (`sync`, `search`) with noun-phrase names (`subagent_lineage`, `session_digest`, `health_report`), though each remains self-explanatory.
Five tools is a tight, well-scoped surface for an indexed memory store: ingest, query, two analytical views, and one maintenance/diagnostic tool. Nothing appears redundant and no obvious workflow step is missing a tool.
The surface covers the core lifecycle (sync → search → lineage/digest → health), but there is no explicit delete/prune or reindex/rebuild operation, even though `health_report` detects orphaned folders and stalled sessions—an agent can see problems but cannot act on them. There is also no direct get-by-id fetch of a full conversation, so retrieval relies on search or digest export.
Maintenance
Related MCP Connectors
Multiple MCP tools, persistent graph memory, token-saving data pointers, and more.
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Your personal library, readable by AI agents: durable snapshots, hybrid search, 46 MCP tools.
An agent-native database over MCP: shared, validated, structured records in every AI chat.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to store and retrieve source-backed context locally in SQLite, with FTS5 search, optional reranking, and stdio MCP tools.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables autonomous multi-agent workflows to capture, preserve, and retrieve immutable transcripts and atomic memory cards through a local MCP server, providing tools for forensic search, topic mapping, and structured fact access without losing context fidelity.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to maintain lossless, queryable long-term project memory through local SQLite storage, bi-temporal history, hybrid retrieval, and Git-backed Markdown mirrors, exposed via MCP tools and resources.131 npm1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables agents to persist, search, and consolidate durable cross-session memory through a dual-vault SQLite/FTS5 store with hybrid reranking, retrieval gating, temporal relations, and Markdown wiki projection.MIT