Skip to content
AI Primer
release

Google adds the Antigravity harness to Gemini managed agents

Google added the Antigravity harness to Gemini managed agents in AI Studio and the Interactions API. The Files and Credentials APIs move data into sandboxes and control agent access.

5 min read
Google adds the Antigravity harness to Gemini managed agents
Google adds the Antigravity harness to Gemini managed agents

TL;DR

  • Google added antigravity-preview-09-2026, bringing the Antigravity harness to Gemini managed agents in AI Studio and the Interactions API, in Google's announcement.
  • A single API call can provision a secure Linux sandbox where an agent reasons, writes code, browses, edits files, and iterates toward completion, according to Google's sandbox description.
  • The Files API adds uploads, artifact inspection, downloads, and state carried between turns through environment_id, as detailed in Google's Files API announcement.
  • The Credentials API keeps registered secrets out of model context and limits authenticated requests to explicitly approved destinations, Google's Credentials API announcement says.
  • Google reports up to 30% lower costs and up to 22% higher cache-hit rates for the new managed-agent version in _philschmid's release thread.

Google’s agent documentation says the harness can run Bash, Python, and Node.js, including package installation and tests. The environment guide makes files and installed packages reusable by ID, while the credentials guide makes stored secret values write-only.

Antigravity preview 09-2026

Google identifies the new managed-agent runtime as antigravity-preview-09-2026, with Gemini 3.8 Flash as its default model. Callers can select another model through agent configuration, Google's announcement says.

Sandbox state

Managed-agent environments are isolated Linux sandboxes, decoupled from interaction context so they can be reused or started fresh, according to Google’s environment documentation.

  • environment="remote" provisions a fresh sandbox.
  • Passing an environment ID resumes its filesystem and installed packages.
  • A configuration object can create a sandbox with mounted sources and network rules.
  • Repository mounts are capped at 500 MB, Cloud Storage mounts at 2 GB, and inline mounts at 1 MB per file or 2 MB total. A mount target cannot be /.

The retained package and filesystem state turns an interaction API into a resumable workspace, rather than a sequence of disposable code-execution calls.

Files API

Google’s Files API is the transfer layer for inputs and artifacts around that workspace, including the spreadsheet-to-dashboard path described in Google's Files API announcement.

  • files.upload() can seed files inline or add data during a conversation.
  • files.list() exposes generated files and directory sizes.
  • The download path returns artifacts such as dashboards, reports, CSVs, and Git repositories.
  • Sandboxes persist across turns when the caller supplies environment_id, _philschmid's implementation rundown says.

Credentials API

The Credentials API stores secrets server-side, then an egress proxy resolves them only when an agent makes an approved request, Google's Credentials API announcement says.

  • bearer_token supports static tokens, oauth2 refreshes and rotates tokens, and environment_variable gives the sandbox a placeholder instead of the secret, per Google’s credentials documentation.
  • Google says plaintext secrets never enter model context, stdout, or agent memory. The sandbox sees a value such as __GEMINI_CRED_slack-bot-token__, while the proxy substitutes the real token on the wire, _philschmid's implementation rundown says.
  • Credentials can be attached to remote MCP-server tools or sandbox environment variables.
  • Outbound network access is unrestricted by default. Domain restrictions and credential injection are configured through environment.network, according to the environment guide.

Caching and compaction

Google calls the efficiency numbers internal testing results for the new harness.

  • Google reported 40% fewer output tokens for file changes, up to 6% higher completion on multi-turn software-engineering and research tasks, and up to 16% higher cache-hit rates on long conversations in its efficiency post.
  • The detailed release rundown gives separate figures: 30% lower cost for multi-turn coding, 17% for reasoning, and up to 8% higher task completion on software-engineering and research evaluations, _philschmid's implementation rundown says.
  • The runtime automatically compacts context at roughly 135,000 tokens, the same rundown says.

Open SDK generation

The rollout also changes how the client libraries are made. Google and Speakeasy opened the OpenAPI generation suite behind new GenAI SDKs for the Interactions, Agents, and Webhooks APIs, _philschmid's SDK announcement says.

  • Google’s SDK-generation announcement says the suite is AGPLv3, while generated client code can use a developer’s chosen license.
  • It generates SDKs for Python, TypeScript, Go, Java, C#, PHP, and Ruby, with typing, server-sent-events streaming, retries, and pagination.
  • The project also includes generators for standalone agent CLIs and documentation MCP servers built from OpenAPI specifications and Markdown.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 5 threads
Antigravity preview 09-20262 posts
Sandbox state1 post
Files API1 post
Credentials API1 post
Caching and compaction1 post
Share on X