Skip to content

the-future-company/ag2r

Repository files navigation

Buy Me A Coffee

AG2R — Antigravity 2.0 Remote

A lightweight mobile remote interface for monitoring and interacting with Antigravity AI coding sessions from your phone — on Wi-Fi, hotspot, or anywhere in the world.

AG2R Chat
Live Chat
AG2R Code Review
Code Review
AG2R Comments
Commenting
AG2R Overview
Overview
AG2R Push Notifications
Notifications
AG2R Subagent View
Subagents

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • Antigravity launched with CDP enabled: open -a Antigravity --args --remote-debugging-port=9000

Setup

git clone git@github.com:the-future-company/ag2r.git
cd ag2r
npm install
cp .env.example .env
node server.js

That's it — AG2R is running on https://localhost:3000. On first run, a self-signed SSL cert is generated in certs/.

By default auth is off — no login needed. This is fine for local use. If you're exposing AG2R to the internet (see below), you must set a password first.


🌐 How to Connect

Option 1: Local Network (Same Wi-Fi)

No extra setup — just start the server and open it on your phone.

  1. node server.js
  2. Open https://<your-computer-ip>:3000 on your phone
  3. Accept the self-signed certificate warning

No password needed for local-only use. Your phone must be on the same Wi-Fi as the computer.


Option 2: Remote Access (Any Network)

Use a Cloudflare tunnel to access AG2R from anywhere — no port forwarding needed.

Warning

Set a strong password before exposing AG2R to the internet. Edit .env:

AUTH_ENABLED=true
APP_PASSWORD=your-strong-password-here
SESSION_SECRET=$(openssl rand -hex 24)

Step 1 — Start the tunnel (gets you a public URL):

brew install cloudflared
cloudflared tunnel --url https://localhost:3000 --no-tls-verify

Cloudflared prints a URL like https://random-words.trycloudflare.com.

Step 2 — Add the URL to .env so push notifications work:

TUNNEL_ENABLED=true
TUNNEL_URL=https://random-words.trycloudflare.com   # ← paste your URL here

Step 3 — Start AG2R:

node server.js

Open the tunnel URL on your phone. The URL changes each time you restart the tunnel.

Stable URL with your own domain (optional)

If you have a domain on Cloudflare, you can set up a permanent tunnel so the URL never changes:

cloudflared tunnel login
cloudflared tunnel create ag2r
cloudflared tunnel route dns ag2r ag2r.yourdomain.com

Create ~/.cloudflared/config.yml:

tunnel: <TUNNEL_ID>
credentials-file: ~/.cloudflared/<TUNNEL_ID>.json

ingress:
  - hostname: ag2r.yourdomain.com
    service: https://localhost:3000
    originRequest:
      noTLSVerify: true
  - service: http_status:404

Set TUNNEL_URL=https://ag2r.yourdomain.com in .env, then run node server.js and cloudflared tunnel run ag2r in separate terminals.


📱 Features

Real-time Chat Monitoring

See Antigravity's responses as they stream in real time. Code blocks, markdown, and all formatting render on your phone exactly as they appear on desktop.

Real-time chat monitoring


Permission Handling

Approve, deny, or skip permission requests remotely. Select an option, hit Submit, and the agent continues — no need to walk back to your computer.

Permission banner on mobile     Permission dialog on mobile


Code Review

Review file changes directly on your phone. See diffs, browse modified files, and navigate between Overview and Review tabs.

Review changes file list     Code diff view

---

Commenting

Select text on any document, leave comments with context, and queue them for batch sending. Comments capture the selected text as a quote and your annotation.

Add Comment dialog     Queued Comments modal


Sidebar Navigation & Overview

Switch between conversations, browse files changed, artifacts, and background tasks — all from the sidebar and overview panel.

Sidebar conversation list     Overview panel


Desktop & Tablet Support

AG2R Review Changes — Desktop

AG2R Chat — Desktop

AG2R Permission Dialog — Desktop

Compatible with tablets or desktops as well


Push Notifications

Get notified on your phone when the session needs permission approval — even with the app in the background. Tap the notification to jump straight to the pending request.

Push notification on Android

Note

iOS: Push notifications require the PWA to be installed to your home screen (iOS 16.4+). Open AG2R in Safari, tap Share → "Add to Home Screen."

Android: If Chrome doesn't prompt for notifications, go to Chrome Settings → Site settings → Notifications and set "How to show requests" to "Expand all requests". Then reload the page and tap anywhere to trigger the prompt.


More Features

  • Send messages — type and send messages to the AI from your phone
  • Voice input — dictate messages using your phone's microphone
  • Stop generation — cancel a running generation with the stop button
  • Auto-reconnect — seamless reconnection when connection drops
  • Cookie-based auth — enter passcode once, stays logged in for 30 days

🐛 Debug Mode

Start the server with AG2R_DEBUG=1 to enable verbose logging:

AG2R_DEBUG=1 node server.js

When active, key client events (message sends, click proxying, WebSocket lifecycle) are relayed to the server and printed as a unified timestamped log stream:

[2026-06-14T00:30:00.000Z CLIENT] sendMessage-entry isSending=false text="fix the bug" images=0
[2026-06-14T00:30:00.500Z SERVER] Click Proxying click id=chat:5 label="Undo"
[2026-06-14T00:30:01.200Z CLIENT] sendMessage-exit

Useful for diagnosing mobile-specific bugs (double-submission, click failures) where you can't see the browser console.


🔄 Keep It Running (Optional)

If you have a dedicated tunnel with a stable URL, cron-based watchdog scripts can keep AG2R and the tunnel alive and auto-update from origin/main. See scripts/ for the available watchdogs (main-watchdog.sh, tunnel-watchdog.sh).


🤖 For AI Agents

Start with ONBOARDING.md for the full technical reference (architecture, file maps, workflows). Your behavioral rules are in GEMINI.md.

📊 Telemetry

AG2R collects anonymous usage metrics (feature counts, crash reports — no personal data) to help improve the project. Set AG2R_TELEMETRY=false in your .env to disable.

License

MIT — see LICENSE for details.

About

AG2R — Antigravity 2.0 Remote. A lightweight, Android-friendly, remote client for monitoring and interacting with Antigravity 2.0.

Resources

License

Stars

Watchers

Forks

Contributors