← Catalog

@ackneal/pi-agy-bridge

Use Antigravity models in Pi via Google's official ACP server, with native Pi tool and extension support.

Extension

Install

Install with PiG

pig install npm:@ackneal/pi-agy-bridge

Install with Pi

pi install npm:@ackneal/pi-agy-bridge
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./src/extension/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.7.0 (README.md). PiG does not review it.

pi-agy-bridge

Platform Pi Extension License: MIT

Use Antigravity models in Pi without changing how Pi works.

The bridge connects Antigravity models to Pi Coding Agent. Pi manages the conversation and executes registered tools.

The bridge supports two drivers:

  • Antigravity ACP (acp): Connects to the standalone Antigravity ACP server managed by the bridge.
  • Antigravity CLI (cli): Connects to the user-installed Antigravity CLI through agy acp --stdio.

Both drivers communicate over the Agent Client Protocol (ACP). Each driver uses its own runtime, model catalog, and capabilities.


Architecture

Pi runs the agent. Antigravity provides the models.

Pi Coding Agent
  |  Prompts and session context
  v
pi-agy-bridge
  |  ACP protocol
  +-- acp: Antigravity ACP (managed ACP server)
  |
  +-- cli: Antigravity CLI (installed `agy` CLI)
  |
  v
Antigravity models
  |
  |  Tool requests
  v
Local MCP bridge
  |
  v
Pi tools -> Results return to the model

Features

  • Native Pi Experience — Keep Pi tools, extensions, skills, and session history. Tool requests run through Pi with its applicable permissions.
  • Native Tool Limits — Limit Antigravity's native tool capabilities so supported tool requests run through Pi.
  • Two Drivers, One Protocol — Choose Antigravity ACP or Antigravity CLI. Both drivers communicate over the ACP protocol.
  • Session Continuity — Reuse compatible sessions. Restore context from Pi history when needed.
  • Image Support — Read images through Pi tools. The ACP driver also supports automatic image loading and uses an observer for offloaded images.
  • Automatic ACP Setup — Download and verify the pinned ACP server.
  • Diagnostics — Check your setup with /agy-bridge:doctor. The CLI driver also reports account quotas.

Requirements

RequirementDetails
Operating SystemmacOS or Linux. Native Windows is not supported.
Pi Coding Agent@earendil-works/pi-coding-agent.
Antigravity ACP Driver (Default)The bridge automatically installs the pinned ACP server defined in src/extension/drivers/acp/registry.json.
Antigravity CLI Driver (Optional)Install agy at ~/.local/bin/agy or add it to your PATH. Tested with agy 1.5.16.

Quick Start

1. Install the Extension

Install the extension with Pi:

pi install npm:@ackneal/pi-agy-bridge

Or install it from GitHub:

pi install git:github.com/ackneal/pi-agy-bridge

2. Sign In

  1. Run:
    /login
    
  2. Select Antigravity [pi-agy-bridge] from the provider list.
  3. Complete sign-in in your browser.

Startup checks and diagnostics do not open a sign-in browser. Use /login to sign in.

3. Select a Model

  1. Open the model selector:
    /model
    
  2. Type agy to find Antigravity models. Available models depend on the selected driver.
  3. Select a model and start using Pi.

Command Reference

CommandDescription
/loginSign in to Antigravity through Pi.
/modelSelect an available Antigravity model.
/agy-bridge:driverChoose the ACP or CLI driver.
/agy-bridge:doctorCheck driver setup, authentication, and model discovery.

Driver and doctor results are user-only notifications, not model conversation messages. Without a UI, results are written to stderr.


How It Works

Choose a Driver

(blank)Antigravity ACP (acp, default)Antigravity CLI (cli, optional)
Backend processManaged Antigravity ACP serverUser-installed agy CLI (agy acp --stdio)
SetupInstalled and managed automaticallyInstall and maintain agy yourself
ModelsManaged ACP model catalogagy model catalog, including supported third-party models
Pi toolsThrough the Pi MCP bridgeThrough the Pi MCP bridge
Image readsPi tool reads, including observer-assisted offloaded imagesPi tool reads, including current-session artifacts
Automatic image loadingSupported for images referenced in user messagesNot provided by this driver
Usage informationModel token usageModel token usage and CLI quota information

