Exposes your running Antigravity instance as a local OpenAI-compatible API on localhost:11435.
Use your Antigravity subscription with any tool that speaks OpenAI — opencode, aider, continue.dev, or plain curl.
Your tool → HTTP :11435 → VS Code extension → Antigravity sidecar (ConnectRPC) → Cloud AI
The extension runs inside Antigravity's VS Code process, discovers the sidecar via process inspection, intercepts CSRF tokens from Antigravity's own traffic, and proxies your requests through the same authenticated channel Antigravity uses internally.
- OpenAI-compatible API — drop-in replacement for any tool expecting OpenAI format
- Image support — paste screenshots or attach images from OpenAI clients; images are saved to temp files and referenced in the message so the agent can view them
- Workspace-aware — automatically detects and sets the correct project context via
x-workspace-dir/x-workspace-uriheaders - Conversation multiplexing — reuses Cascade conversations for efficiency, with automatic retry on capacity errors
- Streaming & non-streaming — both modes supported
| Model ID | Description |
|---|---|
antigravity-claude-sonnet-4-6 |
Claude Sonnet 4.6 with Thinking (default) |
antigravity-claude-opus-4-6-thinking |
Claude Opus 4.6 with Thinking |
antigravity-gemini-3-flash |
Gemini 3 Flash |
antigravity-gemini-3.1-pro-high |
Gemini 3.1 Pro — High thinking |
antigravity-gemini-3.1-pro-low |
Gemini 3.1 Pro — Low thinking |
antigravity-gpt-oss-120b |
GPT-OSS 120B Medium |
- Open Antigravity
- Go to Extensions (
Ctrl+Shift+X) - Search for "AG Local Bridge" by marcodiniz
- Click Install
- Reload Antigravity (
Ctrl+Shift+P→ Developer: Reload Window)
-
Clone into your Antigravity extensions directory:
# Windows git clone https://github.com/marcodiniz/ag-local-bridge "%USERPROFILE%\.antigravity\extensions\ag-local-bridge-1.0.0-universal" # macOS / Linux git clone https://github.com/marcodiniz/ag-local-bridge ~/.antigravity/extensions/ag-local-bridge-1.0.0-universal
-
Reload Antigravity (
Ctrl+Shift+P→ Developer: Reload Window)
Look for "AG Local Bridge" in the Output panel — you should see:
✅ Server running on http://localhost:11435
Add to ~/.config/opencode/opencode.json:
{
"provider": {
"ag-local-bridge": {
"npm": "@ai-sdk/openai-compatible",
"name": "AG Local Bridge",
"options": {
"baseURL": "http://localhost:11435/v1",
"apiKey": "local"
},
"models": {
"antigravity-claude-sonnet-4-6": {
"name": "Claude Sonnet 4.6 (Antigravity)",
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 200000, "output": 64000 }
},
"antigravity-claude-opus-4-6-thinking": {
"name": "Claude Opus 4.6 Thinking (Antigravity)",
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 200000, "output": 64000 }
},
"antigravity-gemini-3.1-pro-high": {
"name": "Gemini 3.1 Pro High (Antigravity)",
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 1048576, "output": 65535 }
},
"antigravity-gemini-3.1-pro-low": {
"name": "Gemini 3.1 Pro Low (Antigravity)",
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 1048576, "output": 65535 }
},
"antigravity-gemini-3-flash": {
"name": "Gemini 3 Flash (Antigravity)",
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 1048576, "output": 65536 }
},
"antigravity-gpt-oss-120b": {
"name": "GPT-OSS 120B Medium (Antigravity)",
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 128000, "output": 16384 }
}
}
}
}
}Then select ag-local-bridge/antigravity-claude-sonnet-4-6 as your model.
Image support: The
modalitiesfield enables image input (clipboard paste, file attach). Images are saved to temp files and the agent views them with its built-in file tools.
# List models
curl http://localhost:11435/v1/models
# Chat completion
curl http://localhost:11435/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "antigravity-claude-sonnet-4-6",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": false
}'
# Streaming
curl http://localhost:11435/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "antigravity-gemini-3.1-pro-high",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": true
}'
# With image (base64 data URL)
curl http://localhost:11435/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "antigravity-claude-sonnet-4-6",
"messages": [{"role": "user", "content": [
{"type": "text", "text": "What do you see?"},
{"type": "image_url", "image_url": {"url": "data:image/png;base64,iVBOR..."}}
]}],
"stream": false
}'Base URL: http://localhost:11435/v1
API Key: anything (not validated)
| Method | Path | Description |
|---|---|---|
GET |
/v1/models |
List available models |
POST |
/v1/chat/completions |
Chat completion (streaming & non-streaming) |
POST |
/v1/proxy |
Forward arbitrary RPC to sidecar |
GET |
/v1/debug |
Debug info (sidecar ports, CSRF, captures) |
Images sent via the OpenAI image_url content type are handled as follows:
- Base64 data URLs (
data:image/png;base64,...) — decoded and saved to a temp file - Remote URLs (
https://...) — downloaded, then saved to a temp file - File URIs (
file:///C:/path/to/image.png) — read directly from disk
The image file path is prepended to the message text so the Antigravity agent can use its view_file tool to inspect the image.
Pass workspace context via HTTP headers:
| Header | Description |
|---|---|
x-workspace-dir |
Absolute filesystem path (e.g. C:\code\myproject) |
x-workspace-uri |
File URI (e.g. file:///C:/code/myproject) |
When set, the bridge switches the active VS Code workspace folder before creating a Cascade, ensuring the agent operates in the correct project context.
The extension uses a 2-tier fallback strategy:
-
Tier 1 — Sidecar ConnectRPC (preferred): Discovers the Antigravity sidecar process, connects via HTTP/2 with CSRF authentication, and uses the Cascade API (
StartCascade→SendUserCascadeMessage→ pollGetCascadeTrajectory). Conversations are multiplexed and the active workspace is auto-detected. -
Tier 2 — Command Dispatch: Last resort — fires the message through
antigravity.executeCascadeAction.
| Command | Description |
|---|---|
AG Local Bridge: Start Server |
Start the HTTP server |
AG Local Bridge: Stop Server |
Stop the HTTP server |
AG Local Bridge: Show Status |
Display connection status |
AG Local Bridge: Probe Sidecar |
Test sidecar connectivity |
AG Local Bridge: List Available LM Models |
List configured models and sidecar status |
AG Local Bridge: List Available Chat Commands (Debug) |
List chat commands available for debugging |
| Setting | Default | Description |
|---|---|---|
agLocalBridge.port |
11435 |
HTTP server port |
agLocalBridge.logRequests |
false |
Log request/response details |
- Antigravity installed and running
- Active Antigravity subscription (Free/Pro/Teams/Enterprise)
We use a beta → master release flow:
| Branch | Role | Publishes as |
|---|---|---|
beta |
Default / development | Pre-release |
master |
Stable releases only | Stable |
- Fork & branch off
beta(the default branch). - Open your PR against
beta— GitHub will target it automatically. - Once merged, a pre-release is published to Open VSX for beta testers.
- When a beta build is ready for general availability, the maintainer merges
beta → masterto cut a stable release.
Note:
masteris protected — direct pushes are not allowed. All changes flow throughbetafirst.
MIT