omp packages

pi-antigravity-thin-client0.6.0

Use Google Antigravity (agy acp) in Pi as a thin client: Antigravity stays the agent and Pi shows its work, including background tasks and subagents

GitHub Actions Published 3 days ago MIT ~1.7K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-antigravity-thin-client

Use Google Antigravity in Pi as a thin client. Antigravity (agy acp) stays the agent: it owns its sign-in, system prompt, tools, agent loop and conversation history. Pi is the frontend: it forwards prompts and shows what Antigravity does, including the work it does in the background between turns.

This is a fork of onprs/Pi-Antigravity-Bridge (pi-antigravity-bridge on npm). The fork removes everything that turns Antigravity into a raw model proxy for Pi's own agent loop or modifies Antigravity's local databases, and adds a display for Antigravity's background tasks, its own turns and its subagents.

[!WARNING] This package is not made, endorsed or supported by Google or by the upstream author. It follows Google's Antigravity Terms of Service and FAQ as updated on 1 December 2026 (see Staying within what Google allows), but Google can interpret or change its terms at any time. You use it at your own risk.

Staying within what Google allows

The goal of this package is to use an Antigravity subscription sign-in (oauth-personal, Google AI Pro or Ultra) only the way Google allows, and to give up any feature that does not fit.

The boundary it follows

On 1 December 2026, Google updated the Google Antigravity Additional Terms of Service and FAQ to state explicitly what is prohibited and what is permitted:

Do not abuse, harm, interfere with, or disrupt the Service. This includes, but is not limited to: (a) using entitlements or credentials (such as OAuth tokens) provided by the Antigravity service directly within third-party software, tools, or services outside the official Antigravity runtime; (b) modifying or bypassing the Antigravity runtime, or repurposing the Antigravity harness to act as a raw model proxy for an external agent loop or inference backend; or (c) sharing, pooling, or reselling individual entitlements across multiple users. However, running the unmodified Antigravity harness through its supported interfaces—such as wrapping it with a third-party UI (e.g., via agent client protocol), calling it as a tool or subagent from another harness, using the Antigravity CLI in headless mode, or configuring it through supported customization and extension mechanisms (such as custom agents, MCP servers, skills, rules, hooks, plugins, or supported prompt extensions)—is permitted. Violations may result in suspension of your Antigravity access with an appeal path for re-enablement. This will have no impact on your broader Google account.

How the package keeps to it

Condition What the package does
Unmodified agy acp with Antigravity's own sign-in Starts the installed agy acp. Sign-in runs in agy itself (/agy login starts agy acp --login); the package never reads, stores or forwards OAuth tokens.
Antigravity owns the system prompt Sends no system prompt, no workspace context, no AGENTS.md and no skills from Pi. Antigravity loads its own rules, skills and custom agents.
Antigravity owns the tools and agent loop The agy-tools mode is pinned: Antigravity runs its own tools and agent loop, and Pi mirrors the calls and shows approval dialogs. Pi's tools and MCP servers are never passed to it; Antigravity loads its own MCP servers. There is no /agy mode or /agy bridge, and the matching settings are ignored.
Antigravity owns the session history Never replays earlier conversation, compaction summaries or another model's history, and never writes Antigravity's conversation databases. To continue a conversation, Pi reopens it in agy with ACP session/resume, which the ACP docs describe as "reopens the conversation without replaying its history". After a model switch, compaction or branch navigation, start a new Pi session.
Not a raw inference backend Refuses stateless auxiliary requests from Pi (compaction summaries, titles, recaps, uncached or toolless one-off completions) and requests without a new prompt, so the package never makes up a prompt such as "Continue.". An empty quota fails as Antigravity quota exceeded (429), which Pi does not auto-retry.
Interactive and headless use Wrapping the unmodified harness via ACP, headless use, and calling it as a tool or subagent from another harness are permitted by the terms. The package therefore works both interactively in Pi and headlessly (pi -p, RPC, subagents, workflows, /goal and extensions). In headless runs, actions that require interactive approval fail unless allowed by Antigravity's execution mode or permission rules.

Turns that Antigravity takes on its own (after a background task, a timer or a subagent) are Antigravity's own feature. The package only shows them; the display reads Antigravity's local files and sends nothing.

The rules live in src/thin-client-policy.ts. test/thin-client-policy.test.ts and the thin-client cases in test/turn-coordinator-e2e.test.ts check them in CI on every change.

What it cannot promise

  • Google decides. Google can interpret its terms differently or change them at any time. Under the current terms, violations may suspend Antigravity access (with an appeal path for re-enablement) and have no impact on your broader Google account.
  • Not a raw model API. If you want to drive an external agent loop (such as Pi with its own tools) directly against Gemini models outside Antigravity, Google recommends a Gemini API key from Google AI Studio or Gemini Enterprise Agent Platform (FAQ, ACP authentication).
  • Without a third-party wrapper: use Antigravity itself or an ACP client Google names in its docs, such as Zed, JetBrains IDEs, Android Studio or Xcode.

If Google publishes a different boundary, the package will follow it. Please open an issue with the source.

Requirements

  • Pi 1.6 or newer
  • Node.js 22.19 or newer (the minimum of Pi 1.6 itself)
  • Antigravity CLI (agy) 1.5.10 or newer on PATH, signed in (agy acp --login). Set PI_AGY_BIN (or agyBin in antigravity.json) if agy is somewhere else. A path set there must be an executable file: when it is not, the package reports an error and does not look for another agy.

Install

pi install npm:pi-antigravity-thin-client

Do not install it together with pi-antigravity-bridge. Both register the same antigravity provider and the /agy command; remove the original first (pi remove npm:pi-antigravity-bridge).

