A headless Rust server that turns Antigravity accounts into a reliable, production-grade API β purpose-built for agentic coding (Claude Code, Cursor, Cline, OpenCode) where sessions run 50β200+ tool calls without human intervention.
You provide: Antigravity account credentials
You get: OpenAI + Anthropic compatible API that survives rate limits, rotates accounts, and keeps thinking mode stable across long tool-use chains
βββββββββββββββββββ βββββββββββββββββββββββ ββββββββββββββββββββ
β Claude Code β β Antigravity Server β β β
β Cursor / Cline β βββΊ β βββββββββββββββββ β βββΊ β Google Gemini β
β OpenCode β β β AIMD throttle β β β (via OAuth) β
β Any OpenAI SDK β β β Circuit break β β β β
β β β β Sticky sessionβ β ββββββββββββββββββββ
βββββββββββββββββββ β βββββββββββββββββ β
βββββββββββββββββββββββ
cargo build --release -p antigravity-server
./target/release/antigravity-server
# β http://127.0.0.1:8045export ANTHROPIC_BASE_URL=http://127.0.0.1:8045
export ANTHROPIC_API_KEY=sk-antigravity
claude # thinking mode works, tool calls stay stableSet base URL to http://127.0.0.1:8045/v1 with any API key.
import openai
client = openai.OpenAI(
api_key="sk-antigravity",
base_url="http://127.0.0.1:8045/v1"
)
response = client.chat.completions.create(
model="gemini-2.5-pro",
messages=[{"role": "user", "content": "Hello!"}]
)The upstream Antigravity-Manager is a Tauri desktop app designed for manual chat. This fork is a headless server rebuilt for unattended, high-throughput agentic workloads.
| Upstream (Tauri Desktop) | This Fork (Axum Server) | |
|---|---|---|
| Runtime | Desktop GUI app (Tauri + React) | Headless VPS/server daemon |
| Frontend | React + TypeScript | Leptos (Rust β WASM, single binary) |
| Crate structure | Single src-tauri/ (49k LOC) |
Modular workspace: core, types, server (36k LOC) |
| Deployment | Install on desktop | systemctl, Docker, bare metal |
| Feature | Upstream | This Fork |
|---|---|---|
| Rate limiting | Retry on 429 | AIMD predictive throttle (TCP-congestion inspired) |
| Account selection | Round-robin | Least-connections + tier priority + health scores |
| Failover | Basic retry | Circuit breakers (per-account, per-endpoint) |
| Session continuity | None | Sticky sessions β account stays bound to conversation |
| Thinking mode | Disables on mixed history |
Always-on β upstream handles mixed history natively |
| Signature validation | Silent downgrade | Explicit error β client knows when quality degrades |
| Response validation | None | Thinking degradation detection on every response |
| Schema caching | None | Atomic schema cache with hit/miss tracking |
| Observability | GUI dashboard | Prometheus metrics + structured JSON logs |
OpenAI-compatible:
POST /v1/chat/completionsβ Chat (streaming supported)POST /v1/images/generationsβ Imagen 3POST /v1/audio/transcriptionsβ Whisper-compatibleGET /v1/modelsβ Available models
Anthropic-compatible:
POST /v1/messagesβ Claude messages API (full thinking + signature support)
Management:
GET /api/resilience/healthβ Account health + circuit breaker statusGET /api/resilience/aimdβ AIMD rate limit stateGET /api/metricsβ Prometheus metrics
antigravity-server account list # List accounts
antigravity-server account add -f x.json # Import account
antigravity-server account refresh all # Refresh quotas
antigravity-server status # Server stats# ~/.config/systemd/user/antigravity.service
[Unit]
Description=Antigravity Server
After=network.target
[Service]
ExecStart=%h/.local/bin/antigravity-server
Restart=always
Environment=RUST_LOG=info
[Install]
WantedBy=default.targetsystemctl --user enable --now antigravity| Variable | Default | Description |
|---|---|---|
ANTIGRAVITY_PORT |
8045 |
Server port |
ANTIGRAVITY_DATA_DIR |
~/.antigravity_tools |
Data directory |
RUST_LOG |
info |
Log level (debug for signature tracing) |
Fork of lbjlaq/Antigravity-Manager.
License: CC BY-NC-SA 4.0 β Non-commercial use only.