Gemini API managed agents default to 3.6 Flash with environment hooks
Developers can prototype autonomous agent workflows inside a sandbox, using free tier access and token caps to control costs.
At a glance
- Gemini 3.6 Flash is the default for Managed Agents in Gemini API.
- Free tier access is available for managed agents on projects without active billing.
- Max total tokens (max_total_tokens) can cap usage; the example shows 10,000 tokens.
- Explicit model pinning is supported via agent_config.model, including Gemini 3.5 Flash-Lite for lower cost.
The story
Google's blog introduces Managed Agents in the Gemini API, noting that Gemini 3.6 Flash is now the default for these agents and that new environment hooks let you block, lint, or audit tool calls inside the sandbox.
The post explains that you can explicitly select models by passing agent_config.model, with Gemini 3.5 Flash-Lite available for lower cost and the option to pin to a preferred model. It also highlights how scripts can be integrated into the agent workflow using the antigravity-preview-05-2026 release tag.
Environment hooks are a key feature, described as a way to run custom scripts before or after every tool call inside the sandbox. The example configuration shows pre_tool_execution and post_tool_execution hooks that can, for instance, enforce security checks or code formatting.
Google provides real‑world context for production use, citing an AI-native investment bank example where a post_tool_execution hook triggers a validation pipeline inside the sandbox to verify assets like logos and publish an approved manifest. The post also notes that managed agents can run multi-turn autonomous loops, which necessitates budgeting controls and pause-and-resume behavior if limits are reached.
The article also covers budgeting and scheduling: managed agents are now available on free tier projects, and a max_total_tokens setting caps overall consumption. If the limit is hit, execution pauses with status 'incomplete' and can be resumed later using a previous_interaction_id with a fresh budget, while recurring tasks can be set with scheduled triggers to reuse the same sandbox.