Antigravity CLI integration

August 10, 2026 ยท View on GitHub

Lint-AI supports the Antigravity CLI (agy) through its MCP and lifecycle-hook integration.

Build and install the integration:

cargo install --path . --features agy
lint-ai --agy-install /path/to/project

The installer writes the MCP server to ~/.gemini/config/mcp_config.json and the hook commands to ~/.gemini/config/hooks.json. Explicit files can be supplied with --agy-config and --agy-settings.

AGY receives the same search, info, record_session, enable_lint_ai, disable_lint_ai, and lint_ai_status MCP tools as the other integrations. AGY sessions are recorded under .lint-ai/agy-sessions/ and use .lint-ai/agy-memory/ for provider-specific memory hooks.

Supported hooks

The installer registers the following AGY lifecycle hooks:

HookPurposeLint-AI behavior
PreToolUseA tool call is about to runRecords the event and may inject relevant memory steps.
PostToolUseA tool call has completedRecords the event and result.
PreInvocationAn agent invocation is about to runRecords the event and may inject relevant memory steps.
PostInvocationAn agent invocation has completedRecords the event.
StopAGY is stoppingRecords the terminal event.

Hook input

Lint-AI accepts a JSON object on standard input. The integration recognizes these fields:

{
  "session_id": "agy-session-id",
  "cwd": "/path/to/project",
  "hook_event_name": "BeforeTool",
  "prompt": "optional user or agent prompt",
  "tool_name": "optional tool name",
  "tool_input": {},
  "tool_response": {}
}

session_id, cwd, and hook_event_name identify the event. The prompt and tool fields are optional; additional AGY fields are preserved in the recorded event payload.

Hook output

The hook writes one JSON object to standard output. When relevant memory is found, it returns an additionalContext value under hookSpecificOutput:

{
  "hookSpecificOutput": {
    "hookEventName": "BeforeAgent",
    "additionalContext": "Relevant Lint-AI memory:\n..."
  }
}

SessionStart can also return a systemMessage confirming that hooks are active. Other events return an empty JSON object when no context is available or when Lint-AI is disabled.

Recording and memory behavior

  • Every supported hook is recorded when session recording is enabled.
  • Enabling Lint-AI also enables recording by default.
  • record_session can start or stop recording without ending the AGY session.
  • Disabling Lint-AI stops memory injection but does not erase existing sessions.
  • Hook failures are fail-open and do not block AGY tool calls or model turns.
  • Hook working directories must remain inside the project root configured by --agy-install; outside paths are rejected.

The adapter is intentionally fail-open: an unavailable Lint-AI hook does not interrupt an AGY session. AGY authentication and model usage remain managed by AGY itself.