Skip to content

πŸš€ Antigravity Server β€” Pure Rust AI Gateway. Headless Axum daemon + Leptos Web UI. AIMD rate limiting, circuit breakers, Prometheus metrics. Deploy on any VPS.

License

Notifications You must be signed in to change notification settings

Stranmor/Antigravity-Server

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

748 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Antigravity Server

Production-grade AI proxy built for agentic coding workloads

Antigravity

Rust Axum Leptos Fork


What is this?

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β”‚  β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

cargo build --release -p antigravity-server
./target/release/antigravity-server
# β†’ http://127.0.0.1:8045

Claude Code

export ANTHROPIC_BASE_URL=http://127.0.0.1:8045
export ANTHROPIC_API_KEY=sk-antigravity
claude   # thinking mode works, tool calls stay stable

Cursor / Cline / OpenCode

Set base URL to http://127.0.0.1:8045/v1 with any API key.

Python / OpenAI SDK

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!"}]
)

Why This Fork?

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.

Architecture

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

Resilience & Routing β€” built for agentic

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

API

OpenAI-compatible:

  • POST /v1/chat/completions β€” Chat (streaming supported)
  • POST /v1/images/generations β€” Imagen 3
  • POST /v1/audio/transcriptions β€” Whisper-compatible
  • GET /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 status
  • GET /api/resilience/aimd β€” AIMD rate limit state
  • GET /api/metrics β€” Prometheus metrics

CLI

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

Deployment

# ~/.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.target
systemctl --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)

License

Fork of lbjlaq/Antigravity-Manager.
License: CC BY-NC-SA 4.0 β€” Non-commercial use only.


⚠️ This README was generated by Claude Opus. The repository owner has no idea what's written here.

About

πŸš€ Antigravity Server β€” Pure Rust AI Gateway. Headless Axum daemon + Leptos Web UI. AIMD rate limiting, circuit breakers, Prometheus metrics. Deploy on any VPS.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 93.2%
  • Shell 3.3%
  • CSS 2.5%
  • Nix 0.6%
  • PLpgSQL 0.3%
  • Ruby 0.1%