On July 28, Google published an update to managed agents in the Gemini API1. The notable addition is environment hooks, which run custom scripts before and after tool calls inside the sandbox (pre_tool_execution / post_tool_execution). Target tools can be selected with regex matchers, and pre-execution hooks can block an operation and return a denial reason1.
The update also adds max_total_tokens in agent_config, capping total consumption across input, output, and thinking. When the cap is reached, execution pauses and returns status: "incomplete", with the environment state preserved so the run can resume1. Also new: Triggers, which bind an agent, environment, prompt, and cron schedule into a single persistent resource for recurring runs; an Environments API for listing and deleting sandbox sessions; and availability on projects whose API keys have no active billing1. The antigravity-preview-05-2026 agent now defaults to Gemini 3.6 Flash with no code changes required, and agent_config.model can still select Gemini 3.5 Flash or 3.5 Flash-Lite explicitly1.
Sources
- Gemini API Managed Agents: 3.6 Flash, hooks, and more - Google official blog (Philipp Schmid, Mariano Cocirio, July 28, 2026)