The problem: agents want to execute code
Sooner or later, every useful AI agent wants to run code. It might be a data-analysis agent that writes a pandas script, a coding agent that runs tests, or a research agent that spins up a headless browser. The model generates the code, so from an architecture point of view that code is untrusted input .
The usual options are uncomfortable:
Run it in the agent's own container, and the generated code can read your environment variables, call the metadata server and act as your service account.
Spin up a new Cloud Run job or VM per task, and you pay in latency, plumbing and cost for every tool call.
Run a separate sandbox service, and you now own another piece of infrastructure, plus the networking and auth between the two.
Cloud Run sandboxes (currently in Preview) target exactly this gap.…