Nick Meslovich / Products / Gravitas
# Gravitas
Gravitas is an unofficial, pure Go, zero-dependency installable Progressive Web App (PWA) frontend for Google Antigravity (`agy`). It is not affiliated with, endorsed by, or supported by Google; "Antigravity" and "Google" are trademarks of Google LLC. Built exclusively with the Go 1.24 standard library (`net/http`, `os/exec`, `embed`, `crypto/hmac`, `crypto/sha256`, `crypto/subtle`, `encoding/json`) and embedded vanilla ES2020/CSS3 assets.
## Highlights
- **Pure Go Standard Library**: `go.mod` has zero external dependencies (`module gravitas`, `go 1.24`). All static web assets are compiled into a single self-contained binary via `//go:embed web/*`.
- **1-Month Remembered Sign-In**: Presenting the access token once at login (`/#token=…` or in the sign-in modal) exchanges it at `POST /api/unlock` for an `HttpOnly; SameSite=Strict` HMAC-SHA256 signed cookie (`gravitas_session`) valid for **30 days** by default (configurable from 1 to 365 days in Settings → Preferences). Includes a 10-attempt / 5-minute per-IP brute-force throttle, shared with header-token API access, (`429 Too Many Requests` + `Retry-After`).
- **Full Antigravity ACP + Multi-Chat Concurrency**:
- **Simultaneous Multi-Chat**: Switch conversations, open new chats, or run many chats in parallel on the same `agy acp` bridge without waiting for active turns to finish. Each conversation maintains its own independent model, execution mode, thinking level, token/context usage, working folder, draft text/attachments, and streaming turn state.
- **Live Background Status & Active Tab Strip**: A dedicated **Running now** sidebar section (with elapsed timers, live tool activity, and inline Stop buttons), a quick-switch **Active Chats** tab bar, mobile running badges, background completion toasts, and a one-click **Switch & review** banner whenever a background chat requests tool approval or input.
- Persistent `agy acp` JSON-RPC 2.0 bridge with serialized startup, transport auto-recovery, per-session stream multiplexing, live `/api/events` per-turn sequence-replayed SSE hub, automatic session resumption, and live streaming (`agent_thought_chunk`, `agent_message_chunk`, `tool_call`, `tool_call_update`, `usage_update`, `available_commands_update`, `session_info_update`).
- Automatic CLI transcript sync: turns run in the `agy` CLI appear automatically in the PWA when idle.
- Interactive tool permission approvals (scoped per conversation, rendered dynamically from ACP options, persisted across reloads) and `elicitation/create` question prompts (including clickable multiple-choice schemas).
- Switch between all live Antigravity models (Gemini 4 Neon, Hydrogen, Argon, Orchestrator, Gemini 3.8 Flash, Claude Opus/Sonnet 5.5, GPT-OSS 120B), 4 execution modes (`default`, `accept-edits`, `auto`, `plan`), and all thinking/effort levels (`low`, `medium`, `high`, `xhigh` / Extra).
- Collapsible **Thinking process** card (with word count & streaming pulse), live-updating **Tool activity** card (with kind tags and formatted command/path summaries), one-click copy/reuse actions, smart scroll-lock with floating **↓ Latest** pill, drag-and-drop overlay, keyboard shortcuts (`Ctrl+K`, `Alt+N`, `Alt+↑/↓`, `Esc`), and conversation filter/search.
- **Image attachments** (file picker, clipboard paste, drag-and-drop), `@file` workspace file autocomplete (`resource_link`), `/slash` workflow commands (`/plan`, `/boost`, `/goal`, `/grill-me`, `/teamwork`, `/browser`, `/compact`, `/restart`, `/rename`, etc.), and `!command` local shell execution.
- **Conversation Artifacts & Brain Viewer**: Browse and render Markdown plans, reports, images, and scratch files inside `~/.gemini/antigravity-cli/brain/<sessionId>/` as well as full historical transcripts from `transcript_full.jsonl` / `transcript.jsonl`.
- **Control Center**: View live model quota progress bars & reset times (`/usage` + `/credits`), inspect or invoke any installed or built-in `SKILL.md`, manage Antigravity plugins (`agy plugin`) and MCP servers (`agy mcp`), and restart the ACP engine on demand.
## Quick Start
Requires Go 1.24+ and the Antigravity CLI (`agy`) installed and signed in.
```bash
go build -trimpath -o gravitas .
./gravitas --host 127.0.0.1 --port 8421
```
On loopback a random access token is generated and printed with a one-click launch link. Binding to any other address requires a token via `--token` or the `GRAVITAS_TOKEN` environment variable.
## Running as a Service
Run it as the same user that runs `agy`, and keep the token out of the unit file. Example systemd unit:
```ini
[Unit]
Description=Gravitas
After=network-online.target
Wants=network-online.target
[Service]
User=youruser
EnvironmentFile=/etc/gravitas/gravitas.env
ExecStart=/usr/local/bin/gravitas --host 127.0.0.1 --port 8421 --cwd /path/to/workspace
Restart=on-failure
[Install]
WantedBy=multi-user.target
```
`/etc/gravitas/gravitas.env` contains `GRAVITAS_TOKEN=<long random string>` and should be readable only by root and the service user.
## Security
Anyone who signs in can drive the agent and run shell commands (`!command`) as the service user. Never expose the server to the public internet: bind it to loopback or a private network (VPN) interface, firewall the port, and use a long random token. Traffic is plain HTTP, so rely on a VPN or a TLS-terminating reverse proxy when reaching it from another device.
## License
MIT — see [LICENSE](LICENSE).