Open-Source agy-fast Cuts Google Antigravity Agent Turns by 34%
A community plugin trims Google Antigravity's tool-call overhead, cutting LLM turns by 34% and token usage by 31% without touching the UI.
Takeaways
- New open-source plugin agy-fast accelerates Google Antigravity by collapsing fragmented tool calls
- Claims 34% fewer LLM turns, 31% token reduction, 40% less upload traffic
- Based on analysis of 8,446 real LLM turns across 55 Antigravity sessions
- Ships four composite MCP tools: batch_search, apply_edits, read_slices, run_checks
- Zero runtime dependencies, Node.js 20+, MIT licensed, one-line curl install
- Policy-compliant: no tampering with safety checks, binaries, or authentication
agy-fast is an open-source plugin designed to reduce latency in Google’s Antigravity coding agent. Its author reports 34% fewer LLM turns, 31% lower token use, and 40% less upload traffic while retaining Antigravity’s interface, diffs, and safety checks.
The plugin targets tool orchestration, where repeated searches, file reads, edits, and checks can force the model through additional round trips. Each turn carries startup latency, so consolidating related operations can shorten a task even when Gemini generates tokens at the same speed.
Round trips consume the time
The author analyzed 55 Antigravity sessions containing 8,446 LLM turns and 17,302 tool calls across 55.25 hours of cumulative single-agent activity. The project’s latency report identifies several recurring sources of delay.
| Source of delay | Reported finding | Why it adds latency |
|---|---|---|
| Time to first token | Median TTFT is about 6.1 seconds, while 68.1% of turns produce fewer than 700 tokens. | Every unnecessary model round trip adds roughly 6 to 8 seconds before useful output begins. |
| Fragmented edits | 52.5% of edit_file calls are additional same-file edits within the same turn. |
Splitting related changes creates more tool calls and validation cycles. |
| Read-only shell commands | 46.3% of run_command calls perform searches or inspections such as rg, grep, find, or git status. |
The report measures about two seconds of shell overhead, compared with roughly two milliseconds for local ripgrep execution. |
| Repository discovery | The first three turns average 49.2 seconds while inspecting the tree, Git state, and project scripts. | The agent repeatedly gathers context that can be collected once at startup. |
| Large file reads | read_file produces 81.9% of all bytes returned by tools. |
Broad reads enlarge prompts and increase upload traffic. |
| Long pauses | Gaps longer than 60 seconds raise reported prompt-cache miss rates from 1.4% to a range of 15.9% to 93.8%. | Cache misses require more context to be uploaded and processed again. |
These measurements led the author to combine small, related operations into fewer tool calls. The expected gains depend on the workload: sessions dominated by fragmented searches, reads, and edits have more room for improvement than workflows that already batch those operations.
Four tools compress the loop
agy-fast runs a persistent local server over standard input and output using the Model Context Protocol, or MCP. MCP gives the agent a structured way to invoke external tools. The server exposes four composite operations:
batch_searchruns as many as 20 text, regular-expression, glob, and read-only Git queries concurrently. It supports cross-repository searches, uses ripgrep when available, and falls back to Node.js.apply_editsapplies non-contiguous changes across one or more files as a single transaction. It validates all edits in memory before writing, rejects overlapping changes, and leaves every file untouched if validation fails. It also preserves CRLF line endings, permissions, and symbolic links.read_slicesextracts symbol outlines and reads selected line ranges under a byte budget. Supported languages include TypeScript, Python, Go, Rust, Java, C-family languages, and Swift.run_checksexecutes builds, type checks, linters, and tests concurrently. Each command receives a timeout, and failed runs return focused error output.
A SessionStart hook also injects a repository snapshot containing the current branch, Git status, recent commits, a two-level directory tree, and detected scripts. The snapshot is capped at 1.5 KB and reportedly takes 35 to 50 milliseconds to generate, reducing the discovery work that often occupies the opening turns.
Install without a build step
The plugin requires Node.js 20 or newer and ships as prebuilt, zero-dependency ECMAScript modules. The default installer places it in ~/.gemini/config/plugins/agy-fast:
curl -fsSL https://raw.githubusercontent.com/INK-Q/agy-fast/main/install.sh | sh
The project also provides a PowerShell installer for Windows and a repository-scoped mode for teams that want the plugin enabled only within one project. A background updater checks GitHub releases every 12 hours and runs an MCP smoke test before replacing the installed version.
Safety boundaries remain visible
The plugin uses documented Antigravity extension interfaces and leaves the client binaries, authentication, approval flow, and safety checks unchanged. It registers no PreToolUse or PostToolUse hooks. If the startup snapshot fails, Antigravity continues loading without it.
The distributed ESM bundles are unminified, allowing teams to inspect the installed code. That review still matters because the plugin can search repositories, modify files, and execute project checks with the user’s existing permissions. Automatic updates also extend the trust boundary to the project’s GitHub release process.
Measure the gain on real work
The repository includes benchmark.mjs for analyzing local transcripts and comparing sessions before and after installation. A useful evaluation should hold the repository, task, model, and Antigravity settings constant, then compare elapsed time, LLM turns, token use, upload volume, tool failures, and the resulting diff.
The published evidence currently comes from the plugin’s author and has not been independently replicated. The sample covers 55 sessions, but the reported aggregate figures do not establish the same improvement for every language, repository size, or task type. Teams should also verify that batched edits produce the expected diffs and that concurrent checks behave correctly in projects with shared build state.
agy-fast is best suited to long, tool-heavy Antigravity sessions, especially multi-file refactors that trigger repeated searches, reads, edits, and validation commands. Short tasks and workflows that already minimize tool calls may see smaller gains. Local A/B testing provides the clearest basis for deciding whether the reduced round trips justify adding a third-party MCP server and updater to the development environment.