Skip to content
Projects

About

Connect your GPT subscription and third-party models to agy. An isolated local experiment harness for Antigravity on macOS (Apple Silicon and Intel), Windows x64, and Linux x64, with native third-party OpenAI-compatible models, ChatGPT subscription sign-in, multi-account switching, and optional Chinese UI integration.

AI & Machine Learning

How these counts are measured

Measured star growth

in 24h
Collecting history
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

AGY Lab

简体中文 | English

AGY Lab offers a desktop edition of Antigravity and a standalone agy-lab terminal command. The desktop app runs on macOS (Apple Silicon and Intel), Windows x64, and Linux x64. You can use third-party models in the native model picker and Orchestrator, and switch between saved Google and ChatGPT accounts. The desktop app has its own identifier (com.local.agy-lab), data directory, and agy-lab:// sign-in callback. The CLI keeps its own model configuration, credentials, and sessions.

Third-party models added in Lab are unavailable in Antigravity cloud sessions. Remote Agents run on Google's servers and cannot access the model connections on your computer.

Unofficial project. AGY Lab is not officially affiliated with Google, Antigravity, or OpenAI. Build your Lab copy locally from an official Antigravity desktop app or agy CLI that you legitimately obtained. Before modifying the client or using experimental subscription sign-in, verify the applicable licenses, terms of service, and account eligibility yourself. We share this project for others to try. Please weigh the risks before using it.

Downloads

Installer When to choose it
Desktop Standard (ZIP) For WSL 2 or SSH. Supports SSH hosts and, on Windows, experimental WSL workspaces when the bundled server matches your Antigravity version.
Desktop Google Import (ZIP) Standard plus Google account import from a refresh token or JSON backup.
Desktop Lite (ZIP, about 3 MB) Recommended if you work only in local workspaces. Includes Google sign-in, ChatGPT subscriptions, and third-party APIs. No SSH, WSL, or Google refresh token (RT) import.
Standalone CLI (ZIP) For running agy-lab in a terminal. Requires the official agy 1.5.16 CLI and installs independently of the desktop app.

Desktop setup · CLI setup and usage

Standalone terminal command: agy-lab

Start with Google's official agy 1.5.16, Python 3.9+, and Node.js 22+. Extract the entire CLI installer ZIP from the table above. In the folder containing INSTALL-CLI.txt, run:

System Install command
macOS / Linux python3 scripts/install_cli.py
Windows py -3 scripts/install_cli.py

Run agy-lab init to create a sample configuration and print its path. If your shell cannot find agy-lab, use the full path printed by the installer. The default local mode uses Lab models and needs no Google sign-in.

Open the connections.json path printed by init. Set the provider's baseUrl and model, and put the name of your API key environment variable in apiKeyEnv. Omit that field for a keyless local service. Each connection has its own ID and can specify wireApi (chat or responses), contextTokens and effortOverride. The CLI stores its configuration, conversations and tool state under ~/.agy-lab-cli/. Override the directory with AGY_LAB_CLI_HOME.

agy-lab models
agy-lab --model MODEL_ID
agy-lab --continue --model MODEL_ID -p "Continue the previous task"

Portable install: Pass --output <empty-directory> to the installer, then run agy-lab (agy-lab.cmd on Windows) from that directory. You can move it to another machine on the same platform with Node.js 22+. Use --source <executable> if the official agy is not on your PATH. You can also supply the official Windows x64 or glibc-based Linux x64 executable to build a portable copy for that platform on another machine.

agy-lab discover <connection ID> lists the provider's models and reasoning levels; add --add <model>... to save new connections with the same address and key. agy-lab models --refresh updates reasoning levels of saved connections and fills in context sizes that are not set.

Both modes use a per-conversation cache routing ID and reuse it when you resume. The CLI handles plan-mode caching the same way as the desktop. Multiple terminals can share a configuration directory and resume their own tool calls with the saved reasoning state.

ChatGPT subscription: agy-lab chatgpt login authorizes in the browser (repeat it to add more accounts), agy-lab chatgpt lists accounts, use <number> switches and logout <number> removes one. Then run agy-lab discover chatgpt --add <model>, or add {"id": "...", "auth": "chatgpt", "model": "..."} by hand. Credentials are stored encrypted in the configuration directory with the key in the system keychain (macOS Keychain, Windows DPAPI, Linux Secret Service via secret-tool), separate from desktop Lab's accounts.

Subscription model speeds: Run agy-lab fast <model ID> on or agy-lab ultra-fast <model ID> on to enable either speed independently. For a connection named luna, the three High variants are agy-ext-luna-high, agy-ext-luna-fast-high, and agy-ext-luna-ultrafast-high. New CLI sessions list enabled variants in agy-lab models; use --model to select one. Speed choices are available in local and google modes, and the Orchestrator planner and executor can each choose a speed in google mode. Both commands accept off to hide that speed, no action to show the current setting, or test to make one request using subscription quota to check whether the server accepts it and see the reported service_tier.

