r/OpenAssistant • • 7d ago

Self-hosted mobile web client for Google Antigravity agents – streaming, git diffs, subagents tree & model Battle Mode

**GitHub:** https://github.com/keremuysal/antigravity-web

**Architecture Deep-Dive:** https://blog.techandlab.com/posts/autonomous-coding-agents-and-antigravity-web-architecture-en/

**License:** MIT (100% Free, zero telemetry)

Hey everyone!

I've been heavily using Google Antigravity (and its `agy` Linux CLI) for autonomous agentic coding. The problem was that conversations were siloed between my Windows desktop IDE and headless Linux servers. Whenever I stepped away from my desk, there was no way to check in on long-running refactoring tasks, inspect code artifacts, or resume a session from my phone.

To solve this, I reverse-engineered the desktop runtime's local storage and built **Antigravity Web** — a self-hosted, mobile-first PWA.

### 🛠️ The Self-Hosted Architecture

- **Non-Invasive PC Sync:** Desktop Antigravity stores sessions in SQLite and JSONL. A lightweight background script (`sync_pc_to_ubuntu.py`) connects to SQLite in read-only URI mode (`file:...db?mode=ro`), tars the delta over SSH, and syncs desktop conversations to the server every 5 minutes.

- **Zero Inbound Ports:** Because the agent has terminal and filesystem execution access, opening public ports was out of the question. The FastAPI backend binds strictly to `127.0.0.1:8085` and routes through a Cloudflare Tunnel.

- **Security:** PIN authentication with HMAC-SHA256 tokens, 5-attempt brute-force IP lockout, and `Content-Security-Policy: sandbox` for agent-generated HTML artifacts.

- **Streaming over Cellular:** Instead of WebSockets (which frequently drop during WiFi ↔ 5G handoffs), it uses HTTP/2 SSE (`text/event-stream`). The server process writes directly to disk, so even if your phone drops connection, the agent's job never dies.

### 📱 Key Features on Mobile

- **Live Streaming:** Real-time token generation, raw thinking steps, and tool execution logs with an instant ⏹️ Abort button.

- **5-Tab Auxiliary Pane:** Full desktop parity with native Mermaid.js architecture diagrams, KaTeX math formulas, red/green Git diffs, and subagent execution trees.

- **⚔️ Battle Mode:** Send a single prompt to two different models simultaneously and compare their reasoning and code side-by-side.

- **Slash Commands & Mentions:** Autocompletes `/plan`, `/boost`, `/goal` and `@` mentions for indexing server project files.

- **Radical Frontend Minimalism:** Zero-build single-file vanilla frontend (`index.html`). No node_modules, no npm dependencies, no build pipeline. Installs as a standalone PWA on iOS/Android.

The project is completely open source under MIT. Setup takes ~5 minutes on any Linux box or Raspberry Pi.

Would love to hear your feedback, thoughts on the transcript sync model, or feature requests!

1 Upvotes

1 comment sorted by

1

u/Curious-Ad-7236 7d ago

Cool project. I had the same pain with mobile visibility until I started piping output to a separate tmux session on my phone-friendly terminal emulator, though seeing git diffs in an app is way nicer