Skip to content
IFAI

AI tools

Google upgrades Gemini managed agents with 3.6 Flash and sandbox hooks

Published Reach 40

Google just rolled out major updates to Gemini API Managed Agents, making Gemini 3.6 Flash the new default model. Developers can now run custom pre- and post-tool scripts inside remote sandboxes to lint or block actions, set hard token limits to stop runaway costs, and test autonomous workflows on a free tier.

Google upgrades Gemini managed agents with 3.6 Flash and sandbox hooks
Image: blog.google

Giving an AI agent free rein in a sandbox to install packages and run code sounds great until it starts hallucinating dangerous terminal commands or burns your entire API balance in an infinite loop.

Google just rolled out a suite of upgrades to Managed Agents in the Gemini API, turning its cloud runtime into something developers can actually trust in production.

Guardrails and linters inside the sandbox

Headlining the update is environment hooks. Instead of letting an agent call tools blindly inside its remote sandbox, you can now drop a hooks configuration into the environment to intercept actions before and after execution.

A pre-tool hook can catch risky commands or file writes. If your custom script says deny, the agent's action gets cancelled on the spot, and the refusal reason is fed right back into the model context so it can try another path.

Post-tool hooks work on the flip side for linting and compliance. Alston Lin, founder and CTO of AI-native investment bank OffDeal, noted that their team uses post-tool hooks to enforce strict pixel-level quality checks and logo verification inside the sandbox whenever their AI analyst builds pitch decks.

Hooks can run shell commands directly inside the environment or post data to external HTTP endpoints.

Gemini 3.6 Flash, cron schedules, and token caps

Under the hood, Google swapped the default model for the antigravity preview agent to Gemini 3.6 Flash. Existing implementations get the upgrade automatically without code changes.

Developers can still pin older models or drop down to Gemini 3.5 Flash-Lite if latency and cost are top priorities.

To prevent autonomous loops from running up massive bills, Google added a max_total_tokens parameter. It caps input, output, and reasoning tokens combined. Hit the limit, and the agent pauses safely with an incomplete status while preserving the sandbox so you can resume later.

The update also introduces cron-style scheduled triggers, an Environments API to manage sandbox sessions programmatically, and access for free-tier API keys without active billing.

Why it matters

We think this release shows Google understands what is actually holding back agent adoption: fear of unpredictable behavior and out-of-control bills.

Environment hooks are a clever middle ground. They keep the simplicity of fully managed remote sandboxes while giving developers deterministic veto power over dangerous tool calls using standard Python scripts.

Bundling scheduled cron triggers and token caps directly into the API removes the need to maintain external orchestrators just to run daily code audits or report generation.

The catch is operational complexity. Writing robust hook scripts is on the developer, and overly strict filters could leave agents stuck in confused retry loops. Network latency on external HTTP hooks could also slow execution down.

Still, with a zero-friction free tier now open, anyone building autonomous developer workflows should definitely take this out for a spin.

Sources (1)

  1. [1]
    blog.google(opens in a new tab)Originalblog.google

Best of AI, daily