Google sign-in mode (agy-lab mode google; switch back with agy-lab mode local): Google and Lab models appear in the same session through a local split proxy, as on the desktop, and requests to Google are forwarded byte for byte. Sign in to Google once inside the terminal; the token is kept under ~/.agy-lab-cli/gemini/ and the original CLI's and desktop's sign-ins are never read or written. Google mode supports official agy 1.5.16 on Apple Silicon Macs, Windows x64 and glibc-based Linux x64. Windows and Linux builds verify the official executable before giving the copy its own sign-in storage; the Windows Lab copy is unsigned. Linux musl and other architectures currently support local mode only. Enterprise (GCP) accounts use another endpoint and are not supported yet. Both Orchestrator roles offer the account’s regular chat models and any added Lab models. Planning with Gemini and executing with a third-party model has been verified. The terminal offers the low, medium, high, xhigh and max reasoning levels only.

Export the CLI cloud request inventory: Run agy-lab requests in another terminal to save the most recently updated run as a JSON file in the current directory. The command prints its path and works in both local and google modes. Use agy-lab requests --list to see run IDs and modes, agy-lab requests ID to export one run, or agy-lab requests --all --output requests.json to export all retained runs to a new file.

Each run includes request paths, models, CLI response statuses, cache statistics and recorded external calls. local records requests through its local model service; google records traffic through its split proxy. Reports include model and tool names. Conversation files, configuration and credentials are excluded. request-inventories/ keeps active runs and the ten most recently finished runs with requests. Earlier Google inventories can also be exported. Local recording starts with the first CLI run after the update.

Export CLI conversation errors: Run agy-lab errors in your shell to save a redacted text report for the most recent conversation with an error, including its child conversations. The command prints the file’s path in the current directory. Use agy-lab errors --list to find conversation IDs, agy-lab errors ID to export one conversation, or agy-lab errors --all --output errors.txt to export all to a new file. Both modes read the CLI’s saved conversations, covering up to 500 errors from the past seven days. Export uses Node’s built-in SQLite module (22.13 or later on the 22.x line).

Control the current CLI session from a phone or browser: In google mode, sign in and run agy-lab --remote-control. Add --model MODEL_ID to select a third-party model. Open the printed link with the same Google account and select the computer running Lab. Keep the computer online and its terminal open; enter /remote-control off to disconnect and keep working locally. The browser's Remote Conversations entry opens Google-hosted sessions, where models added in Lab are unavailable. The agy-lab CLI does not accept the cloud --remote-agent flag. Official Remote Control guide

Connecting Third-Party Models

Note: Lab's built-in menus and Connections window are currently labeled in Chinese; original UI labels are noted below alongside English translations.

  1. Open AGY Lab, sign in with your Google account in the main window as usual, then open AGY Lab → Accounts & Model Connections… (账号与模型连接…). On Windows and Linux, these entries live in the system tray menu; when no tray is available (such as default GNOME), right-click Antigravity Lab → Accounts & Model Connections… (账号与模型连接…) in the application launcher.
  2. Choose a connection method:
    • API Key: Enter the base URL and API key of an OpenAI-compatible service and click Fetch Models (获取模型). The endpoint URL must use HTTPS; unencrypted HTTP is accepted only for localhost and private network addresses (10.x, 172.16–31.x, 192.168.x, 169.254.x, IPv6 fc00::/7 and fe80::/10, plus single-label hostnames and .local, .internal, .home.arpa domains), in which case keys and conversations are transmitted in plaintext over the local network. Existing connections can reuse saved credentials from the list. A service's catalog may include non-chat models; use Test Tools (测试工具) to check tool-calling compatibility. Connections use Chat Completions (/chat/completions) by default; if the provider supports it, switch the request format to Responses (/responses) in the list, effective from the next request. Official OpenAI and ChatGPT subscription connections pick the format automatically and have no such option. Any model can also be set to Orchestrator only (仅编排): it can be chosen as an Orchestrator planner or executor but is not listed in the conversation model picker, effective after restarting Lab.
    • ChatGPT Subscription (Experimental): Click Sign in with ChatGPT, finish authorization in your browser and allow subscription sharing, then click Fetch Subscription Models (获取订阅模型). Availability depends on account eligibility, authorization, and server-side support; this connection uses shared subscription quota and does not automatically fall back to API billing when limits are reached.
  3. Select models and click Add Selected Models (添加所选模型), then restart Lab. Adding or removing connections requires a restart to refresh the model list. Added models and their reasoning levels appear in the native model picker and in the role lists under Settings → Models → Orchestrator Settings.

Under Added Models, a ChatGPT subscription connection can independently enable Also offer Fast (同时提供 Fast 版) and Also offer Ultra Fast (同时提供 Ultra Fast 版). After restarting Lab, the model picker and both Orchestrator role lists show enabled speed variants alongside Standard, with the same reasoning levels. Enabling a speed does not change the current selection; disabling it and restarting hides that variant. Test Chat (测试对话) uses Standard. Test Fast and Test Ultra Fast each send one request to check whether the server accepts it and report the returned service_tier: fast or priority means Fast, and ultrafast means Ultra Fast. The ChatGPT subscription backend can echo default even when acceleration is active, so verify actual speed from output throughput. Acceleration depends on the account, model and server, and can consume more subscription quota. Lab does not automatically retry at another tier after a rejection.

