Google’s Antigravity SDK is a Python package for building agents on Antigravity’s runtime harness, and its docs now spell out how to sign in, pick a model, count tokens, keep a session, stream output and script a workflow. I installed google-antigravity 0.1.24, ran one prompt at every thinking level the SDK lists, and ran a three-file workflow on a Gemini API key. Hydrogen rejected the lowest thinking level and accepted the other four.
Four ways to sign in
The Authentication page lists four paths. The default is the Gemini Developer API with a GEMINI_API_KEY. The two Gemini Enterprise paths (formerly Vertex AI) are Express Mode, which takes an API key, and Standard Mode, which takes Application Default Credentials plus a project and a location. The fourth path needs no credentials: LiteRTAgentConfig runs a local checkpoint such as Gemma 4 26B A4B, and LocalOpenAIAgentConfig points at Ollama, LM Studio or vLLM.

None of the four is a sign-in with a Google AI plan, so SDK usage runs on keys and Google Cloud credentials, not plan quota. That fits the line Google drew in its Antigravity terms rewrite. Two details from the page matter in practice. Explicit keyword arguments beat environment variables in every cloud mode. And the localharness subprocess inherits your whole shell environment, so the docs tell you to pass keys through api_key and restrict run_command with policies when you enable shell execution.
What I ran
The box was 4 cores, 15 GB RAM, Ubuntu 24, with Python 3.13 and a clean virtual environment. pip install google-antigravity pulled 0.1.24, the newest release on PyPI. The default model in the source is gemini-4-hydrogen, and the default image model is gemini-3.1-flash-lite-image. A first turn with the default config took 1.6 seconds, and the usage report showed about 12K prompt tokens for a reply of two.
Then I ran the same prompt at each thinking level, once with the default service tier and once with ServiceTier.PRIORITY. This is the prompt, verbatim:
What is 17*23? Answer with the number only.
| Thinking level | Default tier | Priority tier |
|---|---|---|
| MINIMAL | 400 error, not supported for this model | 400 error, not supported for this model |
| LOW | 391 in 2.2 s | 391 in 1.7 s |
| MEDIUM | 391 in 2.2 s | 391 in 1.6 s |
| HIGH | 391 in 1.8 s | 391 in 1.7 s |
| EXTRA_HIGH | 391 in 1.9 s | 391 in 2.0 s |

The enum has five levels, and the error for the lowest reads “Thinking level MINIMAL is not supported for this model.” A one-line arithmetic prompt shows nothing about answer quality across levels, only which settings the model takes.
The Models page says ServiceTier.PRIORITY requests that exceed rate limits are served on the standard tier instead of failing with a 429 or 503, and that usage_metadata.service_tier tells you which tier answered. My priority requests all succeeded. The tier field came back empty on both default and priority runs, so I couldn’t see which tier served them, and I never hit a limit, so the overflow didn’t fire. The same page documents the retry defaults for transient errors: a 4,000 ms first sleep, a 2.0 multiplier, a 0.4 jitter range and a cap of 4 minutes.
Workflows: Python in charge, models on call
The Workflows page describes google.antigravity.beta.workflows, where control flow is ordinary Python and models handle individual steps that return schema-checked output. call_tool runs a built-in tool such as read_file with no model turn, and parallel fans a function out over a list. The docs say direct call_tool steps skip declarative policies and tool hooks, while the agents a workflow spawns do enforce them.
I planted three small files: one passing a command to os.system, one building an SQL query with string formatting, and one with a hardcoded API key. This is the workflow, as I ran it:
@workflows.define
async def audit() -> None:
"""Reads files and audits them in parallel."""
workflows.phase("Audit")
async def one(path: str):
content = await workflows.call_tool("read_file", Path=path)
return await workflows.agent(f"Name the main security issue in {path} in one sentence:\n{content}", schema={"type":"string"}, role="Audit", type_name="file_auditor")
res = await workflows.parallel(workflows.args["paths"], one)
for r in res: workflows.log(str(r))
The run reported three tool calls, all read_file, with none failed and none denied. The three auditors answered command injection through os.system, SQL injection from string formatting, and a hardcoded API key.

Workflows live in the preview beta namespace, and the docs say beta APIs may change between minor releases.
The rest of the docs
- Usage. Token counts come per turn from
response.usage_metadata, as a running total fromagent.conversation.total_usage, and per subagent fromtrajectory_usages. The fields include cached and thinking tokens and the service tier. - Sessions. A
save_dirandconversation_idpersist a session to disk,CompactionConfigcompacts long contexts, andBudgetConfigcaps execution. The in-memory history keeps 10,000 steps by default. - Streaming. A response streams text, reasoning thoughts and tool calls as separate iterators, takes images, documents, audio and video, and can be cancelled mid-turn.
- Presets.
.lightweight()trims a config for small local models, and.eval()sets autonomous tools, benchmark retries and HIGH thinking. - Image target. Overriding
modelalone still adds the default image target and validates it at session start, even with image generation switched off.
Where this sits
Google now has three ways to run Antigravity outside its app. The SDK is the local one: your Python process starts the harness and calls Gemini or a local model. The docs also point to a managed Gemini API Antigravity Agent for people who want a hosted REST and gRPC API instead. The third is the command-line tool, which I covered when Colab built it in. Google has also lifted the Neon cache hit rate, which matters if you pay per token on any of these, as I reported.
For third-party tools the picture is two routes. Some, like OpenClaw with its Google AI Ultra sign-in, have a Google-approved client. The SDK is the route open to anyone with a key or a Google Cloud project.
How I checked
I read the SDK overview and the Authentication, Models, Observability, Sessions, Streaming and Workflows pages, plus the package source for the model and thinking-level defaults. I ran the hello turn, the thinking-level and tier matrix, and the workflow on a Gemini API key. I didn’t run the Vertex or local-model paths, the OpenTelemetry export, session persistence or streaming.




