One workstationAntigravity

Antigravity CLI Setup

AgentKeeper integrates with Antigravity CLI and Antigravity Desktop through the shared Antigravity hook system. There is no Antigravity browser-extension component in this integration.

AgentKeeper integrates with Antigravity CLI and Antigravity Desktop through the shared Antigravity hook system. There is no Antigravity browser-extension component in this integration.

The public installer wires the Antigravity events AgentKeeper can observe and govern: PreToolUse, PostToolUse, PreInvocation, PostInvocation, and Stop. Pre-tool events can be allowed, denied, or sent back to Antigravity as an approval request. Invocation and stop events are used for audit, setup health, and policy context.

Use Policy outcomes for the shared Monitor, Warn, and Block model; this page lists what the Antigravity surface can actually support.

What gets monitored

SurfaceOutcome support
Shell commands (run_command)Block, ask for approval, Warn, or Monitor before execution
File reads and search (view_file, list_dir, grep_search)Audit only, Warn, or Block when Antigravity emits the pre-tool event
File writes (write_to_file, replace_file_content, multi_replace_file_content)Block or Warn before execution
Web and URL tools (search_web, read_url_content)Domain and URL policy when emitted by the IDE
MCP callsServer and tool policy when Antigravity includes MCP server/tool identity
Subagents, schedules, tasks, artifactsTool-name and Policy Profile coverage through Runtime Shield
Invocation lifecycleContext injection, audit correlation, and stop-loop warnings

Installation

Get your API key from Settings > Access > API keys, then run the public installer:

export AGENTKEEPER_API_URL="https://www.agentkeeper.dev"
export AGENTKEEPER_API_KEY="ak_live_..."
bash <(curl -fsSL "$AGENTKEEPER_API_URL/install-hooks.sh") --ide antigravity

The installer stores the API key in ~/.agentkeeper/config, installs ~/.agentkeeper/hooks/antigravity/agentkeeper-hook.sh, and updates ~/.gemini/config/hooks.json.

Generated config

{
  "agentkeeper": {
    "enabled": true,
    "PreToolUse": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "bash "/Users/YOU/.agentkeeper/hooks/antigravity/agentkeeper-hook.sh"",
            "timeout": 5
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "bash "/Users/YOU/.agentkeeper/hooks/antigravity/agentkeeper-hook.sh"",
            "timeout": 5
          }
        ]
      }
    ],
    "PreInvocation": [
      {
        "type": "command",
        "command": "bash "/Users/YOU/.agentkeeper/hooks/antigravity/agentkeeper-hook.sh"",
        "timeout": 5
      }
    ],
    "PostInvocation": [
      {
        "type": "command",
        "command": "bash "/Users/YOU/.agentkeeper/hooks/antigravity/agentkeeper-hook.sh"",
        "timeout": 5
      }
    ],
    "Stop": [
      {
        "type": "command",
        "command": "bash "/Users/YOU/.agentkeeper/hooks/antigravity/agentkeeper-hook.sh"",
        "timeout": 5
      }
    ]
  }
}

For MDM rollout, run the installer with AGENTKEEPER_API_KEY and --ide antigravity as the target developer. On macOS, deploy the hosted script at /mdm/intune/agentkeeper-antigravity-hooks.sh through Intune Platform Scripts, Jamf, or Iru/Kandji. On Windows, deploy /mdm/intune/agentkeeper-windows-antigravity-hooks.ps1.

Tool name mapping

Antigravity tool nameAgentKeeper canonical name
run_commandBash
view_file, read_fileRead
write_to_fileWrite
replace_file_contentEdit
multi_replace_file_contentMultiEdit
list_dir, find_by_nameGlob
grep_searchGrep
search_webWebSearch
read_url_contentWebFetch
invoke_subagent, define_subagent, manage_subagentsAgent
manage_task, scheduleAgent
MCP server/tool payloadsMCP skill policy

Verify coverage

  1. Restart Antigravity CLI or Antigravity Desktop after installing hooks.
  2. Ask Antigravity CLI to run a harmless command such as pwd.
  3. Check Activity for an Antigravity event.
  4. Trigger a blocked command, write path, URL, MCP tool, or Policy Profile simulation and confirm the expected Monitor, Warn, or Block result.
  5. Check Team → Policies → Access Control to confirm Antigravity can be enabled, restricted to groups, or disabled.
  6. Check Workstations and Setup health for a healthy Antigravity source.

Notes

Antigravity hooks are fail-open by design. If AgentKeeper is unreachable, the adapter returns allow so developers are not blocked by a local network or dashboard outage. Runtime Shield only blocks surfaces Antigravity exposes through hooks; no browser capture is claimed by this integration.

Warn-mode matches are recorded in AgentKeeper Activity and return an AgentKeeper Warning reason while allowing the tool call to continue. Antigravity CLI 1.1.5 may not render the reason for an allow decision in the terminal.

For cross-IDE claims, see IDE runtime parity.