Gemini API and the Era of Managed Agents

The biggest mistake we make with AI is treating it like an intern who needs constant supervision. We ask a question, we wait, we copy, we paste. Google just broke that model. With the introduction of Managed Agents on the Gemini API, they did something generous: they gave the AI its own room to work.

With a single call, you can now launch an agent inside its own secure, isolated workspace. It doesn't just chat; it reasons, it uses tools, and it executes tasks independently.

From Hand-Holding to Outcomes

Previously, if you wanted an AI to build something, analyse data, or organise a project, you had to stitch together the servers, manage the security sandbox, and watch its progress every step of the way. For instance, if you need to browse the web to fetch and process live data without building a scraper from scratch, the platform provisions a fresh remote Linux environment hosted entirely by Google in just a few lines of code:

from google import genai

client = genai.Client()
interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Research the top 10 AI stories today and create a PDF briefing with summaries",
    environment="remote",  # Remote Linux environment hosted by Google
)
print(interaction.output_text)

Curating Your Sources

The magic happens when you define your agent from scratch by specifying system instructions, tools, and specific sources (like GitHub, Google Cloud Storage, or inline text). The platform sets up a clean sandbox with your files on every single invocation. Instead of typing long prompts, you orchestrate its knowledge bank directly:

agent = client.agents.create(
    name="data-analyst",
    base_agent="antigravity-preview-05-2026",
    base_environment={
        "sources": [
            {"type": "inline", "target": ".agents/AGENTS.md", "content": "You are a data analyst agent..."},
            {"type": "inline", "target": ".agents/slide-maker/SKILL.md", "content": "Instructions for creating slides..."},
            {"type": "github", "source": "https://github.com/my-org/data-templates.git", "target": "/workspace/"},
            {"type": "gcs", "source": "gs://my-bucket/analysis-skills/", "target": "/.agents/skills/"},
        ]
    }
)

result = client.interactions.create(
    agent="data-analyst",
    input="Analyze Q1 revenue data and create a slide deck.",
    environment="remote",
)
print(result.output_text)

The system hosts the agent in a secure sandbox that remembers its state from turn to turn. It works in the background while you sleep, and it only taps you on the shoulder when the job is done.


Brad Director of Bradcraetive

Brad Rae, Director

P.S. Hook up an agent to your email inbox today, give it a checklist of your business criteria, and let it draft your client replies automatically while you sleep.

Subscribe to Bradcraetive

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe