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.
| Model | Input Price (per 1M tokens) | Output Price (per 1M tokens) | Key Feature |
|---|---|---|---|
| Gemini 3.6 Flash | $1.50 | $7.50 | Default agent model; high reasoning/coding |
| Gemini 3.5 Flash | $1.50 | $9.00 | Previous generation; higher output cost |
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 | Lowest 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
The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.
Keep Reading
How to Automate Agent Evaluation With Google Quality Flywheel
Learn how to configure Google's new Agent Quality Flywheel skill to automate evaluation, grading, and prompt optimization for your AI coding agents.
Gemini API Gains Remote MCP and Asynchronous Background Tasks
Google updated its Gemini Managed Agents API with asynchronous background execution, remote Model Context Protocol support, and hybrid function calling.
Google Gemini API Adds Flex and Priority Tiers for Scale
Google launches Flex and Priority inference tiers for the Gemini API, offering developers new ways to optimize costs and reliability for AI workflows.
Threat Actor Automates Botnet Infrastructure via Gemini CLI
A Russian-speaking threat actor utilized a jailbroken version of Google's Gemini CLI to manage command-and-control servers for eight malware botnets.
AI Pipeline Discovers CVE-2026-3985 in Creative Mail
Cybersecurity firm Intruder combined Joern code slicing with LLM agents to autonomously discover and exploit a blind SQL injection in a WordPress plugin.