
On June 18, Gemini CLI stopped serving requests. If you had shell scripts, GitHub Actions, or cron jobs calling gemini, they returned HTTP 410 and broke silently. Google didn’t just rename the tool — it replaced the entire platform with something called Antigravity. Most coverage focused on the CLI swap. The part that deserves attention: Antigravity ships a Python SDK that lets you build your own autonomous agents backed by Gemini 3.5 Flash, with Google hosting the sandboxed Linux execution environment. No compute to provision. No orchestration layer to wire up. Here’s how to use it.
What Antigravity Actually Is
Antigravity is Google’s agent-first development platform, launched at Google I/O 2026. It comes in three forms: a desktop application for visual agent orchestration, an agy CLI that replaces the retired gemini command, and a Python SDK for building managed agents programmatically. The SDK — google-antigravity on PyPI — is the surface most developers haven’t explored yet.
The core idea is straightforward. Instead of managing a sandboxed environment, wiring up tool calls, and handling agent state yourself, you describe what your agent should do and Antigravity handles the infrastructure. The agent runs in an isolated Linux container hosted by Google, powered by Gemini 3.5 Flash. By default, it gets code execution (Python, Bash, Node.js), Google Search, and URL fetching out of the box.
Getting Started with the SDK
Install the library and set your API key. You can get a Gemini API key from Google AI Studio.
pip install google-antigravity
export GEMINI_API_KEY="your_api_key_here"
A minimal agent looks like this:
import asyncio
import sys
from google.antigravity import Agent, LocalAgentConfig
async def main():
config = LocalAgentConfig()
async with Agent(config) as agent:
response = await agent.chat("List all Python files in this repo and summarize their purpose.")
async for token in response:
sys.stdout.write(token)
sys.stdout.flush()
asyncio.run(main())
The async with block manages the session lifecycle. The agent streams tokens back by default. For simpler use cases, swap the streaming loop for await response.text().
What the Sandbox Can Do
Every agent session gets a fresh, isolated Linux environment. Default capabilities include:
- Code execution — Python, Bash, and Node.js scripts
- Google Search — real-time web queries
- URL context — fetches and parses external pages
- File management — read, write, edit, and list files (enabled when you pass an
environmentparameter)
What’s not available yet: file_search, computer_use, and audio or video inputs. These are documented as coming in later releases.
Shaping Agent Behavior
Pass system_instructions to LocalAgentConfig to define what the agent focuses on. You can also connect custom tools via MCP servers, using the same protocol that Claude Code and other agents already support:
from google.antigravity import Agent, LocalAgentConfig
from google.antigravity.types import McpStdioServer
config = LocalAgentConfig(
system_instructions="You are a senior code reviewer. Point out security issues first.",
mcp_servers=[
McpStdioServer(name="github", command="npx", args=["@modelcontextprotocol/server-github"])
],
)
async with Agent(config) as agent:
response = await agent.chat("Review the open pull requests in this repo.")
print(await response.text())
Locking Down Permissions
Antigravity includes a declarative policy system for controlling which tools the agent can use without prompting. This matters in CI environments where you don’t want the agent running arbitrary shell commands:
from google.antigravity.hooks.policy import deny, allow, ask_user
policies = [
deny("*"), # Block everything by default
allow("view_file"), # Read-only access allowed
ask_user("run_command", handler=my_handler), # Prompt before shell commands
]
config = LocalAgentConfig(policies=policies)
This is a useful safety primitive. Most competing frameworks leave permission control as an exercise for the developer.
How It Compares
Antigravity sits in the same category as Claude Managed Agents and OpenAI’s Assistants API. The key distinction is where execution happens. Google provisions and manages the Linux sandbox — Claude and OpenAI require you to configure or bring your own execution environment.
On raw coding benchmark performance, Claude Opus 4.8 leads SWE-bench Verified at 88.6%, with OpenAI GPT-5.5 at 82.7% and Gemini 3 Flash at 78%. Antigravity’s advantage is cost and speed: Gemini 3.5 Flash runs at $1.50/$9 per million input/output tokens, and Google claims it runs four times faster than comparable frontier models. For token-heavy, latency-sensitive workloads, that spread matters.
The official migration announcement details what breaks in the CLI transition. The Antigravity 2.0 launch post covers the broader platform roadmap, including the Manager View for running up to 16 parallel agents.
What to Know Before Using It in Production
Weekly compute cap. Gemini CLI gave you 1,000 requests per day. Antigravity uses a weekly compute-based limit. Users running agents intensively report hitting the cap and waiting multiple days for it to reset — a meaningful step back for high-frequency automation.
Alpha status. The SDK is labeled alpha. The API surface can change between releases. The Antigravity agent documentation includes explicit caveats about unsupported features. Don’t build hard production dependencies on it yet.
Breaking CLI changes. If you’re migrating from Gemini CLI, four things change by default: the model (1.5-pro to 3-pro), streaming format (now SSE), state directory (now ~/.antigravity/), and exit codes. Automations that appear to work after a mechanical rename may still behave differently. Test before deploying.
When to use it. Internal developer tools, one-off research agents, and prototypes where you want Google to handle execution plumbing. The Building Managed Agents guide and the official Getting Started codelab are the fastest paths to a working agent. When to stick with the raw Gemini API: high-throughput pipelines, workloads exceeding the weekly cap, or use cases requiring computer_use or audio inputs.
The Bottom Line
Antigravity is not a polished production platform yet — it’s Google’s first coherent answer to the managed agent infrastructure question. The SDK abstracts real complexity (sandboxed execution, tool wiring, state management) into a clean Python interface. The weekly compute cap and alpha status limit where you can deploy it today. The bones are solid. Check back when it hits GA.













