Agy X-Ray
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Agy X-Ray
See inside Google Antigravity's context window, workspace file activity, and session history — as a 100% native MCP App side pane.
Zero ASAR patches · Zero CDP injection · Zero runtime dependencies · Survives every Antigravity update
English · 简体中文 · Quick Start · Features · Architecture · Offline CLI & Workbench · FAQ
Follows your GitHub & Antigravity light/dark theme automatically. Preview locally with npm run workbench using synthetic demo data — never touches your daily Antigravity install.
Non-Affiliation Disclaimer
Agy X-Ray is an independent MIT open-source community plugin and is not affiliated with or endorsed by Google LLC.
It uses only Antigravity's documented plugin, Lifecycle Hooks, and MCP Apps (SEP-1865) interfaces — it never patchesapp.asaror injects into Electron/CDP.
Why Agy X-Ray?
When running long multi-turn or multi-subagent sessions in Google Antigravity 2.0, three daily frustrations show up fast:
Context Black Box — You see total tokens climbing, but not which tool outputs ("Token Vampires") bloated the window or which turn broke your prompt prefix cache.
Missing Lightweight File Tree — After Antigravity 2.0 shifted to an Agent Manager workbench, quickly scanning every file the agent read, edited, or created—and jumping straight to the source—takes too many clicks.
Buried Past Sessions & Artifacts — That root-cause analysis or plan you solved 10 days ago is sitting inside local
transcript.jsonland*.mdartifacts, with no fast bilingual search or one-click way to pull it into your next prompt.
Capability | Client Patch / CDP Mods | Pure CLI Scripts | Agy X-Ray (Native MCP App) |
Survives Antigravity desktop updates | Often breaks | Yes | Always (100% official APIs) |
Native Side Pane ( | Fragile DOM hack | No UI | Native iframe + host theme vars |
One-click open touched files in Antigravity | No | No | Yes ( |
One-click inject past excerpts into next prompt | No | Manual copy | Yes ( |
Runtime dependencies after clone | Patcher / rebuild | Varies | 0 runtime deps (pre-bundled) |
Related MCP server: Unified Memory
Quick Start
Option 1: Install via Antigravity CLI (Recommended)
agy plugin install https://github.com/tone-leh/agy-xrayNo npm install, no build step, no API keys. The repository ships pre-bundled zero-dependency dist/server.cjs, dist/hook.cjs, and single-file dist/ui/app.html (~479 KB).
Option 2: Direct Clone into Antigravity Plugins Folder
# macOS / Linux
git clone https://github.com/tone-leh/agy-xray.git ~/.gemini/config/plugins/agy-xray
# Windows (PowerShell)
git clone https://github.com/tone-leh/agy-xray.git "$env:USERPROFILE\.gemini\config\plugins\agy-xray"Antigravity auto-discovers new plugins immediately—no restart required. Open Agy X-Ray from:
The Side Pane
+menu (aux_paneentrypoint),The Left Sidebar (
globalfull-page entrypoint), orAsk in chat: "Open Agy X-Ray to inspect this session's context and touched files."
What You Get
1. Context Composition X-Ray & Turn Growth Chart
Parses real Antigravity 2.0
transcript.jsonlstep metrics (input_tokensfresh +cache_read_tokenscached = exact effective context window per turn).Visualizes Prefix Cache Hit %, Peak Window, Stacked Composition (Cached Prefix · Fresh Input · Tool Outputs · Thinking · Model Output), and a Turn-by-Turn Stacked Bar Chart so cache drops stand out instantly.
Ranks Tool Output Hotspots ("Token Vampires") by payload KB, estimated tokens, and truncation counts (
truncated_fields), paired with automated health diagnostics.
2. Live Workspace File Tree (toggle-aux-pane)
Tracks every file touched by
read_file,view_file,edit_file,write_file,replace_file_content, and more, withR / E / Woperation pills, touch counts, and last step index.Filter by All / Modified / Read Only or path substring.
Click Open to launch the file natively in an Antigravity side-pane tab (
com.google.antigravity/toggle-aux-pane), or + Context to attach a structured reference pill to your next message (updateModelContext).
3. Cross-Session Time Machine (Bilingual EN + 中文 BM25 Search)
Indexes local transcripts and markdown artifacts (
implementation_plan.md,walkthrough.md, reports) across Desktop (~/.gemini/antigravity/brain), CLI, and IDE directories.Built-in pure-TypeScript BM25 + CJK bigram tokenizer — zero native C++ SQLite compilation issues on macOS, Linux, or Windows.
Click Inject on any historical match or artifact to attach its redacted excerpt straight into your next conversation turn.
4. Secret-Redacted Session Brief Export
One-click Export Brief generates a clean Markdown summary of token efficiency, diagnostics, hotspots, and touched files—automatically stripping Bearer tokens, JWTs, API keys (
sk-,AIza,ghp_,AKIA), and private key blocks before copy/share.
Architecture
MCP Tools & Visibility Isolation
Tool | Visibility | Surface | Purpose |
| Model + App |
| Opens the interactive dashboard (works with empty |
| Model + App | Inline / Pane | Returns compact token, cache, and hotspot diagnostics |
| Model + App | Inline / Pane | Lists read/edited/written workspace files for the session |
| Model + App | Text + Data | Runs local bilingual BM25 search across transcripts & artifacts |
| Model + App | Text + Data | Outputs a secret-redacted Markdown recap |
| App-only | UI | Fast session switcher list (hidden from model context) |
| App-only | UI | Full trajectory & turn data without hitting the 1 MiB trajectory cap |
| App-only | UI | Interactive Time Machine search inside the iframe |
| App-only | UI | Clipboard/context brief export from UI header |
Try Without Installing (Offline Workbench & CLI)
Want to test Agy X-Ray in a sandbox without touching your daily Antigravity setup?
git clone https://github.com/tone-leh/agy-xray.git
cd agy-xray
npm install
# 1. Launch the zero-touch offline workbench (uses synthetic demo data)
npm run workbench
# Open http://127.0.0.1:4387 — toggle Aux Pane / Global view & Dark / Light theme
# 2. Or inspect local Antigravity transcripts read-only from your terminal
node dist/cli.cjs doctor
node dist/cli.cjs list
node dist/cli.cjs analyze --demo
node dist/cli.cjs search "PKCE" --demoPrivacy & Security
100% Local-First: Zero network calls, zero analytics, zero cloud sync. All parsing and BM25 indexing run strictly on your machine.
Read-Only on Transcripts: Never mutates Antigravity transcripts,
config.json, or client binaries.Fail-Open Hooks:
hooks.jsononly records lightweight active-session pointers into${PLUGIN_DATA}/live-state.json(<10 ms) and fails open on any error so it can never block your agent loop.Automatic Redaction: Exported briefs and search snippets scrub common credentials, Bearer/JWT tokens, and private keys.
FAQ
Does agy-xray work alongside agy-fast, agy-session-guard, or other plugins?
Yes. It uses its own namespaced MCP server (agy-xray_xray), never patches client files, and complements context-saving or compact-guard plugins cleanly.
Why bundle dist/ in the repo?
So agy plugin install https://github.com/tone-leh/agy-xray works immediately with Node.js ≥ 20 and zero npm install step on macOS, Linux, and Windows.
How do I build and run tests locally?
npm ci
npm run typecheck
npm testLicense
MIT © tone-leh
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your AI agent traces, root-cause verdicts and issues, and run investigations, from your agent.
The context platform for AI agents: code search, team decisions, and grounded project context.
Your coding agents' past sessions as memory: search them, open the turn, see where agents failed, rules, git blame for session
Intelligent context infrastructure for AI teams: knowledge graph, sessions, tasks, documents.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables users to inspect real-time prompt cache hit rate, task throughput, and per-model token usage for Antigravity sessions and 5h/1d/7d windows through an interactive local dashboard. It combines lifecycle hook timing with local transcript data, with zero outbound network telemetry.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Antigravity agents to read and write Claude Code auto memory and CLAUDE.md/rules context while browsing OpenAI Codex CLI memories strictly read-only, with a native dashboard UI for editing, inspecting, and searching that memory. It also keeps prompt caching stable through deterministic startup snapshots, mid-session freezes, and append-only lazy rule injection.MIT
- AlicenseNot gradedqualityBmaintenanceEnables real-time monitoring of Google Antigravity context usage with detailed Messages/Thinking/Tool breakdowns, cache and checkpoint telemetry, one-click compaction, and smart suggested replies across Desktop, IDE, and CLI/tmux.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables browsing, editing, and previewing workspace files — Markdown, images, PDFs, and Git diffs — directly inside Google Antigravity's sidebars. Provides a file tree with quick search, CodeMirror-based editing with syntax highlighting, and one-click chat context attachment, all without consuming model tokens.MIT