Pular para o conteúdo
← Back to Skalablog

Published article

What are Gemini Managed Agents and how do they work? — Part 2

Software EngineeringGeminiClaudeClaude Code

Gemini Managed Agents split an agent into two stateful pieces, an interaction and an environment, and that split is the part worth understanding. The interaction holds the conversation; the environment holds the files in the sandbox. Point a new agent at an old environment and it keeps the artifacts while starting a fresh context window.

Part 2 of a series, after What Are Claude Managed Agents and How Do They Work?.

What are Gemini Managed Agents?

Gemini Managed Agents are cloud coding agents that run inside a Google-managed sandbox, started with one call to the Interactions API in the Gemini API. You set the environment to remote, pass normal input, and Google spins up the sandbox. Jack Wotherspoon, a developer experience engineer at Google DeepMind, presented the offering at the AI Engineer conference in a talk published on 26 October 2026.

The case for it is straightforward. A laptop does not scale, and verification steps that run locally can steal the browser or open pop-ups while the agent works. A managed sandbox moves that work to cloud infrastructure and lets an app, a teammate or a scheduled job invoke the same agent configuration.

Google's own description is that the harness inside the sandbox is the same harness used across its Antigravity products, so the tool-call loop is not a separate reimplementation. The model and configuration are set per agent, which makes the harness a delivery mechanism rather than a fixed product.

Treat the launch framing with care. The transcript reports a conference demo and AI Studio availability rather than an independent evaluation, and Google's docs for the Interactions API remain the source of record for current parameters and limits.

How the Interactions API and environment split works

The Interactions API separates conversation state from file state: an interaction manages the turns with the model, while an environment represents the file system inside the sandbox. Passing an interaction ID continues a conversation, and passing an environment ID lets a different agent reuse the same working files.

This split is what makes multi-agent handoffs practical. One agent can gather filings and write metrics to a file; a second agent opens the same environment, starts with an empty conversation, and reads that file from the sandbox file system. The artifacts carry over even though the chat history does not.

Wotherspoon describes both as stateful objects on Google's back end. In the demo, an SEC filing researcher works on Nvidia, writes a metrics file, and a quant agent then loads it and runs Python code against the numbers. A third agent turns the research into a written report.

You can move files in and out of an environment through the API. That means a pipeline can seed a sandbox with a repository or reference documents, then download the outputs later without depending on a local machine.

The five building blocks of a managed agent

A managed agent is assembled from five parts, and knowing which part to change is the fastest way to debug one. The harness decides tool calls, the environment stores sandbox files, skills mount instructions, credentials handle secrets, and triggers schedule runs.

Each block maps to a specific failure mode. If the agent chooses the wrong tool, inspect the harness and model; if a file is missing, inspect the environment; if it ignores company procedure, inspect the mounted skills; if an API call is rejected, inspect credentials; if a run never happened, inspect the trigger.

The transcript describes uploading skills and AGENTS.md files that carry playbooks from a personal coding agent into the sandbox. A GitHub repository can also be connected at startup, which lets the agent inspect code and look for bugs in a managed environment.

Once a configuration works, an agent API call such as agents.create saves it so it can be invoked repeatedly by ID instead of rebuilt for each run.

Models, tools and the long-output option

The harness lets you choose the model per agent, so a fast model can handle routine steps while a stronger one handles analysis. Wotherspoon picks the model with a one-line parameter in the agent config, and the transcript mentions Gemini Flash for speed and the newer frontier model for deep analysis.

He also describes a long-decode option that shares the model's context window between input, thinking and output. His stated contrast is with output caps around 64K tokens, which he says mattered for multi-page financial modeling. Treat both the cap and the gain as Google-reported in a conference talk, not as an independent benchmark.

Built-in tools Claude Code execution, reading and writing files, and Google Search. The agent can also reach external services through MCP tools or remote SMTP servers you bring yourself, which is how a workflow gets from analysis to sending mail or updating a document.

Model names and availability move quickly, so check the current Gemini API documentation before you hard-code a model string in a saved agent configuration.

How secrets and credentials stay out of the sandbox

Secrets never enter the sandbox. A proxy sits between the sandbox and the Gemini API, places a placeholder token where the agent can see it, and injects the real credential only when a matching outbound call is made. The agent cannot leak a token it never held.

The design defends against a specific failure: an agent that notices a credential in its environment and starts exploring other services with it. Because only a placeholder exists inside the sandbox, that exploration reaches nothing useful.

This is a real security control, and it is a narrow one. It reduces credential exposure inside the sandbox; it does not by itself establish regulatory compliance, tenant isolation or suitability for a regulated industry. Network rules, data handling and audit requirements stay your responsibility.

Pair the proxy with least-privilege scopes on each injected credential. The control assumes the credential itself is limited, and a broadly scoped token injected on every request narrows the benefit.

