# Connect Antigravity

Open Antigravity and you're done: the limit shows up on its own while it's open.

**Shows:** the limit per model group (for example Gemini, and Claude and GPT).

## Step by step

1. Open Google Antigravity and sign in.
2. That's it. QuotaDesk finds Antigravity's local server and reads the limit every 30 seconds.

To see another model group on the card, use the card menu › **Next group / model**.

## Where the data comes from

QuotaDesk only accepts Antigravity's own local server: the `language_server` process from the install folder (older versions) or `agy.exe` in `%USERPROFILE%\.gemini\bin` (the current Antigravity IDE). It only talks to it over `127.0.0.1`. The token for this local session stays in memory and is never saved.

When there is more than one model group, the card switches by itself to the group whose usage just went up, unless you picked a group by hand in the last 30 minutes. The card note lists every group, for example *Gemini 37% · Claude and GPT 0%*. If an account has no 5-hour window, use the card menu › **Visible windows** to hide that row.

## Antigravity 2.34 or newer

Starting with version 2.34, Antigravity no longer puts the local session token on the `language_server.exe` command line. The app now hands it to the server privately, over standard input (`--read_host_bridge_token_from_stdin`). Without the token, the local server rejects the request (HTTP 401). The change broke several quota monitors at once, and Google did not announce it.

Antigravity itself writes a **discovery file** for each running server:

```
%USERPROFILE%\.gemini\antigravity\daemon\hub_<port>.json
%USERPROFILE%\.gemini\antigravity\daemon\ls_<id>.json
```

It holds the process (`pid`), the local ports and the session token. QuotaDesk reads those files like this:

- it only accepts the file whose `pid` is the running Antigravity `language_server`, and whose port is one that process is listening on. The folder piles up files from closed sessions, and those are ignored;
- it only talks to `127.0.0.1`, with the same limit-reading requests as before;
- it keeps the token in memory only and wipes it after each request. It is never saved, copied or logged;
- it does not read the process's standard input or Antigravity's memory.

> **⚠️ Warning:** the `hub_<port>.json` file is **not documented** by Google. It can move, change format or disappear in any Antigravity update. That file holds Antigravity's local session token: QuotaDesk uses it only to read the limit over `127.0.0.1`.
>
> - If the file is missing, the card shows *Antigravity aberto · servidor local não encontrado* (Antigravity open · local server not found), never a made-up number.
> - If you already had a reading, it stays on the card, marked as old.
> - The official way to see the limit is still Antigravity's **Settings** screen or the `/usage` (or `/quota`) command in `agy`.

## If it doesn't show up

| Message | What to do |
|---|---|
| *Open Antigravity to read the limit.* | It's closed or still starting. Open Antigravity and wait a few seconds. |
| *Antigravity aberto · servidor local não encontrado* | Antigravity 2.34 or newer is open, but the discovery file doesn't exist. Close and reopen Antigravity. If it keeps happening, the installed version changed the format: check the limit in Antigravity's Settings. |

While Antigravity is closed, the card shows the last reading marked as old.