Reasoning levels are determined in this order: levels you manually checked via Reasoning (推理) under Added Models (已添加的模型) → levels reported by the service in its model list → built-in levels recognized by model name (GPT / o-series, GLM 5.2+, DeepSeek V4, Kimi K3, Qwen4-Max / Qwen3.8, Doubao Seed 2.1, MiniMax M3.1 Flash, Grok 4.5+, Gemini 2.5+). When a level is selected, Lab sends reasoning_effort in requests; unchecking all levels offers only the bare model without that parameter, which is useful for services that reject it. Changes take effect after restarting Lab, and Reset to Auto (恢复自动识别) reverts manual selections.

In Orchestrator Settings, you can choose any native chat model available to your account or any added Lab model as the planner or executor. You can also alternate between third-party and official models in the same session. Reading/writing files, running commands, and tool approvals are still handled by Antigravity.

Orchestrator saves role selections as numbers. Lab keeps numbers assigned to disabled model variants and avoids numbers it has seen in the official catalogue. If the range 1200–1650 is exhausted, new variants are marked as omitted. If you removed connections, hid reasoning levels, or changed speed options in an older build, check both saved roles after upgrading.

A planner picked by name stays with that conversation when you reopen it or restart Lab. The executor follows Orchestrator Settings, which also supplies the planner for new conversations. Choosing Default in the conversation menu uses the official defaults for both roles. If settings are still loading or a selected model is unavailable, Lab shows a message and holds the send.

Request Routing and Diagnostics

  • Only generation requests for a selected third-party model are routed to that provider. Lab reconstructs requests without copying Google headers or project metadata, though it does send the conversation, code snippets, and tool results required for generation to the selected provider. Google sign-in, quota checks, and requests for official models still go to Google; Lab only appends your local connections to the returned model catalog.

  • Plan mode and caching: Lab keeps instruction changes and tool restrictions at the turn where they took effect. Unchanged rules between two edits appear only once. Once both modes’ tools are known, subsequent switches can reuse the preceding request prefix. Subscription tool lists are kept per conversation. On a rewind, Lab reuses the portion that still matches the host's history; if compaction rewrites the opening, Lab starts a new prefix.

  • Official OpenAI Responses requests use allowed_tools to restrict calls. On compatible APIs and subscriptions during planning workflows, Lab intercepts calls to unavailable tools locally. A subscription gets one chance to correct the call; a second rejection stops the request. In non-subscription sessions with no plan tools, small changes to Skills, plugins or rules become the opening prompt after two consecutive requests. Third-party tool calls are written to the session with placeholder signatures, while provider reasoning state stays on this computer for subsequent calls to the same provider. Compatible Chat requests ask for streamed usage, including DeepSeek’s cache-hit field; xAI connections send x-grok-conv-id per conversation.

  • Signing in and fetching the subscription model list do not generate a response. Manually running Test Chat or a speed test requests one generation. A successful Test Tools requests two: one to call the tool and one to read the result. These settings-window tests are separate from the conversation request inventory.

  • If Best of N model comparison is enabled, selecting a single subscription model still runs it in each configured branch. Include each branch's tool steps when reviewing usage. The subscription route does not accept max_output_tokens, so a host-side output limit cannot cap subscription usage. OpenAI subscription API limitations

  • ChatGPT subscriptions retry only when the request could not have been delivered, such as a failed DNS lookup or connection attempt. If the connection drops and delivery is uncertain, Lab reports it and stops. Other external connections still retry network errors before an HTTP response up to five times (after 1, 2, 4, 8, and 16 seconds). An HTTP error, an interrupted response, or cancellation ends the request.

  • Show Cloud Request Inventory (显示云端请求清单): A user turn may involve several model calls. Under each external route, recentCalls lists the time, model, and session for each step. Each record counts generation attempts (including tool corrections) in generations, HTTP send attempts in postAttempts, and generations with reported usage in usageReports. Output includes reasoning. The cache hit rate uses only input for which the provider reported a cache count; unreportedPromptTokens records other known input, and a null rate means no eligible sample. The inventory does not log headers, credentials, conversation bodies, or file contents. Inspect model and tool names before sharing.

  • Export Error Information… (导出错误信息…) saves a text report for the current conversation, another conversation ID, or all conversations. It includes failures from official models, ChatGPT subscriptions, and third-party APIs, with the cause, status code, and request ID when available. Subagent errors are grouped under the main conversation. Lab keeps up to 500 redacted failures on this device for seven days and prunes them at startup and hourly. After an SSH reconnect, Lab can recover recent conversations that still report a failure.

