A lightweight Mobile Interface for the Antigravity Agent. Chat with your AI agent from your couch, verify tasks, and "poke" it to wake up—all from your phone.
- 📱 Premium Mobile Workspace: A glassmorphic dark-themed dashboard that feels native on your phone, complete with tabbed navigation.
- 🧠 MemFlow Integration (CPUcoin Edition): Tightly integrated with CPUcoin's MemFlow system (currently in development) acting as a highly reliable, persistent communication bus.
- 🎯 IDE-Independent & Headless: Zero reliance on third-party IDEs, accessibility permissions, or UI automation. Works purely via local SQLite.
- 🩸 Persistent Polling: Automatically polls the MemFlow outbox, ensuring agent messages are never lost and delivered to your phone reliably.
- 🔒 Secure Remote Access: Built-in support for Tailscale with automatic HTTPS Let's Encrypt certificate provisioning.
- 🔌 MCP Integration: Includes
memflow_inboxandmemflow_replyMCP tools so any AI agent can connect to your mobile stream seamlessly.
ag_bridge is designed to be fully modular and supports routing to multiple IDEs and agents through its connectors/ directory.
- MemFlow (Primary): Uses
better-sqlite3to interact with CPUcoin's MemFlow infrastructure (~/.memflow/memflow.sqlite) for reliable, headless communication. - Antigravity IDE (Fallback): Connects via Chrome DevTools Protocol (CDP) or AppleScript to track active workbench instances and inject remote keystrokes if MemFlow is unavailable.
- (Coming Soon): VibeCraft, Maitrix
To add a new connector, create a file in connectors/ that exports getTargets() and poke(). Register the plugin in connectors/index.mjs to automatically enable scanning and routing.
Phone <-> Bridge Server <-> MemFlow (SQLite) <-> MCP Agent Tools <-> Any Agent
(See Architecture for details).
- Node.js: v18+
- MemFlow: Local installation of CPUcoin MemFlow (creates
~/.memflow/memflow.sqlite) - Network: Local Wi-Fi OR Tailscale for zero-config remote access.
npm install
npm startYou will see a Pairing Code, local IP address, and (if Tailscale is active) a secure HTTPS link.
- Go to the URL provided in the console (e.g.,
https://<tailnet-name>.ts.net/). - Enter the Pairing Code.
- Select your active Workspace and chat away!
AG Bridge supports two distinct ways to route Agent responses back to your mobile device:
-
MemFlow MCP Tools (Recommended) If you configure your agent to use the included
ag-bridge-mcptools (by addingmcp-server.mjsto your agent's tool configuration), the agent can natively read your messages and write replies directly to the MemFlow Outbox database. This works entirely headless and is extremely reliable. -
Chrome DevTools Protocol (Fallback) If you rely on the legacy
antigravity.mjsconnector, AG Bridge uses an AppleScript fallback to type your mobile messages into the correct Antigravity Desktop window. While this guarantees your messages are delivered reliably, AppleScript is blind—it cannot read the AI's replies back out of the chat window. To get legacy two-way sync, you must launch the Antigravity Desktop App (or Antigravity IDE) with the Chrome DevTools Protocol (CDP) port open. This developer mode is ONLY required if you are relying on the legacy AppleScript fallback mode (it is not needed for the MemFlow MCP integration).To launch in dev mode, you can use the terminal:
# For Antigravity open -a Antigravity --args --remote-debugging-port=9000 # For Antigravity IDE open -a "Antigravity IDE" --args --remote-debugging-port=9000
(You can also use ports 9000, 9001, 9002, or 9003. The bridge scans these automatically to read the chat history DOM). You can create an Automator/AppleScript app (e.g.,
Antigravity-Debug.appandAntigravity IDE-Debug.app) to run these commands for convenience.
AG Bridge is designed with first-class Tailscale integration for secure remote access:
- Auto-HTTPS: When you run
npm start, the bridge automatically detects Tailscale and runstailscale serve --bg 8787to provision a secure Let's Encrypt SSL certificate. - Requirements: You must enable HTTPS and "Serve" in your Tailscale Admin Console.
- Security: The connection is completely encrypted end-to-end. There are no open ports on your router, and the web interface requires an initial Pairing Code on first connect.
To run the test suite locally:
npm test(Runs unit tests and smoke tests via Vitest)
To scan for repo hygiene issues:
npm run check:bidi(Scans for hidden Unicode characters)
CI: GitHub Actions automatically runs these tests on every Pull Request.
MIT. Built for the Antigravity community.
See CONTRIBUTING.md.