Start a project

← All posts

Gemini Managed Agents: Sandboxed Agent Execution in One Call

· Dracode · ai · developer-tools · google

Google shipped Managed Agents in the Gemini API into public preview at I/O 2026 this week — a feature that provisions a fully sandboxed Linux environment for your AI agent with a single API call.

What Managed Agents Actually Do

The core idea: instead of your app orchestrating an LLM call, interpreting the response, deciding what tool to invoke, running that tool, and looping back, you make one request to the Interactions API. The agent on Google’s side handles planning, tool use, code execution, file management, and web browsing — all inside an ephemeral Linux environment hosted by Google.

Three agent identifiers are currently available in preview:

  • Antigravity-preview-05-2026 — general-purpose; code execution, file management, web access
  • Deep-research-preview-04-2026 — fast research mode
  • Deep-research-max-preview-04-2026 — exhaustive research (slower, higher output quality)

Each agent runs on Gemini 3.5 Flash, which Google reports as four times faster than comparable frontier models at similar quality.

The Interactions API: Stateful by Design

Unlike a standard generateContent call, the Interactions API maintains state across turns via previous_interaction_id. When you resume a session, the agent’s working directory, file system, and execution context are all intact — the sandbox persists between calls.

Interaction history is stored by default: 55 days on paid tiers, 1 day on the free tier. Set store=false if you’re handling data that shouldn’t be logged on Google’s infrastructure.

The supported SDKs are google-genai >= 2.0.0 for Python and @google/genai >= 2.0.0 for JavaScript and TypeScript. The older google-generativeai and @google/generative-ai packages are deprecated as of this release.

Antigravity 2.0: The Platform Behind the API

Managed Agents are one piece of a larger repositioning. Google upgraded Antigravity from an IDE plugin to a standalone agent orchestration platform at I/O 2026. The release ships four distinct surfaces:

  • Desktop app — redesigned around agent orchestration, not code editing. Supports scheduled background tasks so agents run without manual prompting.
  • Antigravity CLI — a rewrite in Go, replacing the Gemini CLI, with a lighter footprint and lower latency.
  • Antigravity SDK — programmatic access to the same agent harness Google uses internally, hostable on your own infrastructure.
  • Interactions API — the API-first surface covered above.

Custom agents are defined in plain markdown: AGENTS.md for system instructions, SKILL.md for reusable capabilities. You register the configuration with the API and invoke it by ID. No custom orchestration code required — which is either liberating or alarming, depending on how much control you want over your agent’s behavior.

The June 8 Schema Change You Cannot Miss

If you integrated the Interactions API during the earlier developer preview, this is time-sensitive. Google changed how responses are structured: the outputs array is now steps. The legacy schema is supported until June 8, 2026, at which point it is removed.

This is not a conceptual change — you’re extracting the same data from a different key. But if you ship against the old schema and miss the cutoff, your agent responses will silently fail. Grep your codebase for outputs in any Interactions API response handling and update before June 8.

What This Means for the Apps We Ship

As a mobile app studio — see our process for how we think about backend architecture — the most interesting implication isn’t AI coding tools. It’s using Managed Agents as a backend primitive.

Features that previously required multi-step orchestration pipelines (call LLM → parse result → call tool → call LLM again → handle errors at each step) now collapse into a single Interactions API call. A user uploads a PDF, the agent extracts structure, runs a calculation in a sandboxed Python environment, and returns a formatted result — all server-side without us managing any execution infrastructure.

The persistent session model makes this viable for real product features, not just demos. A research agent can browse the web, accumulate context across turns, and produce a structured output — invoked from a mobile background task, billed per interaction.

We’re cautious about two things: the 55-day interaction storage policy needs scrutiny in regulated industries or any product handling personal data, and ceding execution control to a remote sandbox means your debugging surface is Google’s logs, not yours. For tasks with inherent complexity and variable steps, the trade-off is probably worth it. For anything deterministic, write the function yourself.

We’re watching how Google opens up the Gemini Enterprise Agent Platform (currently in private preview) — that’s where the compliance and data residency controls will land, and it’ll determine whether Managed Agents are viable for the health and finance products we build for clients.

Sources

  1. gemini-skills SKILL.md — Gemini Interactions API — Google Gemini, May 2026
  2. Introducing Managed Agents in the Gemini API — Google Blog, May 19 2026
  3. I/O 2026 developer highlights: Antigravity, Gemini API, AI Studio — Google Blog, May 19 2026
  4. Google Launches Antigravity 2.0 at I/O 2026 — MarkTechPost, May 19 2026
  5. Google Opens Managed Agents Preview in Gemini API — WinBuzzer, May 20 2026