Choose Antigravity ACP (acp) for automatic setup and automatic image loading. Choose Antigravity CLI (cli) if you use the installed agy CLI or need its third-party model catalog.

Use /agy-bridge:driver to switch drivers and /model to see available models. On startup, the bridge uses the driver recorded in its saved authentication. If no saved authentication or valid driver is present, it defaults to ACP.

Images: ACP uses an additional observer for offloaded images, which may add latency and model usage. Tool-based reads remain available for images in history and other locations.

Usage: Pi's standard usage display shows token usage and costs estimated from configured model prices, including overrides in models.json. Estimates do not represent AGY billing or quota consumption. For CLI account quotas, use /agy-bridge:doctor.

Sessions

The bridge reuses a native session when it matches Pi's history. If Pi branches or compacts a conversation, the bridge can rebuild the model context from Pi's saved messages.


Configuration

Environment Variables

VariableDescription
AGY_ACP_DIRAbsolute path to a complete ACP Server distribution directory instead of the managed version. Must contain executable agy_acp_server.par and localharness_external files.
AGY_BRIDGE_DEBUG=1Write diagnostic logs to stderr.
GEMINI_HOMESet the backend state directory. Default: ~/.gemini.

For a custom ACP distribution, keep both files in the same directory and set:

export AGY_ACP_DIR="$HOME/path/to/agy-acp-server"

Managed ACP Server Details

  • Platforms: macOS and Linux (x64 and ARM64).
  • Registry: Pinned version, download URLs, and checksums are defined in src/extension/drivers/acp/registry.json.
  • Storage: <Pi Agent Home>/pi-agy-bridge/acp/<archive-name>/ (typically ~/.pi/agent/pi-agy-bridge/acp/).
  • Verification: SHA-256 checksums are verified before extraction.

Troubleshooting

Run /agy-bridge:doctor to check the installation, connection, and sign-in status.

Common Problems

  • ACP download or extraction fails: Check your network, disk space, and permissions under ~/.pi/agent/. Downloads are about 93–307 MiB. Linux extraction can require about 1 GiB.
  • Signed out: Run /login and select Antigravity [pi-agy-bridge].
  • No models appear: Sign in and run /agy-bridge:doctor. When offline, the bridge can use a cached model catalog.
  • CLI driver unavailable: Install agy at ~/.local/bin/agy or add it to your PATH, then run /agy-bridge:doctor.
  • Custom ACP server fails: Check that AGY_ACP_DIR is an absolute directory path containing executable agy_acp_server.par and localharness_external files. Unset AGY_ACP_DIR to use the managed server.
  • Enable debug logs:
    export AGY_BRIDGE_DEBUG=1
    pi
    

Development

Use Bun to install dependencies. Use Node.js to run tests:

# Install dependencies
bun install

# Verify version alignment
bun run check:version

# Run TypeScript type check
bun run typecheck

# Run test suite
bun run test

ACP Registry Automation

.github/workflows/acp-registry.yml runs weekly on Mondays at 06:00 UTC and on manual workflow_dispatch to sync src/extension/drivers/acp/registry.json against upstream and open or update a single pull request on automation/update-acp-registry.

Required GitHub repository settings:

  1. Repository variable: Set ACP_REGISTRY_UPSTREAM_URL under Settings → Secrets and variables → Actions → Variables to the upstream registry JSON URL. If unset, scheduled runs skip without modifying files or creating a PR.
  2. Actions PR permission: Enable Allow GitHub Actions to create and approve pull requests under Settings → Actions → General → Workflow permissions so GITHUB_TOKEN can create and update pull requests.
  3. CI check approval: Pull requests created or updated with GITHUB_TOKEN create CI workflow runs in an Awaiting approval state. A maintainer with write access must select Approve workflows to run on the PR before required CI checks execute.