NewsAI & DevelopmentDeveloper Tools

Gemini API Managed Agents: Full Sandbox, One API Call

Gemini API Managed Agents: a glowing blue API node connected to Python code snippets and a Linux sandbox terminal icon
Google Gemini API Managed Agents — spin up a full agent sandbox with a single API call

Google shipped something interesting at I/O 2026 today: a way to spin up a fully sandboxed, tool-equipped AI agent with a single Python function call. No sandbox provisioning. No orchestration layer to wire up. No execution infrastructure to manage. The Gemini API Managed Agents feature is live in preview, and if the promise holds, it’s the lowest-friction way to deploy a capable agent in production that any major platform has shipped yet.

What One Call Actually Does

Here’s the code Google is leading with:

from google import genai
client = genai.Client()

interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Read Hacker News, summarize the top 10 stories, and save the results as a PDF.",
    environment="remote"
)

That call provisions an ephemeral Linux sandbox, loads Gemini 3.5 Flash as the underlying model, equips it with web search, code execution, and file management, then runs it autonomously until the task is done. Google handles the entire execution environment. You get back a result. The sandbox disappears.

What the sandbox includes out of the box, with zero configuration:

  • Google Search integration (live web access)
  • Python code execution
  • Full filesystem (read, write, edit, search, list files)
  • URL reader (fetch and parse any web page)
  • Bash terminal access
  • State persistence across multi-turn interactions
  • MCP server support for external integrations

The comparable DIY setup — provisioning a container, wiring up tools, handling state, managing the execution loop — is hours of work. Managed Agents collapses it to an import and a function call. That’s a real reduction in friction, not marketing copy.

Three Ways to Customize It

The default Antigravity agent is a capable generalist, but most production use cases need something more specific. Google offers three customization levels:

Inline at call time. Pass system instructions and tools directly in the create() call — no registration, no prior setup. This is the fastest path for prototyping:

interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Analyze this CSV and produce a summary report.",
    system_instructions="You are a data analyst. Always cite your sources.",
    tools=["code_execution", "file_management"]
)

File mounting. Drop an AGENTS.md into the sandbox with behavioral instructions, add skills under .agents/skills/, and put reference data in workspace/. If you’ve used Claude Code, this pattern is identical — and that convergence is probably not coincidental. The AGENTS.md convention is quietly becoming a cross-platform standard for defining agent behavior in text files.

Named registry. Register an agent configuration once and invoke it by ID in subsequent calls. The right move for production workloads where you want consistent, repeatable behavior without re-specifying config on every interaction.

The Cost Question

During preview, Google is not charging for environment compute — CPU, memory, and sandbox execution are free. Only token usage and tool calls are billed, at standard Gemini 3.5 Flash rates.

Here’s the gotcha worth knowing before you ship anything: the Antigravity agent doesn’t make one inference call per interaction. It runs through multiple autonomous reasoning loops, and each loop burns tokens. A task that looks like a single API call from the outside can generate thousands of tokens internally as the agent plans, executes, checks results, and iterates. Google’s own documentation flags this explicitly.

The practical implication: test with token logging enabled before you attach this to anything user-facing. Know your p95 token cost per interaction before you price a feature around it. The sandbox is free during preview; the model inference is not.

The Bigger Picture

The serverless analogy is hard to avoid. In 2015, Lambda removed the need to manage web servers for event-driven workloads. Managed Agents are making a similar play for agent execution environments. The bet Google — and OpenAI and Anthropic — are making is that developers don’t want to manage agent infrastructure any more than they wanted to manage Nginx configs.

That bet is probably right for the majority of teams. The developers who want to manage their own agent VMs are the same developers who still prefer bare-metal servers: they exist, they have legitimate reasons, but they’re not the majority.

What’s worth watching is the AGENTS.md convention. Both Google and Anthropic have converged on markdown files as the primary way to define agent behavior. If that pattern holds, moving agents between platforms becomes significantly easier — which is either great news for developers or a strategic concession Google just made to its competitors. Probably both.

Who Should Use This Now

Managed Agents are worth testing immediately if you’re building internal tools, batch automation, or research pipelines where sandboxed execution fits the use case. The preview period is the right time to measure your actual token costs before GA pricing is announced.

If you need hard guarantees about the execution environment, specific dependency versions, or are working with data that can’t leave your infrastructure, the hosted sandbox is not the right call yet. For everything else, one API call to a fully equipped Linux agent is a compelling place to start. The documentation is solid, the feature is live today, and the token cost question is answerable with five minutes of testing.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News