Use

  1. Start a new Pi session (/new) for each Antigravity conversation.
  2. Select an antigravity/… model before the first message (/model or Ctrl+P, or --model antigravity/… in headless runs).
  3. Send your prompts (interactively, via pi -p, RPC, subagents, workflows, /goal, or extensions).

Continue a conversation

  • A Pi session: open it again (/resume, pi --continue) and send the next prompt. Pi reopens the same Antigravity conversation with session/resume and sends only the new prompt; nothing goes out before that. Turns Antigravity took on its own after your last prompt stay part of the conversation.

  • A conversation from agy or another ACP client: /agy sessions lists Antigravity's conversations for the current directory. The one you pick opens in a new Pi session: session/load shows its history in Pi, and your next prompt continues it with session/resume.

  • After a quiet while: when a Pi session has been quiet for 30 minutes, the package stops its agy acp process, and the next prompt continues the conversation in a new one, as after a Pi restart. Long-running agy processes otherwise keep outdated sign-ins of Antigravity's MCP servers in memory, and servers that rotate refresh tokens sign everyone out when such a token comes back. The package does not stop a process while a turn runs, while Antigravity has a background task, timer or working subagent, or when the last turn ended without an answer (stopped or failed). Set idleReleaseMinutes in antigravity.json (or PI_AGY_IDLE_RELEASE_MINUTES) to change the time; 0 keeps the process running.

Continuing works only from the latest message. If the Antigravity conversation got further prompts after the point Pi shows (from a later message on another branch after /tree, a forked Pi session or another client), the package refuses the prompt: Antigravity cannot go back without rewriting its history. If the conversation is gone, it refuses too, because the only way out would be to replay Pi's history.

/agy status shows the backend state; /agy login and /agy logout manage the Antigravity sign-in. /agy agent-mode switches Antigravity's own execution mode (default, accept-edits, plan, auto).

Settings live in antigravity.json in Pi's agent directory (and in .pi/antigravity.json of a trusted project). When such a file is not valid JSON, its settings are ignored and the defaults apply: Pi warns at session start, /agy status names the file, and /agy agent-mode changes the mode for the session without overwriting the file.

There is no way to use anything but Antigravity's own tools: upstream's /agy mode and /agy bridge do not exist here, and its tool-mode and bridge settings (toolMode, bridgePiMcp, bridgePiSkills, bridgePiAgentsMd in antigravity.json, PI_AGY_TOOL_MODE, PI_AGY_BRIDGE_*) are ignored.

What it shows

The screenshots show Pi with this package; a scripted stand-in plays Antigravity (see Details).

Background tasks

Antigravity moves long commands and schedule timers into background tasks. A widget above the editor lists each running task with its run time, the last line of its log or the timer countdown. The footer shows agy ⏳ <count>.

A background task: the widget above the editor shows the task's run time and the last line of its log

A schedule timer: the widget counts down the seconds left

Turns Antigravity takes on its own

When a background task, a timer or a subagent finishes, Antigravity wakes up and continues without a prompt from Pi. The widget shows such a turn live (current tool, last line of the answer). When it ends, a card "Antigravity · on its own" shows what woke Antigravity, the model of that turn and its tool calls; the answer follows below the card like any other answer. The card is stored in the Pi session but is never sent to a model.

Antigravity continues on its own after the background task finished: the widget shows the tool it runs

The card for the finished turn names the finished task and the model; Antigravity's answer follows below it

Subagents

The invoke_subagent tool card names the subagent's role, model with reasoning level, and task. The widget lists each running subagent with the model and reasoning level it runs on and what it does right now. When a subagent reports back, Antigravity wakes up, and the card of that turn shows the subagent's role and message.

Two subagents: their tool cards, and the widget with model, reasoning level and current tool of each

The subagents' reports wake Antigravity up; each turn gets its own card

Messages typed while Antigravity works

They do not cancel the running Antigravity turn, because a cancel would also stop its background tasks and subagents. The message waits and goes out as the next prompt when the turn ends. Esc still cancels.

A message typed during a running command waits in Pi's queue

The message went out after the turn ended, and Antigravity answers it

Details

The display reads Antigravity's local conversation files (~/.gemini/antigravity-cli/brain/<id>/.system_generated/) and the updates Antigravity sends over ACP. It never sends anything to Antigravity.

PI_AGY_TRACE=1 (or a file path) writes every session/update from Antigravity to a local JSONL file, for debugging.

All interface texts are in English. Upstream's texts were Chinese and are translated here; source comments from upstream stay Chinese.

node scripts/screenshots/capture.mjs takes the screenshots again. It runs Pi with this package against a scripted stand-in for agy (scripts/screenshots/mock-agy.mjs) in a temporary home, so nothing reaches Antigravity. It needs pi and tmux, and resvg with fixed fonts for the PNG files (through nix when they are not on PATH).

npm run test:e2e-resume checks continuing a conversation and headless mode in the real Pi: pi --continue after Antigravity worked on its own, a forked Pi session that must refuse, /agy sessions, the next prompt after stopping or failing a turn in which agy already ran a tool, and a headless pi -p run. It runs against its own stand-in for agy (scripts/e2e/mock-agy.mjs) in a temporary home whose PATH has no other agy, and checks every ACP request the stand-in got. It needs pi and tmux.

Upstream

The upstream README (Chinese) and changelog are in docs/upstream/; the upstream design notes in docs/DESIGN.md describe all modes, including the ones this fork disables. Upstream tests for disabled features are skipped (test/thin-client-skip.ts).

Each fork release names its upstream base in the changelog. RELEASE.md describes how upstream changes are merged and how releases are published.

License

MIT. Copyright (c) 2026 onprs and Patrick Wozniak. See LICENSE.