{"slug": "how-to-run-google-antigravity-inside-openbot-safely", "title": "How to run Google Antigravity inside OpenBot safely", "summary": "OpenBot by Nightly Labs connects to Google Antigravity by spawning the official, unmodified Antigravity CLI over the Agent Client Protocol (ACP) rather than extracting OAuth tokens, keeping the setup within Google's December 2026 rewrite of clause 6 of the Antigravity Terms of Service, according to a guide by Flavio. The guide says OpenBot's Gemini provider disables account pooling, avoids Google's internal Code Assist endpoints (cloudcode-pa, daily-cloudcode-pa, v1internal), and on CLI 1.5.16 and newer checks remaining quota via the headless command `agy -p /usage --output-format json --print-timeout 20s`. The setup targets macOS 13 or newer on Apple Silicon arm64 or Intel x64, and recommends switching unattended routines to a Gemini API key.", "body_md": "# How to run Google Antigravity inside OpenBot safely\n\nBy [Flavio](https://flaviocopes.com/about/)\n\nTagged: [AI](https://flaviocopes.com/tags/ai/)\n\nSet up OpenBot with Google Antigravity over ACP without breaking Google's Terms of Service, switch unattended routines to a Gemini API key, and trigger agents from openbot-cli or webhooks.\n\nIf you want persistent AI teammates that have their own workspace, browser, history and scheduled routines, [Grok Bot](https://flaviocopes.com/grok-bot/) is the turnkey option, and [T3 Code](https://flaviocopes.com/t3-code/) is great as a coding workbench.\n\n[OpenBot](https://openbot.run) sits right in the middle.\n\nOne quick note on the name before we start: this guide is about OpenBot by Nightly Labs ([nightly-labs/openbot](https://github.com/nightly-labs/openbot)), not CopilotKit’s workspace at `open.bot` that shares the same name.\n\nIt’s a local-first desktop app (with an optional Linux server, Docker container, and mobile apps) where you run persistent agents backed by the AI tools you already pay for: Codex, Claude Code, Grok, OpenCode, and Google Antigravity.\n\nThe big question everyone asks before they connect their Google AI Pro or [Google AI Ultra](https://flaviocopes.com/google-ai-ultra/) plan to a third-party bot workspace is simple: will this get my account flagged?\n\nLet’s see how OpenBot talks to Google Antigravity, why it stays inside Google’s updated Terms of Service, how to set it up on macOS, and where the line sits between your Google sign-in and a Gemini API key.\n\n## Why OpenBot stays inside Google’s Terms of Service\n\nIn December 2026 Google rewrote clause 6 of the [Antigravity Terms of Service](https://antigravity.google/terms/). I broke down the full policy change in [what gets Google Antigravity accounts banned](https://flaviocopes.com/google-ai-account-bans/).\n\nThe rule is simple. You can wrap the official, unmodified Antigravity CLI (`agy`) in a third-party interface over the Agent Client Protocol (ACP), run it in headless mode (`agy -p`), or call it as a subagent from another harness (I covered [calling `agy -p` as a subagent](https://flaviocopes.com/antigravity-subagent/)).\n\nWhat stays banned is extracting Antigravity OAuth tokens to hit Google’s private endpoints directly, making the harness a raw completions proxy for an external loop, or pooling personal subscriptions across users.\n\nOpenBot’s Gemini provider (`antigravity` in [nightly-labs/openbot](https://github.com/nightly-labs/openbot)) is built around those boundaries:\n\n- It spawns the official, unmodified Antigravity CLI over ACP (`acp` ) instead of implementing its own OAuth shim.\n- It never calls Google’s internal Code Assist endpoints (`cloudcode-pa` ,`daily-cloudcode-pa` , or`v1internal` ) for usage or verification links.\n- It disables account pooling for Gemini, so OpenBot will never rotate turns across multiple personal Google accounts behind your back.\n- On CLI 1.5.16 and newer, it checks remaining quota by running the unmodified headless command `agy -p /usage --output-format json --print-timeout 20s` , and stops if the CLI tries to bill that command as a regular turn.\n\nHere’s how requests flow through OpenBot, depending on whether you run an interactive teammate on your Google plan, or an unattended routine on an API key:\n\nIf you’re just starting to set up Antigravity on your Mac, I recommend starting with [the complete guide to Google Antigravity](https://flaviocopes.com/antigravity/).\n\nYou can also download the free [Antigravity Handbook](https://flaviocopes.com/ebooks/antigravity-handbook/) to read it offline.\n\n## Install OpenBot and pick the right Antigravity CLI\n\nDownload the macOS disk image from [openbot.run](https://openbot.run) or the [GitHub Releases page](https://github.com/nightly-labs/openbot/releases) (Apple Silicon `arm64` or Intel `x64`, macOS 13 or newer) and drag `OpenBot.app` into `/Applications`.\n\nOn first launch, you pick a language and sign in to an OpenBot account using a one-time email code.\n\nEven though the account sign-in is required before you reach the workspace, your chats, files and browser sessions are all local to the computer running OpenBot.\n\nNext is a detail that might trip you up if you already have the Antigravity IDE installed.\n\nOpenBot **never** searches your `PATH` for a binary named `antigravity`, because the Antigravity editor installs its own `antigravity` launcher, which is not the ACP CLI.\n\nYou have 2 clean options:\n\n1. Click **Download** on the Gemini row inside OpenBot’s**Settings > Providers** screen. OpenBot downloads Google’s official Antigravity CLI from`google-antigravity/antigravity-cli` into its own managed folder (Google’s license does not allow OpenBot to bundle the binary inside the DMG) and checks for updates automatically.\n2. Point OpenBot at the `agy` CLI you already installed on your Mac (version 1.5.3 or newer) by setting`OPENBOT_ANTIGRAVITY_PATH` before launching OpenBot.\n\nLet’s check the `agy` version and models already available on my Mac:\n\n```\nagy --version\nagy models\n```\n\nWith `agy` 1.5.17 installed at `~/.local/bin/agy`, you can launch OpenBot against that exact binary from a terminal:\n\n```\nOPENBOT_ANTIGRAVITY_PATH=\"$HOME/.local/bin/agy\" open -a OpenBot\n```\n\nIf you prefer clicking **Download** inside OpenBot instead, you don’t need the environment variable at all.\n\nOpenBot will keep its managed copy updated, without touching your system `agy`.\n\n## Sign in with Google vs. saving a Gemini API key\n\nInside OpenBot’s Gemini provider settings, clicking **Connect** will run an ACP `authenticate` call with `oauth-personal` and will open `accounts.google.com` in your browser.\n\nOnce you sign in, OpenBot asks the CLI for `model/list` and keeps Google’s own ordering. On my Mac, OpenBot downloaded Antigravity CLI `v1.5.25` and exposed all 8 models from my plan, starting with [Gemini 4 Neon](https://flaviocopes.com/gemini-4-neon-review/) and Gemini 4 Carbon:\n\nNotice the green circular Gemini quota indicator in the left sidebar next to Codex and Grok, and the **Add key** button right under **Accounts**.\n\nYou can save a **Gemini API key** (`GEMINI_API_KEY`) on that same Gemini provider page.\n\nThis single toggle changes how OpenBot routes turns, and is the cleanest way to separate interactive work from unattended proactive bots.\n\n| Setting | Google sign-in ( `oauth-personal` ) | Saved Gemini API key ( `GEMINI_API_KEY` ) | \n|---|---|---|\n| Best for | Interactive personal teammates you prompt yourself | 24/7 scheduled routines, webhook bots, and heavy queues | \n| Billing | Your Google AI Pro or Ultra subscription | Pay-as-you-go or [Google AI Ultra monthly API credits](https://flaviocopes.com/google-ai-ultra-api-credits/) | \n| Models listed | Full plan catalog (Gemini 4 Neon, Carbon, Hydrogen, plus Claude/GPT) | API key Gemini models only (no Carbon, Claude, or GPT) | \n| Quota reading | `agy -p /usage --output-format json` (5-hour and weekly buckets) | None (returns API rate-limit errors directly) | \n| Priority when both are set | Overridden while a key is saved | Always takes precedence ( `apiKeyInUse` ) | \n\nOne practical quirk to know upfront: if you save a Gemini API key on the default Gemini row, OpenBot will route turns through the key instead of your Google sign-in, and will move agents off any model the key does not serve. Removing the key will put your Google plan back in charge.\n\n## How OpenBot checks Antigravity quota and fails over\n\nSince the Antigravity ACP server does not push the plan usage, OpenBot checks the remaining 5-hour and weekly buckets using the unmodified headless CLI:\n\n```\nagy -p /usage --output-format json --print-timeout 20s | jq '{\n  status,\n  num_turns,\n  groups: [.command.data.groups[] | {\n    name,\n    buckets: [.buckets[] | {\n      id,\n      window,\n      remaining: ((.remaining_fraction * 100 | round | tostring) + \"%\"),\n      reset_time\n    }]\n  }]\n}'\n```\n\nWhen I ran this on `agy` 1.5.17, it returned immediately with `num_turns: 0` and 0 billed tokens:\n\nNotice the `1970-01-01T00:00:00Z` reset time on the untouched Claude and GPT pool. OpenBot ignores resets before year 2000 so untouched buckets stay clean in the UI.\n\nEven better is what happens when you actually hit a limit. If Google replies with a timed quota lock (“Individual quota reached” or “Third-party quota reached” followed by a reset timer), OpenBot parses that reset delay, pauses turns against that bucket, and automatically moves the agent to a **backup model on another provider** (say Codex or Claude Code) while keeping the same chat and workspace.\n\nContext length works cleanly too. Antigravity has no explicit ACP compaction command, so when a long-running teammate fills its context window, OpenBot rotates the underlying Antigravity session in `handoff` mode. It saves the work steps, starts a fresh session behind the same thread, and passes the handoff summary across so you never lose the agent’s workspace or history.\n\n## Create a Gemini 4 Neon teammate\n\nWith Gemini connected, click the `+` button in the sidebar to create a persistent agent. Pick a name, an avatar, and set **Model** to **Gemini 4 Neon · High**:\n\nClick **Create agent** and OpenBot spins up a dedicated workspace folder on disk (`~/OpenBot/Agents/agent-...`) and starts a fresh Antigravity ACP session behind that thread:\n\n## Making agents proactive: routines, webhooks, and `openbot-cli`\n\nOnce your teammate is up, you don’t have to sit in the window and chat with it by hand.\n\nTo make it proactive, OpenBot gives you 3 mechanisms:\n\n### 1. Scheduled and webhook routines\n\nIn any agent’s routine editor, you can set **When to run** to a schedule or to **Webhook** (up to 64 webhook routines per host).\n\nA webhook routine will generate a unique URL and a [Standard Webhooks](https://www.standardwebhooks.com/) signing secret (`whsec_...`).\n\nEvery incoming `POST` request will have 3 headers (`X-OpenBot-Timestamp`, `X-OpenBot-Delivery-Id` and `X-OpenBot-Signature`) where the signature is `sha256=` followed by the lowercase hex HMAC-SHA256 of `<timestamp>.<deliveryId>.<body>`.\n\nHere is a small Node.js script that signs and sends a webhook event to an OpenBot routine:\n\n``` js\nimport { createHmac, randomUUID } from 'node:crypto'\n\nconst body = JSON.stringify({\n  type: 'deployment.completed',\n  data: { environment: 'production' },\n})\nconst deliveryId = randomUUID()\nconst timestamp = String(Math.floor(Date.now() / 1000))\nconst signature = createHmac('sha256', process.env.OPENBOT_WEBHOOK_SECRET)\n  .update(`${timestamp}.${deliveryId}.${body}`)\n  .digest('hex')\n\nconst response = await fetch(process.env.OPENBOT_WEBHOOK_URL, {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'X-OpenBot-Timestamp': timestamp,\n    'X-OpenBot-Delivery-Id': deliveryId,\n    'X-OpenBot-Signature': `sha256=${signature}`,\n  },\n  body,\n})\n\nif (response.status !== 200 && response.status !== 202) {\n  throw new Error(`OpenBot rejected the event: ${response.status}`)\n}\n```\n\nKeep the same `deliveryId` and `body` if you retry after a `503` (for example while a host is waking up). OpenBot deduplicates receipts by delivery ID for 7 days, so retries return `200` without triggering a duplicate run.\n\nYou can also filter the incoming JSON payload by event `type` and JSON Pointer rules (e.g. `/environment` equal to `production`) so the agent only wakes up on the exact events you care about.\n\n### 2. Triggering agents from your own scripts with `openbot-cli`\n\nOpenBot ships a standalone Node.js CLI right inside the macOS app bundle (tested on OpenBot 0.85.0).\n\nYou don’t need to install a separate package to use it:\n\n```\nalias openbot-cli='node \"/Applications/OpenBot.app/Contents/Resources/cli/openbot-cli.mjs\"'\nopenbot-cli --help\n```\n\nTo let local scripts talk to an agent, open that agent’s **Settings > Permissions** and turn on **Local scripts** (it is off by default, and agents cannot enable it for themselves).\n\nOnce enabled, OpenBot listens on `127.0.0.1` on a random port and writes three `0600` files (`url`, `token`, `headers`) inside `~/Library/Application Support/OpenBot/automation/`.\n\nNow your shell scripts, Git hooks, cron jobs, and anything that can run on your computer can list enabled agents, queue tasks, or wait for structured JSON replies.\n\nHere is a real run against the `Gemini 4 Neon` agent I just created (which completed in about 22 seconds on the first turn):\n\n```\nopenbot-cli list --json | jq .\nopenbot-cli run \"Gemini 4 Neon\" \\\n  \"Run pwd and tell me the full path and how many files are in it, in one short sentence.\" \\\n  --wait --timeout 2m --json | jq '{ok, exitCode, status, answer}'\n```\n\nThe exit codes are meant for automation: `0` means the turn finished, `1` means the turn failed or was refused, `3` means the agent paused to ask a human a question or request approval, `4` means `--wait` timed out while the agent keeps working, `5` means OpenBot is not running or Local scripts is disabled.\n\n### 3. Always-on hosting (shared Mac, Linux server, or Docker)\n\nIf you close your MacBook, local routines stop until the laptop wakes up.\n\nIf you want to run OpenBot on an always-on Mac at home (or share one host with your partner), I walked through the full `pmset` and Docker setup in [How to share one OpenBot computer across your house from a Mac](https://flaviocopes.com/openbot-shared-mac/).\n\nOne important ToS rule if you share an OpenBot host with another person: do not put your personal Google Antigravity OAuth sign-in on a shared server where someone else can trigger turns. Google’s consumer subscription is for single-user use, so switch the Gemini row on a shared host to a saved `GEMINI_API_KEY` instead.\n\nFor a dedicated Linux VPS, OpenBot also ships a headless server mode for Ubuntu 24.04/26.04 or Docker so your teammates stay online 24/7 and connect to your desktop and iPhone apps:\n\n```\ncurl -fsSL https://raw.githubusercontent.com/nightly-labs/openbot/main/scripts/install-server.sh | sudo bash\nsudo openbot login\n```\n\nOn a headless Linux server with no desktop browser, OpenBot falls back to a paste-the-address sign-in flow for Gemini, or you can skip browser sign-in and run the server with a saved Gemini API key.\n\n## OpenBot vs. Grok Bot vs. T3 Code\n\nThese tools solve overlapping problems, so it helps to be clear on what each one actually owns:\n\n| Tool | Where it runs | Antigravity support | Proactive automation | Pricing and license | \n|---|---|---|---|---|\n| **OpenBot** | Your Mac, Windows, Linux, or self-hosted Docker/VPS | Native ACP ( `agy` ) + saved`GEMINI_API_KEY` + backup failover | Schedules, signed webhooks, `openbot-cli` , shared team channels | Free for noncommercial use (PolyForm Noncommercial 1.0.0), commercial license for business use | \n| **[Grok Bot](https://flaviocopes.com/grok-bot/)** | xAI-managed cloud Linux VM (24/7) | Not native (locked to xAI stack) | Built-in routines, skills, and cloud browser | Bundled in X / legacy Cursor subscriptions | \n| **[T3 Code](https://flaviocopes.com/t3-code/)** | Local server + linked remote machines | Native ACP ( `agy` ) | `schedule_task` (intervals, fixed times, webhooks) | Free, open source (MIT) | \n\n## How I would use it (and where it is a bad fit)\n\nIf I set up a persistent bot team around Google Antigravity, here is how I would split the work to get the best of both worlds, without risking my Google AI Ultra plan.\n\nFirst, I would keep coding sessions inside [T3 Code](https://flaviocopes.com/t3-code/) (or the [T3 Code Handbook](https://flaviocopes.com/ebooks/t3-code-handbook/) workflows), because Git worktrees, inline diffs and PR review guides are built specifically for writing and reviewing code.\n\nSecond, I would use OpenBot for non-IDE persistent teammates that live alongside my browser, files, and local tools. For interactive teammates I chat with during the day, I would connect Antigravity over ACP using my Google AI Ultra sign-in, and configure a backup model on Codex or Claude Code so a 5-hour quota lock never stalls a thread.\n\nThird, for any routine that runs unattended on a schedule or fires from a webhook while I am away, I would put it on a saved Gemini API key funded by my [Google AI Ultra monthly API credits](https://flaviocopes.com/google-ai-ultra-api-credits/) (or route that specific agent to an API-key provider). That keeps my personal OAuth sign-in strictly tied to interactive work.\n\nThere are 3 clear cases where OpenBot is the wrong tool:\n\n- **Strict sandboxing.** After first-launch consent, OpenBot runs agents with`danger-full-access` and`approvalPolicy: never` . Agents can edit files, run shell commands, and drive the embedded browser without asking every step, so only give them tasks you trust and keep backups.\n- **Commercial team deployment on the free tier.** The source code is open on GitHub, but it uses the**PolyForm Noncommercial 1.0.0** license. Personal projects, study, and research are free, while running it for a business requires a commercial license.\n- **Zero-maintenance 24/7 cloud hosting.** Unlike Grok Bot, OpenBot does not hand you a managed cloud computer out of the box. If you want bots working while your laptop is closed, you have to maintain a home Mac mini, a Linux VPS, or a Docker host yourself.\n\nWant me to talk about your product? You can [sponsor this site](https://flaviocopes.com/sponsor/).", "url": "https://wpnews.pro/news/how-to-run-google-antigravity-inside-openbot-safely", "canonical_source": "https://flaviocopes.com/openbot-antigravity/", "published_at": "2026-12-06 09:20:00+00:00", "updated_at": "2026-12-06 09:45:44.639043+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "agent-protocols", "ai-policy"], "entities": ["OpenBot", "Nightly Labs", "Google Antigravity", "Gemini", "Agent Client Protocol", "Flavio", "Google AI Pro", "Google AI Ultra"], "also_reported_by": [], "takeaway": "Wrapping the unmodified Antigravity CLI over ACP and checking quota with `agy -p /usage --output-format json --print-timeout 20s` on CLI 1.5.16+ keeps a third-party harness inside Google's terms, while unattended routines should use a Gemini API key instead of the Google plan.", "recommendation": {"advice": "Wrap the official unmodified Antigravity CLI over ACP and disable account pooling, and move unattended routines to a Gemini API key to stay within Google's terms.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/how-to-run-google-antigravity-inside-openbot-safely", "markdown": "https://wpnews.pro/news/how-to-run-google-antigravity-inside-openbot-safely.md", "text": "https://wpnews.pro/news/how-to-run-google-antigravity-inside-openbot-safely.txt", "jsonld": "https://wpnews.pro/news/how-to-run-google-antigravity-inside-openbot-safely.jsonld"}}