AI Engineer World's Fair 2026
Why AI Agents Should Have Their Own Sandbox — Philipp Schmid, Google DeepMind
Loading slides…
Read the talk
Why AI Agents Should Have Their Own Sandbox
Philipp Schmid explains how Gemini's Interactions API and managed Antigravity agent move execution into a persistent cloud environment, then opens up an AI Talk Radio demo to show how instructions, skills, and model calls fit together.
From a talk by Philipp Schmid
At a glance
Ideas worth remembering
Interaction history and sandbox files carry different kinds of continuity: an interaction ID preserves conversational context, while reusing an environment preserves the place where actions changed files and installed tools.
Typed steps let function results and other execution events retain their meaning instead of being represented as ordinary user messages.
An agent can prepare an environment, then use its environment ID to define a reusable agent whose later calls start with the installed tools and skills.
AI Talk Radio makes the file-based mechanism concrete: instructions describe the show, skills explain procedures, and Python calls through the Interactions API produce speech for the final mix.
Managed execution moves the function-calling loop onto the server; developers can still supply environment files and connect remote or local MCP servers.
From completing sentences to working toward a goal
A model that continues a poem needs text. An agent asked to research a topic, create files, and return later needs somewhere to work. Philipp Schmid, who works on AI Studio and the Gemini API at Google DeepMind, starts with that change in expectations: applications have moved from requesting an answer to assigning a goal, describing how to verify it, and hoping the system can keep working for hours or days.
The progression explains why the surrounding API has to change. Early text completion extended a supplied prefix. Instruction following made questions and answers useful. Chat introduced alternating user and model messages, and function calling let the model request actions. Once reasoning and actions sit between the initial request and the final result, the application has to represent more than a conversation: it has to handle ongoing work and the environment that work changes.
The opening also points to an expanding workload: image generation and programmatic video creation and editing join text in the API. For experimentation, AI Studio provides API-key setup, billing, and budgets without a separate trip into Google Cloud. The rest of the talk develops the execution model beneath those capabilities.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
One interface, with history and long-running work on the server
The Interactions API gives models and agents the same basic calling pattern. Choose a model or agent, supply an input, and attach the tools or environment it needs. Input can be a string or multimodal data. Schmid compares this to OpenAI's Responses API: the important change for this talk is that calling an agent does not require a separate style of interface from calling a model.
What must a client send when work continues? With server-side state, a follow-up request supplies the new input and the previous interaction's ID. The server assembles the earlier context so the model can see what has happened. This moves history management out of the client; the application still identifies which interaction it is continuing.
python
from google import genai
client = genai.Client()
# 1. First turn
interaction1 = client.interactions.create(
model="gemini-3-flash-preview",
input="Hi, my name is Phil."
)
print(f"Model: {interaction1.output_text}")
# 2. Second turn (passing previous_interaction_id)
interaction2 = client.interactions.create(
model="gemini-3-flash-preview",
input="What is my name?",
previous_interaction_id=interaction1.id
)
print(f"Model: {interaction2.output_text}")
Long-running operations address a different problem. Video generation can take long enough that keeping an HTTP connection open is inconvenient. The client starts the operation, receives an ID, and follows completion through streaming or polling. Conversation history and operation tracking both use identifiers, but serve different purposes: one carries context forward; the other lets an application follow unfinished work.
The same interface extends to output modalities. For speech, the request selects Gemini TTS, supplies the input, requests audio output, and configures a voice. Image generation follows the corresponding pattern: select the image model, supply the input and generation configuration, then receive an image. The shared interface keeps the request structure familiar while modality-specific settings describe the desired result.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A CVE lookup shows why tool results need their own type
The React CVE example makes tool composition concrete. What does each tool contribute to turning a question about vulnerabilities into usable records?
- Google Search: Finds relevant material about CVEs affecting React.
- URL context: Visits the websites used in the lookup.
- Custom function calling: Gives the findings structure suitable for later lookup or storage in a database.
The request declares these capabilities together, and the model decides which tool it needs to call. This is a small lookup agent; the example explains how information becomes structured output, without establishing that the search finds every relevant vulnerability.
That example exposes a mismatch in a simple user/model transcript. A function's output comes from the environment, yet an older turn-based representation can require returning it as user content. Reasoning introduces another kind of event: a model may expose thoughts or a signature before it produces its answer. Treating all of these as ordinary conversation turns obscures what actually happened.
Interactions instead represents execution as a timeline of typed steps. Each action or generation has its own type, and a function result is returned as a function result. The distinction gives the application a more explicit record of execution and leaves room for new event types. A user request, a generated answer, and an environment's return value can retain their different meanings.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The sandbox holds the work between requests
The Antigravity agent in the Gemini API uses the same harness as the Antigravity product. Here, a harness means the backend machinery that runs the agent. It does not imply identical agents: the IDE's coding agent and the API agent can have different tools and system instructions. Improvements to Gemini's behavior with the shared harness can benefit both products while their configurations remain distinct.
An environment field supplies the agent with a managed cloud sandbox. The backend starts it, and the agent can run code, create and edit files, install dependencies and tools, and call APIs. The developer sends a request rather than provisioning the execution infrastructure. This is the practical meaning of giving an agent its own computer: its actions have a filesystem and runtime in which to take effect.
The environment can persist across interactions. In Schmid's example, an initial request researches the latest technology news and creates a file; a follow-up reuses the same environment. The next request therefore has access to the earlier filesystem work, alongside the conversation context carried by interaction state. Persistence is described as a capability here, without a specified retention period.
The filesystem also provides a way to share work. Three agents can use one environment and exchange context through files, or a subagent can pick up work another agent has done. That makes file creation useful beyond a single request: it can become a handoff between agents. Shared access is the mechanism described; it does not by itself define how simultaneous edits are coordinated.
A useful computer needs the right starting material. Sources can come from GCS buckets, GitHub repositories, or inline files. Skills stored in the skills directory are picked up automatically and included in the system instruction, as is an AGENTS.md file. These files supply procedures and instructions that shape how the agent uses the environment.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Turn a prepared environment into a reusable agent
Sending all configuration in an individual request is convenient until another team needs to reuse the agent. The Agents API packages a base agent, instructions, and an environment into a reusable definition. The environment can be described through sources or taken from an existing environment.
How does work done during setup become the starting point for later calls? Schmid's example lets an agent install the GitHub CLI, add skills, and perform sanity checks. Once setup finishes, its environment ID is used to create a new agent. Calls to that agent then start from the prepared environment. The dependency matters: the reusable agent is defined from the result of setup, so its callers do not have to repeat that scaffolding themselves.
The Gemini API CLI provides a command-line route to these operations. It is an API client rather than a coding agent, and is distinct from Gemini CLI. An existing agent can use it to request generated assets, create agent definitions, and iterate on them. Dedicated skills for the Interactions API and Agents API supply additional guidance for that work.
From setup work to a reusable starting environment
Read the diagram as text
- Agent prepares environment. Installs GitHub CLI, adds skills, and performs sanity checks.
- Prepared environment ID. Returned after the setup agent finishes.
- Create reusable agent. Define the base agent and instructions using the existing environment.
- Later agent calls. Start from the preloaded, preconfigured environment.
- Agent prepares environment → Prepared environment ID: Returns identifier after completion.
- Prepared environment ID → Create reusable agent: Identifies the environment to reuse.
- Create reusable agent → Later agent calls: Supplies prepared starting environment.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
AI Talk Radio turns one topic into a performed debate
AI Talk Radio puts a simple UI over a managed agent with access to research, thumbnail generation, speech, and music. The live input asks whether pineapple belongs on pizza. The environment starts, the model considers the work, installs Python dependencies, reads the skills, and continues. Those setup actions are part of producing the show, rather than tasks the user performs beforehand.
While that request runs, Schmid plays an earlier show about whether cereal or milk should go into a bowl first. The distinction matters: the recording demonstrates playback of the earlier output, rather than completion of the live pineapple request. The example aims for a call-in radio format, with a host introducing a topic and multiple characters offering opinions.
The generated host, Paul, welcomes David from Boston. David makes cereal the “independent variable”: pour it first, observe its volume, then add enough milk to complement it. He also argues that dropping dry cereal into milk causes splashing and compares milk-first preparation to putting gravy in a bowl before the mashed potatoes. Paul turns those remarks into two themes—cleanliness and portion control—then introduces Sarah from Sydney, who opens the counterargument with texture.
That short exchange shows what the workflow produces: differentiated characters, a developed argument, a host's transition, and the beginning of a rebuttal, delivered as speech. The fictional locations and callers belong to the generated program. They give the output a radio-show structure rather than implying real people have joined a live broadcast.
The applet sits in AI Studio's Build gallery and can be remixed. A developer could change the format toward a podcast application while retaining the underlying generation capabilities. The next part of the demo opens the code to show what must move with that behavior.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Inside the radio agent: instructions, skills, and Python
“Our agent is just files” is the useful compression of the demo's implementation. An AGENTS.md file lives inside the environment and is loaded into the system instruction at startup. It tells the agent to research, write scripts for the different people, generate music and speech, and mix the outputs together. The managed runtime executes the agent, while these files describe the application-specific work.
Where does a text instruction become an audio-producing action? The TTS example has both a skill explaining how to run generation and a Python file implementing it. That Python file calls other Gemini models through the Interactions API to generate speech the agent can use. The instruction file describes the intended show; the skill describes a procedure; the Python implementation makes the model request. Together, they connect planning to an artifact that can be mixed into the program.
This file-based arrangement also explains the path from an applet to a backend. Schmid describes copying the agent files, creating the agent, and invoking it outside the UI. The reusable part is the instruction and skill setup in its environment; the radio interface is one way to supply a topic and present the result.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Inspect the computer, retrieve its files, and leave the loop on the server
The final demo makes the environment itself the subject of the request. In the playground's agent picker, Schmid selects the standard Antigravity template and asks it to explore where it is running. He estimates seven to ten seconds for the first request to start the environment. The agent runs inspection commands and reports Ubuntu, eight vCPUs, 16 GB of memory, Python, and pip. These are the reported properties of this demo environment, rather than a specification for every sandbox.
System Profile and Resource Allocation
By aligning our execution strategies with the exact capabilities of this system, we minimize operational friction and maximize throughput:
• Operating System: Ubuntu 24.04.4 LTS (Noble Numbat). Detailed system configuration parameters can be referenced in the system configuration file: /etc/os-release.
• Kernel Version: Linux 4.19.0-gvisor x86_64 (running under a secure and optimized gVisor virtualization layer).
• Computational Capacity:
◦ CPU: 8 vCPUs (configured as 8 cores per socket), which provides excellent parallel processing capabilities to complete tasks rapidly.
◦ Memory: 15 GiB of total system RAM (with approximately 15 GiB currently free), enabling us to handle memory-intensive operations without bottlenecking or triggering out-of-memory errors.
Pre-Installed Tooling (Zero-Setup Friction)
The presence of pre-configured tools eliminates installation overhead, saving valuable time and energy:
• Python: version 3.12.3 (accessible via python3)
• pip: version 24.0 (for installing packages, use --break-system-packages where necessary)
• curl: version 8.5.0 (fully enabled with support for HTTPS, HTTP2, and standard networking protocols)
A follow-up asks whether Node is installed, continuing the investigation in the environment. The recording does not give that answer. For work that produces files, the playground offers an environment download, and an API provides a retrieval route as well. This completes the practical path from remote execution to artifacts a user can extract or share.
The closing explanation locates the main architectural decision. In a client-managed agent, the application receives a function call, executes it somewhere, and sends back the result. With the managed agent, a request starts the sandbox, loads the files, and runs the agent loop on the server. The single API call is the entry point to that execution; the work inside it can still involve many actions and model calls.
Tools can extend that environment in two ways: connect a remote MCP server, or run a local MCP server inside the sandbox. The developer trades direct responsibility for provisioning and driving the loop for a managed execution path, while still supplying the files, instructions, and tools that determine what the agent can do. Schmid closes by pointing to the agents quick start and coding skills as the route to sending a first request and building a reusable agent.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Full transcript
Loading transcript…