The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
---
title: "Antigravity CLI"
description: "Beacon support details for Antigravity CLI endpoint telemetry"
---
## Runtime overview
Beacon supports Antigravity CLI through native hook payloads sent to `beacon-hooks`. Antigravity support was added in the endpoint agent in `v0.0.29`.
## Prerequisites
Before enabling Antigravity hooks, make sure:
- Antigravity CLI is installed as `agy`, `antigravity`, or `antigravity-cli`, or an Antigravity hook config directory exists.
- `beacon endpoint install` has run so shared endpoint config and runtime log paths exist.
- Beacon hooks are installed, either by `beacon endpoint install` when it detects Antigravity (or with `--harness antigravity`) or with `beacon endpoint hooks install --harness antigravity`.
- For project-level collection, install hooks from the target project with `--level project`.
- Antigravity is restarted after hook install or removal so new sessions load the updated hook configuration.
## Collection path
Beacon collects Antigravity CLI two ways:
- **Hooks.** Antigravity invokes Beacon's hook adapter from Antigravity hook configuration. The adapter writes normalized endpoint events to the configured runtime JSONL log as they happen.
- **Session sync.** `beacon endpoint antigravity sync` (alias `antigravity-cli`) reads the conversations Antigravity keeps under `~/.gemini/antigravity-cli/brain/<conversationId>/.system_generated/logs/transcript_full.jsonl`, with each conversation's working directory from `~/.gemini/antigravity-cli/conversation_summaries.db`, and writes events marked `harness.collection_method=poll` under the same session id the hooks use. It records prompts, agent messages and reasoning, tool calls, commands with exit code and output, file reads and edits, and per-response token usage. The install-time backfill and the scheduled session sync run it too, so conversations from before the hooks were installed are recorded.
For a conversation the hooks already recorded, sync writes only what the hooks cannot see: agent messages, reasoning, and token usage from the point the hooks started reporting it, plus any prompt the hooks did not record. Prompts are matched to the hooks' by content hash, so the later prompts of a conversation recorded by v1.3.60 hooks, or a turn whose `PreInvocation` hook failed, are still backfilled; a prompt identical to one the hooks recorded in the same conversation counts as recorded. Prompts and tool events from before the hooks started are backfilled too. Sync runs after the fact, so it cannot hold, allow, or deny a tool call.
```bash title="Preview, run, and inspect Antigravity session sync"
beacon endpoint antigravity sync --print # map conversations without writing or moving the cursor
beacon endpoint antigravity sync # write new events to the runtime log
beacon endpoint antigravity status # conversations found and collected
```
Use `--brain-dir` to read another brain directory.
## Discovery and status
Beacon detects Antigravity through the `agy`, `antigravity`, or `antigravity-cli` executable, `~/.gemini/config`, or `./.agents`, then checks Beacon hook configuration.
Use `beacon endpoint hooks status --harness antigravity` to inspect Antigravity hook status.
## Install or configuration support
`beacon endpoint install` prepares shared endpoint config and runtime log paths, and installs the user-level Antigravity hooks when it detects Antigravity (or when run with `--harness antigravity`). To install, refresh, or manage the hooks on their own, run:
```bash title="Install runtime hooks"
beacon endpoint hooks install --harness antigravity
```
For project-level hooks, run:
```bash title="Install project-level hooks"
beacon endpoint hooks install --harness antigravity --level project
```
Beacon writes user-level Antigravity hooks to `~/.gemini/config/hooks.json` and project-level hooks to `./.agents/hooks.json`. It manages a `beacon-endpoint` hook block and preserves unrelated hook blocks.
## Telemetry coverage
| Area | Support |
|------|---------|
| Prompt telemetry | Every prompt, recorded by `PreInvocation`. Antigravity runs that hook before each model call and counts the calls from 0 again at the start of every turn, so Beacon records the turn's prompt (`lastUserInput`) on call 0 only, resumed conversations included |
| Session, command, tool, and file telemetry | Uses `SessionStart`, `PreToolUse`, `PostToolUse`, and `Stop`, where Antigravity emits those hooks and exposes the corresponding payloads. `run_command` is a command; `view_file`, `list_dir`, `grep_search`, and `find_by_name` are file reads; `write_to_file`, `replace_file_content`, and `multi_replace_file_content` are file edits with the `TargetFile` path. Antigravity runs `SessionStart` only for a new conversation, not when one is resumed. `Stop` records the end of each turn |
| Agent messages, reasoning, and token usage | From session sync only: Antigravity's hook payloads carry no response text, reasoning, or token counts. Token usage records input, output, and cache-read tokens per model response |
| History from before the hooks | From session sync, including the install-time backfill |
| Approvals | Not recorded or synthesized. The `PreToolUse` hook writes nothing to stdout, so Antigravity's own permission settings decide every call: Antigravity reads a hook's `allow` as approving the call automatically and an object without a decision as a deny. A deny from a `BEACON_POLICY_PROVIDER` policy provider still returns `{"decision":"deny"}` |
| Local JSONL and dashboard | Supported |
| MDM deployment | Supported for the endpoint agent. Antigravity hooks are installed separately in the logged-in user's context or project context |
Hooks written by Beacon v1.3.60 have no `PreInvocation` handler. For them, the first prompt of a session is recovered from the transcript on its first tool call, and later prompts are not recorded; package repair, or rerunning `beacon endpoint hooks install --harness antigravity` at the same level, adds the handler. Beacon remembers that a session's first prompt was recorded for 14 days, so neither path records it again when a conversation is resumed within that time.
## Deployment notes
Restart Antigravity after installing or removing hooks so new sessions pick up the updated hook configuration.
Earlier Beacon releases wrote the Antigravity hooks with grouped lifecycle handlers, which Antigravity does not run. `beacon endpoint hooks status --harness antigravity` reports such hooks as `installed=true needs_reinstall=true`, discovery and `beacon endpoint doctor` report Antigravity telemetry as disabled with a warning, and the dashboard shows the hooks as needing a reinstall. Package repair rewrites older managed user-level hooks. For project-level or manual installs, rerun `beacon endpoint hooks install --harness antigravity` at the same level to rewrite the managed block.
If Antigravity telemetry is missing, check the selected hook level, confirm the hook file contains commands with `--platform antigravity`, and run `beacon endpoint hooks status --harness antigravity`.
## Related
<Columns cols={2}>
<Card title="Supported agent harnesses" icon="list-check" href="/runtimes">
Return to the runtime support overview.
</Card>
<Card title="Hooks" icon="plug" href="/cli/hooks">
Install, inspect, and uninstall runtime hook integrations.
</Card>
</Columns>