Antigravity Plugin¶
The Antigravity plugin (plugins/antigravity) hooks Google Antigravity CLI (agy) sessions.
It writes to the same local SQLite store (~/.aka/data/aka.db) as every other AKA surface, so
findings from an Antigravity session show up in aka findings, the dashboard, and the other
plugins' read commands.
This host is the narrowest of the three
Antigravity's hook contract cannot do several things Claude Code's can — prompts cannot be blocked or redacted, tool results are not scanned live, and hooks only fire in the CLI, not the IDE. Read Known limitations before relying on it for enforcement.
Installing¶
Antigravity has no plugin marketplace: agy plugin install takes a local directory path
rather than a <plugin>@<marketplace> ref. So the install is a fetch-then-point:
npm pack @akasecurity/ai-tc-antigravity
tar -xzf akasecurity-ai-tc-antigravity-*.tgz
agy plugin install ./package
Then scaffold the local store if you haven't already:
aka plugins install antigravity prints exactly these steps rather than running them — there are
no marketplace coordinates for the CLI to drive, and aka update skips the plugin for the same
reason. Re-run the npm pack sequence to move to a newer version.
node must be on your PATH; the hooks are Node scripts that agy spawns.
Hooks¶
Antigravity exposes five events — PreInvocation, PostInvocation, PreToolUse, PostToolUse
and Stop. There is no SessionStart and no UserPromptSubmit, so the adapter maps what it
can:
| Hook | Matcher | What AKA does |
|---|---|---|
PreInvocation |
all | stands in for SessionStart — inventory pass on the first invocation of a conversation (claimed internally, so later invocations no-op); injects no steps |
PreToolUse |
.* |
deny or warn on shell commands and file writes |
PostToolUse |
.* |
records the tool call (the payload carries no tool output to scan) |
Stop |
end of loop | triggers the background reconcile worker; never emits {"decision":"continue"} |
Antigravity is a fail-closed host: a hook that prints nothing is treated as a deny. AKA's
hooks therefore always print an explicit allow ({}) — on success, on bad input, on a crash, and
on their own 8-second watchdog.
Skills¶
Like Codex, the read surface ships as skills (aka-setup, aka-findings, aka-health,
aka-recommend, aka-audit, aka-scan, aka-tokens, aka-detections, aka-exceptions,
aka-dashboard) rather than /aka:* slash commands. They load in the Antigravity IDE as well
as the CLI, and read the same local store either way.
Known limitations¶
These are contract limits of the host, not bugs — none of them are worked around, and none should be described as covered:
- The IDE does not run plugin hooks. Skills and rules load in the Antigravity IDE and appear
under Customizations, but
hooks.jsonentries appear never to fire there — hooks execute in theagyCLI. (Google documents this neither way; treat it as observed behaviour.) So live detection and blocking apply to CLI sessions only. IDE work is covered after the fact byaka scanand the dashboard. - Prompts cannot be blocked or redacted. No event on this host hands a hook the user's message
before the model sees it —
PreInvocationcarriesinvocationNum,initialNumStepsand the common fields, but no prompt text, and its output can only add steps. A secret pasted into a prompt reaches the model; AKA records it (so it appears in findings and the dashboard) but cannot stop it. This is the single biggest difference from the Claude Code plugin. - A
redactpolicy cannot mask; what happens instead is a setting.PreToolUse's output is{ decision, reason, permissionOverrides }with no field for modified arguments, so a redact follows theredactFallbacksetting in~/.aka/settings/settings.json. It ships aswarn: the tool call runs with the value unmasked, and the warning appears only in findings and the dashboard. Set it toblockto deny the call and explain what to remove. This applies to file writes as well as shell commands. - A
warnis recorded but not shown inline.PreToolUsehas no message channel (itsreasonaccompanies a deny), so warns are ledgered silently — see them viaaka-findingsor the dashboard. - Tool results are not scanned live. The
PostToolUsepayload does not include the tool's output at all, so secrets in command output are caught after the fact, not before the model sees them. - Token usage produces nothing. Antigravity's transcript carries no token, model, or cost field, so usage reporting stays empty for Antigravity sessions.
multi_replace_file_contentis not scanned. Its arguments nest edits in an undocumented container, so AKA does not guess at the shape.write_to_file,replace_file_content, andrun_commandare scanned.- A stuck hook denies the call, and it won't look like AKA. AKA's hooks always print an explicit allow, including on their own 8-second watchdog, but a hook blocked by a heavily contended store can be killed by Antigravity's 10-second timeout first. You'll see "Tool call denied by <hook>" with no AKA reason; retrying usually succeeds.
- If hooks never fire, the likely cause is
${PLUGIN_ROOT}, which Antigravity doesn't document. Each command falls back to~/.gemini/config/plugins/aka-antigravity; if the plugin is installed elsewhere, edithooks.jsonand replace${PLUGIN_ROOT:-…}with the absolute path. - On
agyolder than 1.1.10, theStophook never runs, and/hooksdidn't list plugin-bundled hooks until 1.2.3. Capture still happens; the tail of a turn is reconciled on the next turn instead. - The reversible secret vault is not wired for Antigravity sessions — everything AKA redacts here is one-way.
- Historical scanning reads transcripts, not tool arguments. Past prompts and model messages
are found by the backfill; a secret sitting in a past
run_commandline orwrite_to_filebody is not (the livePreToolUsehook does scan those, so this gap is about past sessions).
Onboarding and the model-judge egress¶
aka-setup runs the same calibration wizard with the same two consents, but this host's egress
differs from Claude Code's and Codex's in these named ways, all of which the wizard states before
asking for consent:
- The
agyCLI documents no ephemeral mode. Every run is written to the conversation store under~/.gemini/antigravity/brain/— raw values and all — so AKA deletes the judge's own conversation itself when the run ends. That deletion is best-effort: a process killed between the write and the cleanup leaves the conversation on disk. - The judge needs an
agywith the streaming stdin interface. It runsagy --input-format stream-json --output-format stream-jsonand writes the prompt to standard input rather than the command line. An olderagythat rejects those flags fails the step withagy judge subprocess failed; calibration questions, the historical read and local detection are unaffected. - On Windows, a stalled model call may not be bounded. Where
agyis theagy.cmdshim, the 180-second limit applies tocmd.exe, not theagyprocess it starts. - Deleting the conversation is not network isolation. It is a local-write cleanup; it cannot recall what was already sent.
Declining the model-judge consent leaves AKA on the conservative severity floor. See Why the setup scan sends findings to the model.
Uninstalling¶
Remove the plugin with agy's own plugin manager, then restart the CLI. See
Uninstalling for what remains on disk afterwards.