Introducing Managed Agents in the Gemini API

May 19, 2026

|

The Gemini API now supports managed agents. Run the Antigravity agent in a secure cloud sandbox, build custom agents with your own instructions, skills and data and define them as versionable files using AGENTS.md and SKILL.md.


Ali Çevik

Member of the Technical Staff, Google DeepMind

Philipp Schmid

Member of the Technical Staff, Google DeepMind


Listen to article
[[duration]] minutes
This content is generated by Google AI. Generative AI is experimental

Today, we're launching Managed Agents in the Gemini API. With a single call, you can now spin up an agent that reasons, uses tools and executes code in an isolated, ephemeral Linux environment. This experience is powered by the new Antigravity agent, built on Gemini 3.5 Flash and available via the Interactions API and in Google AI Studio.

Building a production-grade agent meant managing complex infrastructure, scaffolding and managing isolated sandboxes to serve your customers as you prepare to scale. With Gemini Managed Agents, we’re abstracting away the complexity, so you can focus on your product experience and agent behavior.

Get access to Google's agent infrastructure

In December, we launched Deep Research as our first managed agent for complex research tasks. Now, we are opening up our agent harness and infrastructure so you can build your own custom managed agents.

A single API call to the Antigravity agent provisions a remote Linux environment where the agent can:

  • Reason, plan and call tools using the harness
  • Execute code and manage files in an isolated Linux sandbox
  • Browse the web to fetch and process live data

Each interaction creates or receives an environment, which you can use in follow-up calls to resume the session with all files and state intact.

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Plot the growth of solar energy generation globally and make some slides in HTML.",
    environment="remote", # Remote linux environment hosted by Google
)

print(interaction.output_text)

Define your own agents

You can extend the Antigravity agent with your own instructions and skills. Instead of writing complex orchestration code, you can define everything in markdown files like AGENTS.md and SKILL.md and register them as a managed agent.

# Define your agent and register as managed agent
agent = client.agents.create(
    id="data-analyst",
    base_agent="antigravity-preview-05-2026",
    base_environment={
        "type": "remote",
        "sources": [
            {"type": "inline", "target": ".agents/AGENTS.md", "content": "You are a data analyst agent..."},
            {"type": "inline", "target": ".agents/slide-maker/SKILL.md", "content": "---name: slide-maker ...--- # Slide Maker ..."}
        ]
    }
)

# Call your agent using Interactions API
result = client.interactions.create(
    agent="data-analyst",
    input="Analyze the Q1 revenue data and create a slide deck",
)


print(result.output_text)

What developers are building

We’ve been working closely with a small set of developers both internally and externally to test the product and give us feedback. Here’s some of what they have to say:

Getting started

Managed Agents in the Gemini API is rolling out later today in preview in the Gemini API. You will also be able to get started instantly with our new custom templates in the Google AI Studio Playground. Check out our developer documentation on how to build, including a new Gemini API agent skill designed to help coding agents scaffold and manage your custom agents.

For enterprises, we’ve also added support for managed agents in Gemini API on the Gemini Enterprise Agent Platform in preview.

Get the latest news from Google in your inbox

Sign up for our newsletters with product updates, event information, special offers, and more.

Your information will be used in accordance with Google's privacy policy. You may opt out at any time.