aurarouter-antigravity
Google Antigravity MCP provider server for AuraRouter.
aurarouter-antigravity wraps the official google-antigravity Python SDK, exposing Google Antigravity agentic capabilities and Gemini models as a standard Model Context Protocol (MCP) server.
Architecture Overview
graph TD
Client[User / Application / MAS] --> Router[AuraRouter ComputeFabric]
Router --> Stack{v2.1 Routing Stack}
Stack -->|Select Antigravity| MCP[AuraRouter McpProvider]
MCP --> FastMCP[aurarouter-antigravity FastMCP Server]
FastMCP --> Provider[AntigravityProvider Engine]
Provider --> SDK[google-antigravity SDK: Agent / LocalAgentConfig]
SDK --> Gateway[Google Gemini / Vertex AI Endpoint]
Features
- Native
google-antigravitySDK Integration: Directly utilizesgoogle.antigravity.AgentandLocalAgentConfigwith streaming response resolution. - Model Catalog:
gemini-3.8-flash: Default Antigravity model for high-efficiency reasoning and agent workflows.gemini-3.1-pro: Deep reasoning and long-context (2M tokens) agent execution.gemini-3.5-flash: Balanced latency and multimodal reasoning.gemini-2.5-pro&gemini-2.5-flash: Proven production generation.
- AuraRouter v2.1 Telemetry & Error Isolation:
- Maps
RESOURCE_EXHAUSTED/QuotaFailuretoAntigravityRateLimitError(rate_limit_exceeded) withretry_after_s. - Maps context overflow to
AntigravityContextLengthError(context_length_exceeded). - Maps 5xx / connection timeouts to
AntigravityTransientError(provider_transient_error).
- Maps
- Structured Outputs: Native support for JSON schemas and
json_mode. - Accurate Telemetry: Tracks prompt tokens, completion tokens, and Time-to-First-Token (TTFT) via monotonic clocks.
Installation
pip install aurarouter-antigravity
To install from source:
cd C:\projects\auracore\aurarouter-antigravity
pip install -e .
Environment Configuration
| Variable | Description |
|---|---|
GEMINI_API_KEY |
Google Gemini API key (recommended) |
GOOGLE_API_KEY |
Fallback Google API key variable |
ANTIGRAVITY_APP_DATA_DIR |
Path to Antigravity app data directory (default: ~/.gemini/antigravity) |
GOOGLE_GENAI_USE_VERTEXAI |
Set to "true" to route via Google Cloud Vertex AI |
GOOGLE_CLOUD_PROJECT |
GCP Project ID when using Vertex AI |
GOOGLE_CLOUD_LOCATION |
GCP Region when using Vertex AI (e.g. us-central1) |
AuraRouter Integration
In your AuraRouter configuration file (auraconfig.yaml), add Antigravity models:
models:
gemini-3.8-flash:
provider: mcp
provider_name: antigravity
hosting_tier: cloud
cost_per_1m_input: 0.15
cost_per_1m_output: 0.60
context_limit: 1048576
capabilities: [code, reasoning, agent, chat, multimodal]
gemini-3.1-pro:
provider: mcp
provider_name: antigravity
hosting_tier: cloud
cost_per_1m_input: 1.25
cost_per_1m_output: 10.00
context_limit: 2097152
capabilities: [code, reasoning, agent, chat, complex]
roles:
lead_architect:
- gemini-3.1-pro
- claude-3-5-sonnet-20241022
fast_coder:
- gemini-3.8-flash
- gpt-4o-mini
When installed in the Python environment, AuraRouter automatically discovers antigravity via the aurarouter.providers entry point.
Direct Python Usage
from aurarouter_antigravity.provider import AntigravityProvider
provider = AntigravityProvider()
# Single-shot text generation
result = provider.generate(
prompt="Explain quantum annealing in simple terms.",
model="gemini-3.8-flash"
)
print(f"Response: {result['text']}")
print(f"Tokens: {result['input_tokens']} in / {result['output_tokens']} out (TTFT: {result['ttft_s']:.3f}s)")
# Multi-turn conversation
history_result = provider.generate_with_history(
messages=[
{"role": "user", "content": "Hello!"},
{"role": "assistant", "content": "Greetings! How may I assist you?"},
{"role": "user", "content": "What is the capital of France?"}
],
system_prompt="Be concise and factual.",
model="gemini-3.8-flash"
)
print(history_result["text"])
MCP Tools Exposed
| Tool Name | Description |
|---|---|
provider.generate |
Single-shot text generation via Antigravity Agent |
provider.generate_with_history |
Multi-turn conversation execution with dialogue context |
provider.list_models |
List available Antigravity models and specifications |
provider.capabilities |
Advertise provider features (streaming, structured output, subagents) |
provider.health_check |
Readiness check for the Antigravity provider |
Running Standalone
Start the FastMCP server over standard I/O:
python -m aurarouter_antigravity
Display CLI options and help:
python -m aurarouter_antigravity --help
Testing & Verification
Run the full test suite:
pytest C:\projects\auracore\aurarouter-antigravity\tests -v
Run live vendor canary verification (requires GEMINI_API_KEY):
pytest C:\projects\auracore\aurarouter-antigravity\tests\test_live_vendor.py -v -m live_vendor
License
Apache-2.0
Metadata
Release files for aurarouter-antigravity 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aurarouter_antigravity-0.1.0.tar.gz | 14.3 kB | With provenance | Details for aurarouter_antigravity-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aurarouter_antigravity-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for aurarouter_antigravity-0.1.0-py3-none-any.whl |
Total release size: 27.0 kB
Release files / aurarouter_antigravity-0.1.0.tar.gz
| Download URL | aurarouter_antigravity-0.1.0.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f680d9f3e97195c1e641c22f7248c2c2b18baeb00cd9ead9a3d09474ec647826
|
|
BLAKE2b-256 checksum How to use checksums |
621bad1660edf2f4b8fd150a2e8729255eacb24a77b5f9c1fd5ed76d511e25f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logRelease files / aurarouter_antigravity-0.1.0-py3-none-any.whl
| Download URL | aurarouter_antigravity-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e076a4bca47ca562cdfa00f2424a0ee89b8ded3ec80d14acba0b5c4526d77430
|
|
BLAKE2b-256 checksum How to use checksums |
625f8334e672ba005ef708afdb0cee3e277281b9090b445839ee830bf8bad637
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logSecurity for aurarouter-antigravity 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for aurarouter_antigravity-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.