Scheduled triggers and multi-agent workflows compared

Triggers and multi-agent handoffs solve different problems: a trigger decides when an agent runs, while a shared environment decides what an agent can see when it runs. Most production pipelines need both, and confusing them is why some scheduled agents appear to have lost their work.

Wotherspoon gives the stock-market example directly: a trigger fires at 08:30 a.m. before the market opens, the agent runs its task, and a webhook can post the result to Slack or summarize a team's Jira board. Scheduling turns an interactive agent into a recurring job.

Agent-to-agent calls work because a managed agent is just an API call. A coordinating agent can fan work out to narrow agents that each do one task well and write their output to the shared environment. That keeps each step measurable instead of handing an agent one vague instruction.

Workflow patternWhat carries stateBest useMain risk
Single agentOne interaction, one environmentInteractive research or code reviewLong tasks in one context window
Chained handoffShared environment, new interactionResearch then analysis then reportStale or ambiguous files between steps
Scheduled triggerSaved agent plus triggerMorning briefings, recurring scansFailures are invisible without webhooks
Fan-out coordinatorCoordinator plus narrow agentsParallel sub-tasks with clear scopesCoordination cost and duplicated spend

The handoff pattern has a cost worth naming. Fresh context means the second agent does not inherit the first agent's reasoning, only its files, so anything that matters must be written down completely.

What the SEC filing demo actually showed

The demo ran three agents against one environment: a filing researcher gathered Nvidia metrics, a quant agent evaluated the numbers in Python, and a reporting agent turned the result into a document. Step traces showed each tool call, which makes the run inspectable after the fact.

Step traces are the practical debugging tool here. Function results and code execution appear as separate steps, so you can see where a run diverged instead of reading only the final answer. That record is traceability, not proof of correctness.

Wotherspoon also showed a stock research app in AI Studio, Google's browser-based environment for building with Gemini, where several managed agents produced a PDF report with charts and source links. A second demo connected Google Drive receipts to a visualization.

Neither demo is a controlled test of accuracy. The useful claim is narrower: the wiring works end to end, from an API call through sandbox files to a downloadable artifact, and the same pattern can be reproduced with your own documents.

FAQ

  • Do Gemini Managed Agents need a local coding harness? No. The harness runs inside the managed sandbox, so the client only sends input through the Interactions API with the environment set to remote. Local agents remain useful for development and quick experiments away from production.
  • How do two agents share files without sharing conversation history? They share an environment ID. The second agent opens the same sandbox file system with a new interaction, so it sees written files but starts with an empty conversation. Anything not saved to a file does not carry over.
  • Can an agent read my API tokens inside the sandbox? It sees a placeholder, not the real secret. A proxy injects the actual credential when the outbound request matches, which keeps the token outside the sandbox. Scope limits on that credential still matter.
  • What does a trigger add compared with a manual API call? A trigger schedules a saved agent to run without a person starting it, and a webhook can deliver the result elsewhere. It converts an interactive tool into a recurring job that runs on a fixed schedule.
  • Are long outputs and large context enough for financial modeling? That is Google's stated motivation, not an independently measured result. Test the model on your own documents and verify the arithmetic before you rely on long generated output.
  • Where should a team start with cloud agents? Start with one narrow task that writes a file, confirm the step trace looks sane, then add a second agent on the same environment. Automation layers such as the Crazystack Typescript stack come later, once the single-agent loop is reliable.
  • Is a managed sandbox suitable for regulated data? The proxy helps with credential exposure, but it does not establish compliance. Privacy, retention and audit controls remain your responsibility, and the agent should not be treated as a compliance boundary.
  • What is Skala Blog in this context? Skala Blog is the publishing tool behind this article, which turns a recorded conference talk into an edited written draft. It documents the same workflow this article follows: talk, transcript, article.
  • How does this fit a developer learning path such as the Bootcamp do Dev Doido? The Bootcamp do Dev Doido is a Portuguese-language training program, so it is unrelated to how these APIs behave. The transferable lesson is the pattern: one narrow agent, a saved environment, and a trigger.
  • Who presented the Gemini Managed Agents talk, and for context, who is Gustavo Dev Doido? Jack Wotherspoon of Google DeepMind presented it at AI Engineer. Gustavo Dev Doido is a Brazilian developer educator with no involvement in the talk, mentioned here only to avoid confusion between the two.

Turning a conference demo into a working pipeline

This article started as a recorded conference talk, and the same route works for any technical walkthrough you already have. Skalablog takes a YouTube URL, transcribes the video, and turns the transcript into a written article you can review before publishing.

If you have recorded explanations, interviews or internal lessons that only live in video, that material already contains the structure of an article. Pasting the link into Skala Blog starts the transcription and draft, and you keep the editorial decisions about what gets published.

Skala Blog

Source video