Google Antigravity Multi-Instance Communication
A comprehensive technical architectural investigation detailing how multiple Google Antigravity instances (equipped with remote control daemons / agy --remote-control) can discover, talk to, coordinate tasks with, and steer each other across machines.
Executive Architectural Takeaway
Binary disassembly of ~/.local/bin/agy confirms that Google built a complete WebRTC peer-to-peer data channel mesh into the Antigravity daemon (MeshDaemon, InitiateMeshSession, ProxyCommand). However, in current production builds, server-side Mendel configuration flags disable direct P2P mesh connections (WebRTC P2P mesh disabled by flag; using WebChannel transport only), forcing cloud traffic through an outbound HTTPS relay at jetski-webchannel.googleapis.com:443.
To achieve high-performance, autonomous, and reliable multi-agent swarms across your fleet (e.g. dell5040 server + laptops + cloud VMs), explore the five dedicated method pages below.
Explore the 5 Solutions (Dedicated Pages)
Native Cloud Remote Control & Mesh
Deep analysis of agy-daemon, server.go, and WebChannel streaming. Explains how Antigravity connects to Google's cloud plane, why P2P WebRTC is currently flag-gated off, and how instances proxy commands.
Programmatic AgentAPI, SDK & Sidecars
The official CLI/SDK IPC pipeline. Details agy agentapi send-message for reactive wake-up, new-conversation for isolated tasks, Python SDK harnesses, and persistent sidecar listeners.
Networked Model Context Protocol (MCP) Bus
Connecting multiple Antigravity instances to a shared FastMCP server over SSE/HTTP backed by Redis. Provides mailboxes, cluster presence, and distributed CAS/Redlock locks to prevent file collisions.
Tailscale WireGuard Mesh + NATS JetStream
The enterprise-grade standard. Combines zero-trust WireGuard mesh networking (sub-millisecond wire speed, automatic NAT traversal) with NATS JetStream durable consumer groups and at-least-once task delivery.
Multi-Agent Fleet Cockpits (AgentsRoom)
Local-first fleet management via AgentsRoom and Antigravity Web UI. Implements isolated Git worktrees to allow 10+ concurrent agents to edit code without Git lock collisions, with mobile steering and webhooks.
Deep Comparative Analysis & Decision Tree
Direct side-by-side scorecard comparing all 5 solutions across latency, throughput, setup overhead, zero-trust security, and failure modes, complete with an interactive architectural decision tree.
Quick Architecture Reference Table
| Method | Primary Transport | Latency | Reactive Wakeup | NAT / Firewall | Best Fit |
|---|---|---|---|---|---|
| 1. Native Remote Control | HTTPS :443 WebChannel (Relay) | 100–300ms | Semi-Auto | Google Relay | Web browser steering of headless daemons |
| 2. Programmatic AgentAPI | SSH / Local UNIX Socket / HTTP | <5ms LAN | Full (`send-message`) | Requires SSH / VPN | Deterministic script/pipeline automation |
| 3. Networked MCP Bus | Streamable HTTP / SSE / WebSocket | 10–30ms | Poll / Hybrid | Standard HTTP / Proxy | Heterogeneous agents sharing mailboxes & locks |
| 4. Tailscale + NATS | WireGuard UDP + NATS JetStream | <1ms LAN | Full (Consumer Group) | 100% Auto (STUN/DERP) | Production swarms requiring durable queues |
| 5. Fleet Cockpits | Local-first E2EE WebSocket Relay | 50–100ms | Webhooks / CI | Built-in E2EE Relay | Dev teams needing mobile UI & Git worktrees |