API keys, ChatGPT OAuth credentials, and saved Google account copies are stored in Lab's user data directory via Electron safeStorage: macOS uses the system Keychain, Windows uses DPAPI, and Linux protection depends on the system keyring selected by Electron. On Linux, if the backend is basic_text, credentials can still be saved with weaker local protection, and the Accounts & Model Connections… window explicitly warns about it. See SECURITY.md for further security boundaries and vulnerability reporting instructions.

Multiple Accounts

Both Google and ChatGPT allow keeping multiple accounts signed in, with one "current" account active at a time that you switch manually. Management lives in the Accounts & Model Connections… window.

Google Accounts

  • Remember account: After signing in through the main window, the account appears under Google Accounts (Google 账号) marked as current.
  • Add: Click Add Google Account (添加 Google 账号); the main window becomes signed out (with the previous account saved), allowing you to sign in to another account in the main window.
  • Import RT / JSON (导入 RT / JSON…): Paste a bare refresh token, a Cockpit-style email-and-RT record, or a complete personal Antigravity backup, or select a file. If a file contains multiple accounts, select each one individually. Complete backups are checked with Google using their access_token; for a bare RT or an expired access token, Lab renews it with the same grant's RT and checks the email, client, aicode permission, and expiry. An email in the file is only a cross-check. Importing encrypts and saves the account without switching; click Switch to use it. Missing or expiring target credentials are renewed first, and a failed renewal leaves the current account signed in.
  • Automatic renewal: Lab checks saved, inactive Google sign-ins about 10 minutes before their access tokens expire, at startup, and when the computer wakes. When the native service confirms a working login but keeps the refreshed token in memory, Lab verifies the signed-in email and lets you switch back to that saved login for 45 minutes before checking again. After a temporary failure, Lab retries in 15 minutes; click Switch to retry sooner. If the row asks you to sign in again, use Add Google account.
  • Switch: Click Switch (切换) on the target account's row. If that account is already being refreshed, Lab uses the same request. You can switch to a ready account while another one refreshes. The main window reloads and local conversation history is shared across accounts.
  • Remove: Forgets the account locally only; it does not revoke Google authorization.

Distribution configuration: RT / JSON import is optional and disabled in default builds. To enable it, place the Google installed client JSON authorized for desktop redistribution at build/source/google-oauth-client.json, or point AGY_LAB_GOOGLE_OAUTH_CLIENT_FILE to it. It must match the client that issued the RT and the client used for native renewal. The build writes the configuration into the Lab copy; without it the interface hides Import RT / JSON and only Add Google Account native sign-in is available. python3 scripts/package_installer.py builds a package without import support unless --google-import is passed.

Do not use the main window's built-in sign-out button when switching accounts: it causes Google to invalidate that account's credentials, preventing you from switching back to it later.

The current account's credentials remain managed by the language server; when switching accounts, Lab updates only its own login entry. macOS uses Keychain, and Windows uses Credential Manager. Linux multi-account switching requires a Secret Service provider offering the login collection and system Python 3 libsecret bindings (such as python3-gi and gir1.2-secret-1 on Debian/Ubuntu). Without Secret Service, the language server uses Lab's isolated local file storage—single-account sign-in still works, but multi-account switching is not supported. Copies of other accounts are saved via Lab's safeStorage. Account switching has been verified with real accounts on macOS Apple Silicon; switching on macOS Intel, Windows local workspaces, and Linux desktop has not yet been verified. WSL workspace logins are stored inside the distro and do not support switching.

ChatGPT Accounts

  • Add: Click Add ChatGPT Account (添加 ChatGPT 账号) and authorize in your browser. Authorization applies to whichever ChatGPT account is currently signed in to that browser, so switch accounts in your browser first before adding another; the same account cannot be added twice.
  • Switch: Click Switch (切换) on the target account's row. Starting with the next request, requests use that account's shared subscription quota with no restart needed. Adding an account does not switch to it automatically—only the first account becomes current automatically.
  • Remove: Signs out that account and attempts to revoke authorization; if the removed account was current, Lab switches to the next one in the list.

Added subscription models are shared across all ChatGPT accounts. If accounts have different plans, a model may be unavailable on another account—run Fetch Subscription Models again while that account is active. The first request after switching accounts will not hit the prompt cache.

Rules and Skills Shared with the Original App

On startup, Lab links the global rules file ~/.gemini/GEMINI.md and the global Skills directories to the original app's copies, so edits on either side show up in both; conversation history stays separate by default (see the next section), and plugins and other configuration stay separate. Put global Skills in ~/.gemini/config/skills/<name>/SKILL.md: this is where the original Antigravity reads them (~/.gemini/skills is linked too, but the original app does not load Skills from it). If the original app has none of these yet, Lab moves its own rules or Skills there before linking, or creates an empty Skills directory. A previous Lab copy that conflicts with the original is kept under a *.lab-local name. Changes take effect after restarting Lab.

Syncing Conversation History and Projects with the Original App (Optional)

