Ai Agents 3 min read

Gemini API Adds Tool Hooks and 3.6 Flash to Managed Agents

Google updated its Gemini API Managed Agents with the faster 3.6 Flash model and new environment hooks for validating remote tool execution.

Google has expanded its Managed Agents platform in the Gemini API, introducing environment hooks and making Gemini 3.6 Flash the default reasoning engine. The update gives developers a native control layer to monitor and govern tool execution within Google’s hosted cloud sandboxes.

The 3.6 Flash Upgrade

The antigravity-preview-05-2026 agent now runs on Gemini 3.6 Flash by default, replacing the previous 3.5 iteration. Google reports that the new model consumes 17 percent fewer output tokens on average. Performance on the DeepSWE coding benchmark also rose to 49 percent, up from 37 percent in the prior generation.

This release establishes Gemini 3.6 Flash as the primary workhorse for multimodal reasoning and coding, while the flagship Gemini 3.5 Pro remains in partner testing.

ModelInput Price (per 1M tokens)Output Price (per 1M tokens)Key Feature
Gemini 3.6 Flash$1.50$7.50Default agent model; high reasoning/coding
Gemini 3.5 Flash$1.50$9.00Previous generation; higher output cost
Gemini 3.5 Flash-Lite$0.30$2.50Lowest latency; 350 tokens/second

Environment Hooks and Tool Validation

The core technical addition is the ability to inject custom code directly into the agent workflow. Developers can now utilize pre_tool_execution and post_tool_execution hooks to intercept actions before and after they run in the remote sandbox. If you build stateful AI agents, this architecture allows for synchronous blocking, linting, and auditing of tool calls.

OffDeal, an AI-native investment bank, utilized these new hooks to validate graphical outputs. CTO Alston Lin noted that their internal agent, Archie, can now perform pixel-level quality checks on generated company logos within the sandbox. This validation step prevents malformed assets from advancing further down the pipeline.

Operational Controls

To mitigate the risk of infinite generation loops, Google introduced strict token budgets per interaction. You can set hard caps on consumption, ensuring runaway agents do not silently drain your billing account. This is a critical pattern when you look to reduce LLM API costs across autonomous workflows.

Agents can also operate on automated schedules. The API now supports recurring triggers for background tasks like periodic data scraping or system audits without manual prompting. Alongside these triggers, Google opened Managed Agents to the free tier, allowing prototyping without active billing.

If you manage production AI systems, migrating to the new environment hooks centralizes your validation logic. Moving the guardrails directly into the sandbox reduces network latency and prevents unauthorized shell commands before they execute.

Get Insanely Good at AI

Get Insanely Good at AI

The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.

Keep Reading