Track your Antigravity AI model quota usage with onWatch.
Antigravity is an AI coding assistant that provides access to multiple AI models including Claude, Gemini, and GPT variants. onWatch can monitor your model quotas by connecting to the locally running Antigravity language server process.
- Antigravity installed and running
- onWatch installed (Quick Start)
onWatch automatically detects the Antigravity language server running on your machine by:
- Scanning for the
antigravityprocess - Extracting the CSRF token and port from command-line arguments
- Connecting via the Connect RPC protocol
- Polling the
/exa.language_server_pb.LanguageServerService/GetUserStatusendpoint
No manual configuration is required for local development.
Add to your .env file:
cd ~/.onwatchEdit .env and add:
ANTIGRAVITY_ENABLED=true
Or set it as an environment variable:
export ANTIGRAVITY_ENABLED=trueonwatch stop
onwatchOr in debug mode to verify:
onwatch --debugYou should see:
Antigravity auto-detection enabled (process scanning mode)
Starting Antigravity agent (interval: 60s)
connected to Antigravity language server port=63516 protocol=https
Open http://localhost:9211 and click the antigravity tab.
You'll see quota cards for each model, including:
- Claude Sonnet
- Gemini Pro
- GPT-4 variants
- And other available models
In containerized environments where process scanning doesn't work, you can manually configure the connection:
| Variable | Description | Example |
|---|---|---|
ANTIGRAVITY_ENABLED |
Enable Antigravity provider | true |
ANTIGRAVITY_BASE_URL |
Base URL of the language server | https://127.0.0.1:42100 |
ANTIGRAVITY_CSRF_TOKEN |
CSRF token from the process | your_csrf_token_here |
services:
onwatch:
image: ghcr.io/onllm-dev/onwatch:latest
environment:
- ANTIGRAVITY_ENABLED=true
- ANTIGRAVITY_BASE_URL=https://host.docker.internal:42100
- ANTIGRAVITY_CSRF_TOKEN=your_csrf_token
ports:
- "9211:9211"On the host machine, find the running Antigravity process:
# macOS/Linux
ps aux | grep antigravity | grep -E "csrf_token|extension_server_port"
# Example output:
# /path/to/antigravity --csrf_token=abc123 --extension_server_port=42100Extract the values:
--extension_server_port=42100- Use as the port inANTIGRAVITY_BASE_URL--csrf_token=abc123- Use asANTIGRAVITY_CSRF_TOKEN
| Metric | Description |
|---|---|
| Model Quotas | Per-model remaining fraction (0.0 to 1.0) |
| Reset Times | When each model's quota resets |
| Prompt Credits | Available credits for your plan |
| Plan Info | Your subscription tier (Free, Pro, etc.) |
The dashboard shows:
- Usage percentage for each AI model
- Remaining quota with color indicators
- Reset countdown timers
- Usage history and projections
onWatch tracks all models available in your Antigravity subscription:
| Model ID | Display Name |
|---|---|
claude-4-5-sonnet |
Claude 4.5 Sonnet |
claude-4-5-sonnet-thinking |
Claude 4.5 Sonnet (Thinking) |
gemini-3-pro |
Gemini 3 Pro |
gemini-3-flash |
Gemini 3 Flash |
| (others) | Automatically detected |
-
Verify Antigravity is running:
ps aux | grep antigravity -
Check if the process has the required arguments:
ps aux | grep antigravity | grep csrf_token
-
Ensure
ANTIGRAVITY_ENABLED=trueis set
- Make sure you're logged into Antigravity
- Check that your subscription is active
- Run onWatch in debug mode:
onwatch --debug
The language server might be using a self-signed certificate. onWatch handles this automatically, but if you're using manual configuration:
- Ensure the port is correct
- Try both
https://andhttp://protocols - Check firewall settings
The token changes when Antigravity restarts. For auto-detection mode, restart onWatch after restarting Antigravity:
onwatch stop && onwatchFor manual configuration, update ANTIGRAVITY_CSRF_TOKEN with the new value.
onWatch uses the Connect RPC protocol to communicate with the Antigravity language server:
Endpoint:
POST /exa.language_server_pb.LanguageServerService/GetUserStatus
Headers:
Content-Type: application/json
Connect-Protocol-Version: 1
X-Codeium-Csrf-Token: <token>
Response structure:
{
"userStatus": {
"email": "user@example.com",
"planStatus": {
"availablePromptCredits": 500,
"planInfo": {
"planName": "Pro",
"monthlyPromptCredits": 1000
}
},
"cascadeModelConfigData": {
"clientModelConfigs": [
{
"label": "Claude Sonnet",
"modelOrAlias": {"model": "claude-4-5-sonnet"},
"quotaInfo": {
"remainingFraction": 0.75,
"resetTime": "2026-02-24T12:00:00Z"
}
}
]
}
}
}- onWatch connects only to localhost (or your configured URL)
- The CSRF token is never sent to external servers
- All data stays on your machine (SQLite database)
- Auto-detection only reads process arguments, not memory
- Development Guide - Build from source
- Copilot Setup - Track GitHub Copilot quotas
- Codex Setup - Track OpenAI Codex quotas
- README - Quick start and configuration