In Accounts & Model Connections → Conversation History and Projects (账号与模型连接 → 对话记录与项目), choose Separate (独立, the default) or Synced (同步), then restart Lab. If sync is already enabled, just restart after upgrading.

  • Synced: Lab links its conversations, conversation artifacts (brain), annotations, chapter titles and conversation locks (presence) to the directories of the same names in the original app's ~/.gemini/antigravity/, so both apps see the same conversations. Lab's previous history is kept under *.lab-local names and is not merged into the original app's. The conversation summary database and index stay separate; the language server rebuilds them from the conversations directory on startup. Each app keeps its own knowledge base and sign-in state.
  • Projects: Both apps use ~/.gemini/config/projects/ for project menus, resources, permissions and setup scripts, including any saved “Not in Project” settings. When sync is enabled, Lab adds its existing projects by ID. Distinct projects with the same name are kept, with a numeric suffix on the Lab copy. For matching IDs, the original app's version is active; Lab keeps its pre-sync version in config/projects.lab-local/.
  • Separate: Lab restores the conversations and projects it had before syncing. Anything created or edited while synced stays in the original app's directories.
  • Do not run both apps at once while synced: they may overwrite each other's conversation list or project edits. If the original app is running when Lab opens, Lab asks you to quit it first.
  • If Lab and the original app are signed in to different Google accounts, each will see the other account's conversations once synced. A third-party model conversation continued in Lab can only switch to one of the original app's models when opened there.
  • WSL workspaces follow this setting too: when Lab connects to a distro, it syncs conversations and projects with the original app's ~/.gemini inside that distro. The distro needs Python 3.7 or later. Windows and each distro keep their own records, so a WSL workspace shows only what the original app has in the same distro. SSH host history stays separate.

One-click standalone installation

Start with a supported official Antigravity version. Extract the entire desktop installer ZIP to a writable folder. On macOS, double-click Install.command; on Windows x64, double-click Install.cmd. On Linux x64, run sh Install.command from the extracted folder. The installer identifies the original app, obtains and verifies the build materials, and builds a separate Antigravity Lab on your computer.

The default parent directories are ~/Applications on macOS, %LOCALAPPDATA%\Programs on Windows, and ~/.local/opt on Linux. When upgrading, the installer keeps your existing Lab app. To install the new version alongside it, choose another parent directory when prompted or pass --install-dir. Use --source to locate a custom Antigravity installation.

The first download needs internet access. On macOS, finish Apple's Command Line Tools installation if prompted. Missing Node.js runtimes, and missing Python runtimes on Windows and Linux, are prepared locally in the extracted project. All three desktop installers ask whether to enable the Chinese UI. Press Enter to keep English; non-interactive installs also default to English. Use --zh to point at your own translation checkout or --no-zh to turn it off. See Local Build for supported versions and SSH setup.

To package an installer, run python3 scripts/package_installer.py from the repository root. All three desktop packages embed the Chinese resources, so they need agy汉化补丁 next to the repository (or AGY_LAB_ZH_PROJECT / --zh-project). Standard and Google Import also embed the SSH language server and need build/source/linux-server-2.38.0/language_server-linux-x64 (or AGY_LAB_LINUX_SERVER / --linux-server), verified against its registered hash. Pass --no-ssh for Lite. RT import is independent of those resources; pass --google-import with a client at build/source/google-oauth-client.json or AGY_LAB_GOOGLE_OAUTH_CLIENT_FILE. For example:

python3 scripts/package_installer.py --output dist/installers/Antigravity-Lab-Installer.zip
python3 scripts/package_installer.py --google-import --output dist/installers/Antigravity-Lab-Installer-Google-Import.zip
python3 scripts/package_installer.py --no-ssh --output dist/installers/Antigravity-Lab-Installer-Lite.zip
python3 scripts/package_cli_installer.py --output dist/installers/Antigravity-Lab-CLI-Installer.zip

Local Build

Requires Python 3.9+, Node.js 22.12+, and @electron/asar. Building on macOS also requires Xcode Command Line Tools.

  1. Run npm ci at the repository root to install the locked build tools; alternatively, use a globally installed asar on PATH.
  2. Download the Electron zip for your platform and SHASUMS256.txt from the official Electron 44.9.1 release page, place them in build/source/, and rename the checksum manifest to electron-44.9.1-SHASUMS256.txt.
  3. Run the command for your platform below. Existing outputs are not overwritten; to build side-by-side, pass --output to specify another path under dist/.

macOS

Requires Antigravity with a valid Google signature: Apple Silicon supports 2.35.1, 2.35.2, 2.36.0, 2.37.0, and 2.38.0; Intel supports 2.36.0, 2.37.0, and 2.38.0. Apple Silicon defaults to /Applications/Antigravity.app:

python3 scripts/build_app.py --source /Applications/Antigravity.app

Outputs to dist/Antigravity Lab.app. The build script verifies the original app's signature and the Electron archive, then locally signs the launcher and language server in the copy.

When building the Intel version, point --source to Antigravity.app from the official Intel dmg and place electron-v44.9.1-darwin-x64.zip in build/source/. The build script automatically chooses the Electron archive matching the source app's architecture; you can build the Intel version on Apple Silicon and vice versa.

The Intel version has been built and signature-verified on Apple Silicon, with the patched language server confirmed to start under Rosetta; it has not yet been run on an Intel Mac, and post-login functionality has not been verified.

Windows x64

Requires the installation directory of original Windows x64 Antigravity 2.35.1, 2.35.2, 2.36.0, 2.37.0, or 2.38.0. Outputs a portable directory dist\Antigravity Lab\. 2.36.0 has been built and launch-checked while signed out on Windows; post-login usage (including Google account switching) has not yet been verified on Windows:

python scripts\build_app.py --source "$env:LOCALAPPDATA\Programs\antigravity"

Windows does not rely on the Authenticode status of installed executables: Antigravity.exe and language_server.exe in supported versions are NotSigned after installation, whereas the official NSIS installer itself carries a valid Google LLC signature. The build verifies resources\app.asar and resources\bin\language_server.exe under --source against registered version-specific hashes, along with a deterministic tree hash of relative file paths and contents under resources\app.asar.unpacked, and checks the version and patch anchors inside the ASAR. The build also aborts if any unregistered .exe, .cmd, .bat, .ps1, or .js file is present under resources\bin\. The Electron ZIP is verified using its accompanying official SHA-256 manifest, and the Electron version inside the archive is checked.

--installer is an optional extra provenance check. Only when explicitly passed does the script require the NSIS installer to have a valid Google LLC Authenticode signature and a product version matching the verified installation directory. The script does not search for an installer automatically:

python scripts\build_app.py --source C:\path\to\antigravity --installer C:\path\to\Antigravity-x64.exe

If the language server copy has no PE certificate table, the build skips certificate cleanup; if a trailing certificate block is present that becomes invalid after patching, the build strips it from the copy and zeroes the PE checksum. The Windows copy uses a separate data directory, Windows credential isolation, the agy-lab:// callback, a system tray entry, and the com.local.agy-lab AppUserModelID.

The Windows build uses only Python and asar, so you can also run the same command (without --installer) on macOS against an original Windows installation directory; input hashes compute identically on both platforms.

WSL Workspaces (Experimental)

Supports 2.36.0, 2.37.0, and 2.38.0. The 2.36.0 build was verified on Windows + Ubuntu to install and launch the bundled Linux language server inside the distro; sign-in and third-party model handoff have not yet been verified.

WSL workspaces require bundling the matching version of the official Linux x64 language server at build time (2.38.0, 2.37.0, 2.36.0). The build verifies it against the registered SHA-256, patches it, and bundles it with Lab:

python scripts\build_app.py --source "$env:LOCALAPPDATA\Programs\antigravity" --linux-server C:\path\to\language_server-linux-x64

Use the Desktop Standard or Google Import installer with a matching Linux server for WSL 2 on Windows x64. Lite is for local workspaces. When a WSL workspace opens, Lab probes the Windows model proxy using the distro's bash and uses the direct connection when available. On Windows 10 with default NAT networking, Lab carries model requests and desktop callbacks through wsl.exe using the distro's python3 (3.7 or later). The existing WSL network configuration works as is. If the helper cannot start, the session falls back to the official Google endpoint. Install Python 3 in the distro and reopen the workspace to retry.

Lab uses separate ~/.agy-lab-server and ~/.agy-lab directories and links global rules and Skills to the distro's original ~/.gemini. The NAT connection has been tested with local model streams, concurrent requests, cancellation and desktop callbacks. Sign-in and model handoff still need verification on a real Windows 10 installation.

Linux x64

Experimental: builds and launches while signed out, though post-login functionality has not yet been verified on a real Linux desktop (see the end of this section). Supports official Linux x64 Antigravity 2.36.0, 2.37.0, and 2.38.0 (ARM64 is not supported), and does not require installing or running the original app. Download the desktop archive (2.38.0, 2.37.0, 2.36.0), the official electron-v44.9.1-linux-x64.zip, and its checksum manifest into build/source/, renaming the manifest as described above. After extracting, run from the repository root:

tar -xzf build/source/Antigravity.tar.gz -C build/source
python3 scripts/build_app.py --source build/source/Antigravity-x64
"dist/Antigravity Lab/Antigravity Lab"

Outputs a portable directory dist/Antigravity Lab/, and accepts --zh /path/to/antigravity-zh to build with the Chinese UI. The build verifies the original ASAR, unpacked resource tree, language server, and Electron ZIP; it does not carry over the original host binary or update config. It does not generate .deb, .rpm, or AppImage packages.

The Linux build likewise uses only Python and asar, so you can build on macOS and copy the entire directory to Linux to run it (executable permissions from the archive are preserved). On macOS, run the Linux build script directly and pass --output to avoid the default macOS output path:

python3 scripts/platform_linux.py --source build/source/Antigravity-x64 --output "dist/linux/Antigravity Lab"

Chromium Sandbox on Ubuntu 24.04 and Similar Systems: If startup fails with No usable sandbox or Operation not permitted when creating a user namespace, inspect kernel logs for AppArmor denials and sysctl kernel.apparmor_restrict_unprivileged_userns. AppArmor may block Electron at the new path from creating the user namespace needed for sandboxing; the build keeps the regular executable permissions on chrome-sandbox from the official ZIP without elevating privileges or setting root SUID. Do not bypass this with --no-sandbox or by disabling restrictions globally. Administrators can follow Chromium's documentation to add an AppArmor profile with userns, specifically for the absolute path of a trusted Lab executable that regular users cannot modify. Alternatively, in an installation directory managed entirely by root and non-writable by regular users, an administrator who has confirmed chrome-sandbox came from the verified Electron ZIP can set it to root:root with mode 4755; do not set SUID inside a writable portable directory.

Launch Lab once after installing or upgrading to update ~/.local/share/applications/com.local.agy-lab.desktop (or $XDG_DATA_HOME/applications/ if set) and register agy-lab:// via xdg-mime. Right-click Antigravity Lab in the application launcher to open Accounts & Model Connections…, Show Cloud Request Inventory, or Export Error Information…. The browser passes the callback URL to Lab as a command-line argument, and an already running copy handles it through Electron's single-instance event; the original launcher and antigravity:// remain unchanged. After moving the output directory, run the executable once from its new path to update the launcher. The launcher currently has no icon and displays a generic icon in application lists.

To uninstall, delete the output directory and com.local.agy-lab.desktop mentioned above (Lab does not remove it on its own); to remove data as well, delete the data directory below.

Lab and language server data reside by default in ~/.config/AGY Lab/ (or AGY Lab/ under $XDG_CONFIG_HOME if set). As on other platforms, only global rules and Skills are shared via symlinks; sessions and config files are separate.

Version 2.36.0 was verified in a Linux x64 Xvfb session with an isolated user directory for main window launch, language server startup, Lab data directory isolation, agy-lab:// registration, and opening the Connections window via the desktop action. Without a system keyring, the Connections window displays the weak-protection warning. Real-account sign-in and callback, third-party model handoff, and Google multi-account switching are all unverified.

SSH Remote Hosts (Experimental)

Not yet verified against a real host or a real account. Lab rewrites the original app's built-in SSH remote support: the host runs Lab's patched language server in Lab's own directories, fully isolated from the original app.

Building

macOS and Windows builds need the official Linux x64 language server (shared with WSL; 2.38.0 download, 2.37.0 download, 2.36.0 download); the build verifies its hash, patches it, and ships it with Lab. The Linux desktop build uses its own language server and does not need this option:

python3 scripts/build_app.py --source /Applications/Antigravity.app --linux-server /path/to/language_server-linux-x64

The Antigravity-Lab-Installer.zip and Google-Import.zip one-click packages embed this language server: on macOS and Windows, SSH is enabled automatically when the bundled server matches the original app version. For a different supported version, pass its matching official server with --linux-server. Antigravity-Lab-Installer-Lite.zip is the slim build: it embeds no language server and installs are built without SSH support (about 3 MB, all other features the same). To build any package without SSH, pass --no-ssh during installation (all three platforms): every SSH connection (new, --ssh-host on the command line, restored windows, automatic reconnects) is refused at the first step with an explanation; no forward is opened and no token is created. The SSH entry in the UI comes from the language server's built-in UI and still shows. On macOS, --no-ssh cannot be combined with --linux-server; on Windows, --linux-server is still used for WSL. Manual builds without --linux-server (and without --no-ssh) fail when connecting, at the step that uploads the language server.

Host Requirements

  • Linux x64 with a POSIX sh and gzip; arm64 and Windows hosts are not supported.
  • Antigravity 2.36.0, 2.37.0, and 2.38.0.
  • For third-party models, the host's sshd must allow TCP forwarding (AllowTcpForwarding), and the host needs curl or wget.

Known Limitations

  • The first connection uploads about 225 MB: Lab always uploads its own language server from your computer and never downloads the original on the host; the same patch version is not uploaded again.
  • Third-party models depend on this computer: once third-party connections are configured, all of the host's model requests (Google's included) go through the forward to this computer. After you disconnect, agents still running on the host cannot call any model; in the original app they keep working. Without third-party connections the host talks to Google directly, as in the original app.
  • No per-host opt-out: as long as Lab has third-party connections, every SSH host uses the forward.
  • A remote server that is already running keeps its route: a server started before you added third-party connections still talks to Google directly; use Stop Server in the remote window, then reconnect.
  • Connecting to an older server by alias: if the server has no forwarding marker, Lab warns that it cannot confirm the forward. Connect once using the original address so aliases with the same configuration can reuse the forward, or stop the remote server and reconnect.
  • When the port is taken: if a session from before sleep still holds the port, the server started this time uses Google models only; restart the remote server once the old session is gone. If another user's process holds it, Lab gives the host a new port and token and tells you; a remote server still running cannot call any model until it restarts.
  • Effect on commands the agents run on the host: they inherit the uppercase HTTP_PROXY. curl, wget and apt ignore the uppercase variable and are unaffected; Go and Python tools fetching external plain http:// URLs are refused (https:// and local addresses are unaffected), so run such commands without HTTP_PROXY. These commands can also read the token; they already run as you.
  • Other: the development variables ANTIGRAVITY_SSH_LS_VERSION / ANTIGRAVITY_SSH_LS_REMOTE_PATH have no effect in Lab. Remote windows may not show the Chinese UI. The usage plugin cannot read data on the host.

How It Works

  • Directories: on the host, Lab installs into ~/.agy-lab-hub-server, keeps its data in ~/.agy-lab/gemini, and stores sign-in credentials only in Lab's own location; the original app's ~/.antigravity-hub-server, ~/.gemini, and the account signed in there are left untouched. Global rules and Skills are symlinked to the original app's ~/.gemini copy on the host.
  • Token: other users on the host can also reach the forwarded port, so each host has its own random token. The token lives only in the remote language server's HTTP_PROXY environment variable (readable only by you and root), never in command-line arguments; locally it is stored encrypted in ssh-forwards.json in Lab's data directory. This computer only accepts Cloud Code requests that carry a valid token.
  • Check: each time the host starts a language server, it first runs a one-time check with curl or wget to confirm the port really leads to this computer; only then does the new server use the forward.

Optional: Chinese UI

The Chinese UI comes from antigravity-zh (MIT license) by the same author. This repository contains only the integration code without bundling its source code or glossary—simply point the build to a checkout of it. The build executes code in that directory, so verify the source is trustworthy before using a copy from elsewhere:

git clone https://github.com/Fanch-hui/antigravity-zh.git /path/to/antigravity-zh
python3 scripts/build_app.py --source /Applications/Antigravity.app --zh /path/to/antigravity-zh

The one-click installer embeds the localization project's src/, runtime/, and locales/ in the ZIP and asks whether to enable Chinese at install time; no checkout is needed. Pass --zh /path/to/antigravity-zh to use your own checkout instead, or --no-zh to turn Chinese off. The build runs the localization project's UI compatibility check first and stops if it fails; after a new version of Antigravity is released, wait until antigravity-zh supports that version before building with the Chinese UI. The translation script runs only after the main UI document is ready, opens no debugging ports, and does not affect built-in browser tabs.

Optional: Context & Usage Panel

agy-context-speed is an Antigravity side-panel extension by the same author that shows context usage, generation speed, cache hits, and usage statistics. Its install script targets the original app; because Lab's data directory is separate, this repository provides plugins/agy-context-speed.lab.patch so the extension reads only Lab's own sessions and adds third-party model statistics (current session, this week, and this month usage plus equivalent API cost estimates—not subscription billing). The patch corresponds to upstream commit d4344b1:

git clone https://github.com/Fanch-hui/agy-context-speed.git
cd agy-context-speed
git switch --detach d4344b1
git apply -p1 /path/to/agy-lab/plugins/agy-context-speed.lab.patch

Then, with Lab completely quit, manually install it into Lab's data directory (~/Library/Application Support/AGY Lab/gemini/config on macOS, %APPDATA%\AGY Lab\gemini\config on Windows, or ~/.config/AGY Lab/gemini/config by default on Linux):

  1. Copy plugin.json, sidecars/, and README.md to plugins/agy-context-speed/ inside that directory.
  2. Add "sidecars": { "agy-context-speed/monitor": { "enabled": true } } to config.json in that directory (if sidecars already exists, add only that entry).

Do not run the extension's own install script on the patched copy—it installs to the original app's ~/.gemini. After reopening Lab, open the panel from ⋮ → Extensions → Context & Speed in the top-right corner of a conversation. Data from WSL sessions lives inside the distro and cannot be read by the panel.

Verification & FAQ

  • npm test runs the automated tests and does not require an Antigravity package or real accounts. The local HTTP server used in tests needs access to 127.0.0.1. Real sign-in, UI behavior, and Orchestrator handoff require manual verification.
  • python -m unittest discover -s test -v runs the Python unit tests, including PE/ELF patching and build input validation, without requiring a real installer or PowerShell.
  • Build fails after upgrading the original app: This project validates against supported versions, input hashes, and patch anchors, and does not guarantee compatibility with newer versions. Use a supported version or wait for updates rather than bypassing verification.
  • macOS reports that the app cannot be verified: Lab is a locally built, ad-hoc signed copy rather than a Google-signed or Apple-notarized release. Confirm you trust the source files and build process first, then follow the macOS prompts; do not disable system-wide security checks.

Community

Join the LINUX DO community to discuss usage, report issues, and share configurations.

License

This project's own source code is licensed under the MIT License. Antigravity, Electron, antigravity-zh, and agy-context-speed remain subject to their respective license terms.

Explore related projects

Loading…