Skip to content
    ↑↓ select↵ openesc close
    rasyidrafi

    Antigravity

    @rasyid_rafi/opencode-antigravity·v0.2.0·Model Providers

    OpenCode V2 provider adapter for Google's official Antigravity ACP server

    GitHub stars

    0

    Monthly installs

    0

    Composite score

    20.0

    Multi-signal model

    Last commit

    15 minutes ago

    2026-10-05

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@rasyid_rafi/opencode-antigravity@0.2.0"]
    }

    OpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    An OpenCode V2 provider plugin for Google's official Antigravity ACP server.

    OpenCode → loopback Anthropic Messages proxy → ACP JSON-RPC client →
    agy_acp_server.par
    

    Requirements

    • OpenCode V2 (tested against 2.0.22);
    • Google's agy CLI, already signed in to your personal Google account.

    The official server is listed in the ACP Registry.

    Install

    Install the plugin:

    opencode plugin add @rasyid_rafi/opencode-antigravity
    

    Or register it in ~/.config/opencode/opencode.jsonc:

    {
      "$schema": "https://opencode.ai/config.json",
      "plugins": ["@rasyid_rafi/opencode-antigravity"]
    }
    

    Select an Antigravity ACP model and send a message. No /connect, API key, or second Google sign-in is needed when the CLI is already authenticated. This also applies to OpenChamber.

    The plugin reuses an installed ACP server. If missing, the first request downloads Google's official ACP 1.3.0 server and companion automatically into $XDG_DATA_HOME/opencode-antigravity/acp-server-1.3.0/ (default: ~/.local/share/opencode-antigravity/acp-server-1.3.0/). The first request can take longer while downloading. Downloads support Linux, macOS, and Windows on x64/arm64. Google's archive URLs are taken from the ACP Registry; no system installer is needed.

    An explicit OPENCODE_ANTIGRAVITY_ACP_PATH takes precedence and is never replaced. Custom arguments can be supplied with OPENCODE_ANTIGRAVITY_ACP_ARGS as a JSON array; Linux defaults to ["--uid="].

    Authentication

    The plugin reuses the official CLI's existing OAuth login when it finds ~/.gemini/antigravity-cli/antigravity-oauth-token (or the equivalent path under GEMINI_HOME). It seeds the ACP server's local credential file so the first OpenCode request does not start a second browser login. Malformed ACP credentials are repaired and CLI account changes are picked up on the next worker. The CLI's original credential file is never modified. Credentials stay on the local machine and are not sent through the OpenCode proxy. The V2 integration automatically stores only a fixed local API marker (opencode-antigravity-local); Google credentials remain in the official ACP server's local auth store.

    Existing non-personal ACP authentication is preserved. Advanced users can select oauth-business, gemini-api-key, or agent-platform through the official ACP server; OPENCODE_ANTIGRAVITY_ACP_AUTH_METHOD remains an optional override.

    Configuration

    Variable Purpose
    OPENCODE_ANTIGRAVITY_ACP_PATH ACP server executable path
    OPENCODE_ANTIGRAVITY_ACP_ARGS JSON array of ACP server arguments
    OPENCODE_ANTIGRAVITY_ACP_AUTH_METHOD ACP authentication method
    OPENCODE_ANTIGRAVITY_ACP_PERMISSION=allow-always|allow-once|deny Automatic ACP permission response; default allow-always
    OPENCODE_ANTIGRAVITY_MODE=plan|accept-edits ACP session mode when advertised
    OPENCODE_ANTIGRAVITY_PROXY_PORT Loopback proxy port; default ephemeral
    OPENCODE_ANTIGRAVITY_DATA_DIR Session metadata and request replay directory
    OPENCODE_ANTIGRAVITY_DEBUG=1 Metadata-only debug logging
    OPENCODE_ANTIGRAVITY_MAX_REQUEST_BYTES Maximum request size
    OPENCODE_ANTIGRAVITY_REQUEST_READ_TIMEOUT_MS Timeout while reading an HTTP request
    OPENCODE_ANTIGRAVITY_SSE_HEARTBEAT_MS Loopback SSE heartbeat interval
    OPENCODE_ANTIGRAVITY_TURN_STALL_MS Idle timeout after the last ACP session update
    OPENCODE_ANTIGRAVITY_PRINT_TIMEOUT_MS Setup/request timeout, not a streamed-turn limit
    OPENCODE_ANTIGRAVITY_IDLE_WORKER_MS Idle session cleanup interval
    OPENCODE_ANTIGRAVITY_MAX_SESSIONS Maximum concurrent ACP sessions
    OPENCODE_ANTIGRAVITY_MAX_QUEUE Maximum queued turns per session
    OPENCODE_ANTIGRAVITY_HISTORY_MAX_CHARS Maximum host conversation history size
    OPENCODE_ANTIGRAVITY_UTILITY_MAX_CHARS Maximum prompt size for utility requests

    Active turns do not have a default wall-clock limit. They time out only after OPENCODE_ANTIGRAVITY_TURN_STALL_MS has elapsed since the last ACP session/update. OPENCODE_ANTIGRAVITY_PRINT_TIMEOUT_MS covers setup RPCs and does not cut off an actively streaming turn.

    Code that creates an ACP worker may set onActivity?: () => void in AcpWorkerOptions. The callback runs for each accepted ACP session/update during an active turn. It is a heartbeat signal, not a completion callback. Active turns use this idle timeout behavior rather than a wall-clock deadline, so a stream can run as long as it keeps sending updates.

    Supported input

    ACP text, image, and audio blocks are supported. Images and audio may be sent as base64 data URLs or local files inside the configured workspace. Remote URLs, PDFs, and video are rejected.

    The provider reports native ACP image/audio input capability. Antigravity tool activity is streamed as reasoning/status content because OpenCode's ordinary provider tool loop is separate from the ACP agent tool loop.

    Filesystem requests are restricted to the configured workspace. Terminal requests use sanitized environment variables and are controlled by the ACP permission policy. The adapter is not an operating-system sandbox.

    Sessions and retries

    The adapter records requests before sending prompts to ACP. A repeated completed request replays the saved response. A request that failed or was interrupted after submission is rejected on retry; send a new message to continue. OpenCode V2's model.request hook does not expose a message ID, so V2 requests use a hash of the normalized conversation and current prompt as their replay identity. Identical retries are protected; a changed request body cannot use a host message ID to recover the previous receipt. Transient V2 generate requests use disposable ACP workers and never join the primary chat's persistent ACP session.

    Session turns and metadata updates use local process locks. Another OpenCode process cannot run a turn in the same session while one is active.

    OPENCODE_ANTIGRAVITY_DATA_DIR defaults to $XDG_DATA_HOME/opencode-antigravity, or ~/.local/share/opencode-antigravity. It contains sessions.json and request receipts under requests/. Completed receipts include response events, including text, reasoning, and tool activity, up to 2 MB per request. Larger responses retain a completion marker and reject retries instead of executing again. Directories use mode 0700 and files use 0600 on POSIX filesystems. Request receipts remain after idle session metadata is pruned. Deleting them removes retry protection for those requests.

    Local endpoints

    • GET /health;
    • GET /v1/models;
    • GET /v1/usage;
    • POST /v1/messages.

    Requests require the loopback marker x-api-key: opencode-antigravity-local.

    Tests

    npm run check
    

    The test command requires Bun 1.3 or newer.

    The live test requires an authenticated official ACP server:

    OPENCODE_ANTIGRAVITY_ACP_LIVE=1 \
    OPENCODE_ANTIGRAVITY_ACP_PATH=/absolute/path/to/agy_acp_server.par \
    OPENCODE_ANTIGRAVITY_ACP_AUTH_METHOD=oauth-personal \
    npm run test:live
    

    Review Google's current terms before using subscription authentication through a third-party host.

    Similar plugins