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-memorysearch 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: agent-memory-v1
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden. It does disclose the substantive behavioral scope — exactly which anomaly classes are checked — but never states whether the tool is strictly read-only, whether it repairs anything it finds, or what the cost/scope of a scan is. The name implies diagnostics, but the safety profile is left to inference.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, front-loaded with the action and target, followed by the detection list. There is no filler and no repetition of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, no annotations, and no params, the description should say what the agent gets back — a structured findings list, a pass/fail summary, remediation suggestions? It states what is checked but not what is returned, leaving a real gap for a report-producing tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing for the description to disambiguate. Baseline 4 applies; the schema is empty and fully consistent with a parameterless report call.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb ("Analyze") plus a concrete resource ("Antigravity brain storage health") and an enumeration of the fault classes it detects. It is clearly distinct from the sibling tools (sync, search, lineage, digest) because it is the only diagnostic one, though the description never names those siblings to make the contrast explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no statement of when to run this (e.g., before/after a sync, when sessions stall) and no named alternative. The mention of orphaned folders, BigInt crashes, and stalled sessions hints at troubleshooting, but the agent must infer the trigger condition itself.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
agy_brain_searchB
Search indexed Antigravity brain conversations and artifacts using sanitized FTS5 BM25 ranking.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default 10). | |
| query | Yes | Search query across conversation steps, thinking blocks, tool calls, and artifacts. | |
| step_type | No | Optional step type filter (e.g. USER_INPUT, PLANNER_RESPONSE). | |
| include_artifacts | No | Also search Markdown artifacts (default true). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it partially meets it by disclosing the retrieval mechanism (sanitized FTS5 BM25 ranking), implying relevance-ordered results. However, it omits important behavior: whether it is strictly read-only, whether results are paginated, and critically whether the index needs syncing beforehand via the sibling sync tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One front-loaded sentence with no padding, which is efficient. It is arguably too terse for a tool with four parameters and zero annotations, and 'sanitized FTS5 BM25' is implementation jargon that adds little for an agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No annotations and no output schema means the description must carry behavioral and return-value context, and it does not. It says nothing about result shape, ordering guarantees, pagination, index freshness prerequisites, or what 'sanitized' means, which is a real gap for a search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all four parameters (query, limit, step_type, include_artifacts) are already documented with defaults. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific verb (Search) and a specific resource (indexed Antigravity brain conversations and artifacts), which does distinguish it from the sync/lineage/digest/health siblings. It stops short of explicitly contrasting with those siblings, so an agent infers rather than reads the distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use, when-not-to-use, or alternative-selection guidance. The description never says, for example, whether the index must first be refreshed by agy_brain_sync or how this differs from agy_brain_session_digest, leaving the agent to guess.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
agy_brain_session_digestA
Export a compact Markdown handoff digest of a conversation within a strict character budget.
| Name | Required | Description | Default |
|---|---|---|---|
| conv_id | Yes | Conversation ID to summarize. | |
| max_chars | No | Maximum character budget for the Markdown digest (default 2000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It usefully discloses the Markdown output format and the strict character-budget constraint, but it does not clarify read-only safety, truncation behavior when the budget is exceeded, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no wasted words. It communicates the core action, output format, and key constraint efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool with full schema coverage, the description covers the essential purpose and output format. However, without annotations or an output schema, it leaves behavioral details such as truncation policy and failure handling unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so both parameters are already well documented. The description only reinforces 'conversation' and 'strict character budget' without adding syntax, format, or edge-case semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: export a Markdown handoff digest of a conversation. It is clearly distinct from sibling tools such as search, sync, lineage, and health report, though it does not explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'handoff digest' implies the intended context-transfer use case, but there is no explicit guidance on when to choose this tool over siblings or when not to use it. Usage is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
agy_brain_subagent_lineageA
Reconstruct parent-to-child subagent call-graph trees and child outcomes for a conversation.
| Name | Required | Description | Default |
|---|---|---|---|
| conv_id | No | Conversation ID to inspect parent, spawned children, and descendants. | |
| role_query | No | Optional substring filter on subagent Role or TypeName. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full behavioral burden. It does disclose the return shape at a high level (tree structure plus child outcomes), which is real added value, but it omits whether this is read-only, how deep the traversal goes, and what happens when the optional conv_id is omitted.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler — the core capability is stated first, and nothing in it repeats the tool name or structured fields.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter read tool with full schema coverage this is close to sufficient, but with no output schema and no annotations, the description should at least indicate the shape of returned lineage data and the behavior when conv_id is absent (required parameters = 0).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and both parameters are documented in the schema, so the baseline is 3. The description adds only the framing that results are scoped 'for a conversation'; it does not explain how role_query interacts with the tree or what filtering does to descendant nodes.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb ('Reconstruct') and a specific resource ('parent-to-child subagent call-graph trees and child outcomes'), which is clearly distinct from the search/sync/digest/health siblings. It does not name or contrast an alternative sibling, so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied by the phrase 'for a conversation' — an agent can infer this is the lineage-inspection tool, but there is no explicit when-to-use, when-not-to-use, or pointer to a sibling for related questions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
agy_brain_syncB
Incrementally index Antigravity brain transcripts and Markdown artifacts into SQLite WAL + FTS5.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Force full re-index of all transcripts even if unchanged. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose key traits: it mutates persistent state (SQLite WAL + FTS5), it is incremental by default, and unchanged transcripts are skipped unless forced. It does not cover permissions, concurrency/locking, whether the index is created if absent, or what a run returns or does on failure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler; the incremental-vs-full distinction is stated first. It is efficient, though the storage-mechanism detail ('SQLite WAL + FTS5') is close to implementation trivia for an agent deciding whether to call it.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No annotations and no output schema, so the description should say more about a mutating indexer: refresh cost, failure behavior, and the relationship to the search/session tools that consume this index. What it does say is accurate and sufficient to identify the tool, but not enough to call it confidently in edge cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single parameter 'force' is fully documented there, so the schema does the work. The description only reinforces the default behavior (incremental) against which 'force' is contrasted, adding no new syntax or format detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb (incrementally index) and its resources (Antigravity brain transcripts and Markdown artifacts) plus the destination (SQLite WAL + FTS5). It is clearly a write/index operation, distinguishable in kind from the read-oriented siblings (search, digest, health_report), though it never names them explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Incrementally' implies this is the routine refresh path and that calling it repeatedly is cheap, which is useful implied guidance. But there is no explicit statement of when to run it (e.g. before agy_brain_search returns fresh results) or when to prefer force over the default, leaving the agent to infer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.0.0- First observed
agy_brain_health_report - First observed
agy_brain_search - First observed
agy_brain_session_digest - First observed
agy_brain_subagent_lineage - First observed
agy_brain_sync
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.
An agent-native database over MCP: shared, validated, structured records in every AI chat.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables agents to store conversational turns in a single SQLite store and recall relevant context through lexical, entity, dense, and recent views without an LLM in the recall loop. It exposes MCP tools for remembering, bulk ingest, recall, stats, and session deletion, with persistent indexes and zero-token maintenance.-
- AlicenseNot gradedqualityAmaintenanceEnables coding agents to store and retrieve source-backed context locally in SQLite, with FTS5 search, optional reranking, and stdio MCP tools.MIT
- 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
- AlicenseAqualityBmaintenanceEnables any MCP client to index files, directories, and arbitrary text into a local SQLite-backed vector database and perform semantic search with language-aware chunking, filters, and context expansion, all offline without network calls.10MIT