Skip to content

feat(agents): add Antigravity CLI (agy) as built-in agent#155

Open
ASRagab wants to merge 1 commit into
johannesjo:mainfrom
ASRagab:feat/antigravity-support
Open

feat(agents): add Antigravity CLI (agy) as built-in agent#155
ASRagab wants to merge 1 commit into
johannesjo:mainfrom
ASRagab:feat/antigravity-support

Conversation

@ASRagab
Copy link
Copy Markdown
Contributor

@ASRagab ASRagab commented May 29, 2026

Add Antigravity CLI (agy) support

Google is migrating Gemini CLI to the new Antigravity CLI (agy). On June 18, 2026 Gemini CLI stops serving Google AI Pro/Ultra and free Code Assist users; it remains only on paid/enterprise API keys. This adds Antigravity as a first-class agent so users have a working migration path — without removing Gemini CLI, which paid/enterprise users still rely on. Fully additive, no breaking change.

What changed

  • Agent registry — new antigravity entry in DEFAULT_AGENTS (electron/ipc/agents.ts): command: agy, resume -c, skip-permissions --dangerously-skip-permissions, prompt_ready_delay_ms: 1000. Launched interactively like every other agent (prompt typed into the TUI, not passed as -p).
  • Docker (forward-compatible scaffolding only)~/.gemini/antigravity-cli added to the shared-auth mount map (AGENT_CONFIG_DIRS) for settings/plugins; agy installed in the bundled image via the official installer (Go binary, not npm). See the auth note below — Antigravity is native-only.
  • MCP guardagy excluded from both --mcp-config emission paths (legacyMcpConfigArgs in src/lib/agent-args.ts and buildMcpLaunchArgs in electron/mcp/agent-args.ts), the same way Codex is excluded. agy has no --mcp-config flag; passing it would break launch. Scope consequence (intentional): because buildMcpLaunchArgs returns nothing for agy, Antigravity tasks get no parallel-code MCP coordinator wiring — i.e. no spawning of parallel-code subagents from inside an agy session. Safe default for this change; wiring agy into the coordinator (it configures MCP via plugins/config, not a CLI flag) is a follow-up if wanted.
  • Gemini CLI untouched.

⚠️ Antigravity is native-only (no Docker isolation)

  • Native (non-Docker) tasks work fully via the normal interactive sign-in — credentials cached in the host OS keyring (Keychain/libsecret).
  • Docker-isolated Antigravity cannot authenticate. Login is keyring-only OAuth; a barebones agent container has no secret-service daemon to reach the keyring, and agy has no API-key environment fallback (an earlier ANTIGRAVITY_API_KEY assumption was unverified and is false — agy still enters OAuth with it set). Run Antigravity as a native task.
  • The Docker bits are kept as additive scaffolding: the bundled image ships the agy binary and ~/.gemini/antigravity-cli (settings/plugins) is mounted when "Share agent auth" is enabled, so a future file-based / API-key auth path drops in cleanly.

Corrections from Codex review

  • Mount path fixed: agy writes app data to ~/.gemini/antigravity-cli, not ~/.config/antigravity (verified against the installed binary).
  • Removed the unsupported ANTIGRAVITY_API_KEY Docker auth claim (binary does not consume it).
  • data/ runtime state (memory/sidecar state_store.db / stream_store) gitignored — it is generated local state, not source.

Verification

  • tsc --noEmit clean; full test suite green (111 tests across persistence, agents, both agent-args, pty). pty.test.ts config-dir-mount table extended with the corrected agy path.
  • New unit tests assert no --mcp-config is emitted for agy on both arg paths.
  • Manual native smoke test (selector availability, prompt delivery, -c resume, skip-permissions) and a full docker build are pending hardware/Docker.

🤖 Generated with Claude Code

Google is migrating Gemini CLI to Antigravity CLI (agy); Gemini CLI stops
serving Pro/free users on 2026-06-18. Add agy as a first-class agent so users
have a migration path, without removing Gemini CLI.

- Register antigravity in DEFAULT_AGENTS: interactive launch, resume -c,
  skip-permissions --dangerously-skip-permissions, 1s prompt-ready delay
- Exclude agy from both --mcp-config emission paths (legacyMcpConfigArgs,
  buildMcpLaunchArgs); agy has no such flag. Consequence: no coordinator MCP
  wiring for agy (no in-agy subagent spawning) — intentional, deferrable
- Docker: mount ~/.gemini/antigravity-cli (settings/plugins); install agy in
  the bundled image via the official installer (--dir /usr/local/bin)
- Antigravity is native-only: login is keyring-only OAuth, unreachable from a
  container, and agy has no API-key env fallback. Documented in README + spec
- gitignore /data/ (memory/sidecar runtime state, not source)
- OpenSpec change add-antigravity-agent (proposal/design/spec/tasks)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant