Skip to content

Add Antigravity as a first-class provider and core harness - #167

Open
sakoh wants to merge 3 commits into
davidondrej:mainfrom
sakoh:antigravity-provider
Open

sakoh wants to merge 3 commits into
davidondrej:mainfrom
sakoh:antigravity-provider

Conversation

@sakoh

@sakoh sakoh commented Nov 16, 2026 •

Copy link
Copy Markdown

Refs #151. Replaces #155: the same three commits, now rebased onto the v159 release so they merge cleanly. #153 before it added Antigravity as one of the generic ACP agents.

What does this change?

Google's Antigravity CLI (agy) becomes a provider of its own, next to Codex and Claude Code, and a harness in the core. It is three commits that each build on their own, so you can take them separately.

1. A first-class Local provider (provider-antigravity, id antigravity)

  • Always listed, bundled after Claude Code. Threads run on the SDK's ACP bridge with a new Antigravity dialect in provider-bridge-acp.
  • Models and thinking levels come from the CLI's own ACP session options.
  • Google sign-in without a terminal: the plugin's host runs agy acp --login, hands the app the link, and passes the pasted code back to the CLI.
  • Connect and Disconnect in Settings → Agents → Harness, a row in the composer's "Connect agents" menu, a sign-in card when a thread fails signed out, and its own tab.
  • Accounts page: the login in use with its plan's limits. The CLI keeps one Google login, so there is nothing to add or switch.
  • Usage card: a five-hour and a weekly limit for each of the plan's model groups, read with the CLI's read-only /usage command.

2. First-run setup

  • A third card after Claude Code and Codex. A signed-in Antigravity counts as a connected agent and can be the default and the first agent.
  • With "Use my own Core", the card follows the same rule as the Claude Code card: it needs an account or your own Core. This is the one change from Add Antigravity as a first-class provider and core harness #155 beyond resolving conflicts.

3. The core harness (harness: "antigravity")

  • Runs agy acp over the shared ACP protocol, like Kimi and Droid. Core discovers agy once ~/.gemini exists.
  • The app offers Antigravity for Cloud threads when the Cloud machine reports the harness.

Replaces the generic acp-antigravity agent

