@3d24rd0/pi-antigravity-bridge

Antigravity's models in Pi, through Google's own agy CLI and ACP server: no reimplemented API, no impersonated client. Pi's tools reach the model, so it works in your repo. Subscription, no API key.

Packages

Package details

extension

Install @3d24rd0/pi-antigravity-bridge from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@3d24rd0/pi-antigravity-bridge
Package
@3d24rd0/pi-antigravity-bridge
Version
1.3.1
Published
Nov 5, 2026
Downloads
332/mo · 332/wk
Author
3d24rd0
License
MIT
Types
extension
Size
1 MB
Dependencies
1 dependency · 4 peers
Pi manifest JSON
{
  "image": "https://cdn.jsdelivr.net/gh/3d24rd0/antigravity-bridge@main/assets/logo-1024.jpg",
  "extensions": [
    "./src/entry.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README


What it does

Pi speaks to models. Antigravity only speaks through its own CLI and its own protocol. This package puts a provider in between:

   Pi  ──▶  Antigravity Bridge  ──▶  agy CLI  /  ACP server  ──▶  Google
             │
             └──◀ Pi's tools, served over a localhost MCP bridge
  • Two engines, chosen by the model name. -acp drives Google's official ACP server (images, native diff cards); -cli drives the stream-json agy CLI.
  • Pi's tools work. The model reads files, edits, runs commands and delegates to subagents through a localhost bridge — with real Pi cards, not text dumps.
  • No API key. It rides the Antigravity CLI and server you already signed into. No per-token billing, no key to paste.

Install

Pi

pi install npm:@3d24rd0/pi-antigravity-bridge

Gentle Shell

gentle-shell install npm:@3d24rd0/pi-antigravity-bridge

Then restart. /agy joins the command list and antigravity/ models appear in /model.

pi install git:github.com/3d24rd0/antigravity-bridge

By hand, in ~/.pi/agent/settings.json (Gentle Shell: ~/.gentle-shell/agent/settings.json):

{ "packages": ["git:github.com/3d24rd0/antigravity-bridge"] }

Use it

1. Pick a model. /model → anything under antigravity/. The suffix picks the engine; Pi's thinking toggle picks the reasoning level.

Model Engine Input Best for
antigravity/gemini-4-argon-acp ACP text + image Deep reasoning, native diff cards
antigravity/gemini-3-8-flash-acp ACP text + image Low latency, light quota use
antigravity/gemini-4-argon-cli CLI text + image Same model, stream-json engine
antigravity/gemini-3-8-flash-cli CLI text + image Fast execution
antigravity/claude-sonnet-5-5-cli CLI text + image Balanced speed and quality
antigravity/claude-opus-5-5-cli CLI text + image Advanced Claude reasoning

Claude models are CLI-only: the ACP server rejects non-Gemini models. On the CLI engine the prompt carries text only, so an attached image is staged on disk and the model is pointed at it.

2. Check the wiring once.

/agy doctor     # driver state, CLI and server versions, paths, effective config
/agy quota      # what your subscription has left

3. Just talk. Provider turns, Pi tools, subagents and review all work. The first ACP turn downloads Google's server (~1.5 GB) and asks for a second Google sign-in — one time only, and the -cli models skip it entirely.

/agy

Bare /agy opens the settings menu. Every setting also exists as a subcommand, and Tab completes them:

/agy  doctor  auth  auth-manual  quota  clear  patch-cleanup
      mode  readonly  permissions  timeout  ask  stop  web  bridge  tools
      digest  system-prompt  model  thinking  agent
      tasks  artifacts  subagents  engine  acp-bin
/agy mode accept-edits|plan      # plan is refused, not faked (see Safety)
/agy readonly on|off             # refuse every provider turn
/agy permissions on|off          # native agy tool auto-approval
/agy timeout <1-1440|off>        # overall turn cap
/agy bridge all|mcp|none         # which Pi tools the model can call
/agy stop [runId-prefix]         # stop a running background AskAntigravity run
/agy tasks [tail <id>]           # background task logs of this conversation
/agy artifacts [open <n|name>]   # files this conversation produced or received

Background delegations

AskAntigravity is blocking by default. With background: true the call returns a bg_ run id at once and the detached agy -p keeps running: Esc does not kill it, and when it settles the full answer arrives as one message marked UNTRUSTED and carrying the conversationId resume handle. Up to four runs at a time, one per conversation, and /agy stop ends one (no argument = the only running one). A background run lives and dies with the Pi session: /new, /resume, /fork and /reload kill it silently, and print/json mode refuses it because the process exits before the answer could arrive.

Full reference, every flag and every environment variable: docs/how-it-works.md.

Safety, up front

  • agy runs its own tool loop and is not prompted by Pi by default. An Antigravity turn can execute commands and write files on this machine.
  • The approval gate is opt-in. AGY_APPROVALS=shadow routes mutating native tools through Pi's permission flow; headless sessions deny.
  • Read-only is enforced, never promised. Plan mode cannot be enforced upstream, so the bridge refuses provider turns instead of faking it. Use /agy readonly on, Pi's tool restrictions, or the gate.

Details and threat model: docs/how-it-works.md#safety.

Requirements

Pi Tested against 1.0+; peers are declared * (pi-coding-agent, pi-tui, pi-ai, typebox)
Node ≥ 22
Antigravity CLI agy, signed in once (required by the CLI engine and by AskAntigravity)
Google account with Antigravity access; ACP additionally asks its own sign-in

Development

git clone https://github.com/3d24rd0/antigravity-bridge
cd antigravity-bridge && npm install
npm run check      # tsc --noEmit + vitest

The package ships TypeScript and Pi loads it directly: no build step, so src/ is published as written. Pi finds the entry point through pi.extensions in package.json.

Acknowledgements

Based on the original extension by @EstebanForge. Licensed under MIT.