v156 added Antigravity as a generic ACP agent, acp-antigravity. With this PR the app would list Antigravity twice, so this PR removes the generic agent and keeps one provider, antigravity:

  • The acp-antigravity entry leaves provider-acp's known-agents.ts, with its icon, its antigravity entry in SIGN_IN_DIALECTS, and its mentions in the plugin's README and skill.
  • Its ANTIGRAVITY_ACP_MAINTENANCE in provider-maintenance.ts (sign-in read through agy models, no usage) is replaced by this PR's antigravity-maintenance.ts, which reads sign-in through ACP session/list and reads usage through /usage. Its minimal ANTIGRAVITY_ACP_DIALECT is replaced by this PR's dialect, which adds command results, session/resume and modelDiscoveryRequiresLogin.
  • The Mac signed-in-agents check in mac-agents.ts is kept as is but reports antigravity instead of acp-antigravity, the id that CLOUD_HARNESSES maps to the core harness.
  • The provider-list tests drop acp-antigravity.
  • The new plugin reads the same skill folders as the removed entry (~/.gemini/config/skills, ~/.gemini/antigravity-cli/skills, ~/.gemini/skills and the project's .agents/skills).

Threads already saved with acp-antigravity are not migrated to antigravity.

The Agent Zero harness, which also landed upstream in the meantime, stays alongside Antigravity in every list that has both: the core's Kind, room-cli help, API docs and CLOUD_HARNESSES.

Design notes

  • Antigravity keeps its Google login in the system keyring, so sign-in state comes from the CLI: ACP session/list succeeds when signed in and returns ACP's auth-required error when signed out. It creates nothing.
  • Print mode (agy -p) is never run signed out. Signed out, it opens a browser and waits a minute for a login.
  • The in-app sign-in sets SSH_CONNECTION for the login child. The CLI then prints its link instead of opening a browser on a machine the user may not be at. This is observed behaviour of CLI 1.5.8, not documented.
  • AcpMaintenanceDialect.readAccount and readUsage now receive the resolved executable. Cursor ignores it.
  • A new dialect flag, modelDiscoveryRequiresLogin, lets ACP-native model discovery fail as auth required. Other agents keep the placeholder model.

What hosted Cloud still needs from you

  • agy in the sandbox image.
  • A way to bring a Google login to a sandbox. On a Mac it lives in the Keychain, not in a file, so the usual login copy does not apply as is.
  • Until then the Harness page shows "Mac only" for hosted accounts, and a signed-out start on a self-hosted core fails with a message that names agy acp --login.

Yours to decide

  • icons/antigravity.svg is a glyph I drew, not Google's mark.
  • The setup card (commit 2) and the antigravity setup-telemetry value.
  • I left CHANGELOG.md alone, since entries carry your release number.
  • The Accounts row says "Google account", not an email: the CLI does not report which account is signed in.

Screenshots

From the dev desktop app on this head (d23aa73f, rebased onto v160), with agy 1.5.13 signed in. Emails are hidden with the Accounts page's Privacy mode.

First-run setup. Antigravity is a third card after Claude Code and Codex. Signed in, it counts as a connected agent and becomes the default.

An Antigravity thread, run on the ACP bridge with the CLI's default model:

Model picker. Models come from the CLI's own ACP session options:

Settings → Agents → Harness. Antigravity is listed once. The generic acp-antigravity entry is gone.

Settings → Agents → Antigravity. The Google sign-in, with Sign out:

Accounts. The login in use, with a five-hour and a weekly limit for each of the plan's model groups:

Usage card:

How did you test it?

On this head, after the rebase onto v159

  • Core: cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo test --locked --all-targets, all passing.
  • turbo run typecheck for app, server, provider-bridge-acp and every plugin (49 tasks).
  • Tests pass for provider-bridge-acp (381), provider-acp (86), provider-antigravity (18), accounts (25), provider-usage (14), and the app's "Connect agents" and settings sidebar tests.
  • The server test files that enumerate providers pass, apart from failures that also happen on v159 without this PR.
  • The lockfile was regenerated, because v159 pins zod 4.6.7.

On this head, after the earlier rebase onto v155

  • pnpm install --frozen-lockfile, then turbo run build typecheck for app, server and desktop (56 tasks).
  • Typecheck and tests for provider-bridge-acp, provider-antigravity, accounts and provider-usage.
  • The five server test files that enumerate providers (99 tests) and the app's settings sidebar test.

On the head of #155, before the rebase

  • The @cloudroom/config tests (130 pass). Commit 1 passed the build and typecheck for app, server and desktop alone; commit 2 passed typecheck for app and server.
  • Core: cargo build --locked, node --test integrations/bb/client.test.ts (25 pass) and core_fixture.py, pi_http.py, workspaces.py.
  • provider-acp tests (86 pass) and the app's "Connect agents" tests.
  • Live, on macOS with Antigravity CLI 1.5.8 and a Google AI Ultra plan:
    • Local threads in the desktop app: model picker, a turn with a file edit and a shell command, the Harness row, the usage card, the Accounts row, and the first-run setup card.
    • Signed-out behaviour with a throwaway HOME: model discovery fails as authRequired, health is unauthenticated, and usage answers in about 0.1 s without starting print mode.
    • Cloud threads: the patched core on the same Mac in unprotected test mode, with the app connected through "Connect your own Core". A thread edited a file and ran a command, a follow-up kept its context, and a session resumed after a core restart.

Not tested

  • Anything live after either rebase, including the setup card with "Use my own Core" and the removal of acp-antigravity.

  • A real Google sign-in or sign-out through the new buttons. The flow is tested against a scripted stand-in for agy, and against the real CLI up to a refused code.

  • The core on Linux, and anything on Windows.

  • The Linux-only CI steps (storage_e2e.py, previews_ssh.py, core_e2e.py).

  • preview_client.py, install.py and sync_e2e.py failed on my Mac (Python 3.9, macOS paths) in files this PR does not touch. I did not run them on the base commit.

  • session::state::tests::an_arriving_chat_keeps_its_end_and_older_arrivals_start_at_zero failed once in a full cargo test run before the rebase and passed on every re-run. It passed in the one run after the rebase.

  • I built and checked the change (see CONTRIBUTING.md).

  • No credentials, personal data, or build output are included.

🤖 Generated with Claude Code

Sako Hartounian and others added 3 commits November 20, 2026 11:38
Google's Antigravity CLI (`agy`) speaks ACP. It becomes a provider of its
own, `antigravity`, in a new `provider-antigravity` plugin bundled next to
Codex and Claude Code and always listed (davidondrej#151). Its threads run on the SDK's
ACP bridge with a new Antigravity dialect.

Bridge (`provider-bridge-acp`):
- The dialect reads the CLI's sign-in state with ACP `session/list`, which
  creates nothing, and its plan usage with the read-only `/usage` command.
  Print mode is never run signed out: it opens a browser and waits a minute.
- A signed-out CLI fails model discovery as auth required, so the picker
  offers sign-in instead of a placeholder model. Other agents are unchanged.
- Command output drops the CLI's report header; resume uses `session/resume`.
- Maintenance dialects now receive the resolved executable.

Plugin and app:
- Google sign-in without a terminal: the plugin's host runs
  `agy acp --login`, hands the app the link, and passes the pasted code back.
  It runs as an SSH session would, so the CLI prints the link instead of
  opening a browser on a machine the user may not be at.
- Connect and Disconnect in Settings -> Agents -> Harness, a row in the
  composer's "Connect agents" menu, a sign-in card when a thread fails
  signed out, and its own tab with the Google account.
- Accounts page: the login in use with its plan's limits. The CLI keeps one
  Google login, so there is nothing to add or switch.
- Usage card: a five-hour and a weekly limit per model group, and sign-in.
- Disconnect signs the CLI out through ACP `logout`. Antigravity has no
  Cloud login, so nothing else is removed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124vNVUEawpdokScrue6LGz
The agent step shows Antigravity as a third card after Claude Code and
Codex: "Uses your Google AI plan", with Google sign-in on this computer
(davidondrej#151). A signed-in Antigravity counts as a connected agent, becomes the
default when it is the only one, and can be the first agent setup starts.

- It needs a Cloudroom login like the other cards, but not a ready Cloud:
  the sign-in is local.
- The first agent only starts in Cloud for an agent Cloud can run.
- Setup telemetry accepts `antigravity` as a detail.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124vNVUEawpdokScrue6LGz
`harness: "antigravity"` runs Google's `agy acp` over the shared ACP protocol,
like Kimi and Droid (davidondrej#151). Core discovers `agy` in the agent account once
`~/.gemini` exists.

- Sessions stay in Antigravity's default mode and the ACP protocol approves
  each request, so the agent has full access.
- The model and `thought_level` are session options; a level the model does
  not offer is skipped. Levels: low, medium, high, xhigh.
- Resume uses `session/resume` and checks the conversation's database in
  `~/.gemini/antigravity-cli/conversations`.
- The app offers Antigravity for Cloud threads when the Cloud machine reports
  the harness, and Settings shows that instead of "Mac only".

A signed-out start fails with a message that names `agy acp --login`. Hosted
sandboxes do not ship the CLI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124vNVUEawpdokScrue6LGz
@sakoh
sakoh force-pushed the antigravity-provider branch from 7d55952 to d23aa73 Compare November 20, 2026 19:39
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