source: Google AI: Gemini API Managed Agents: 3.6 Flash, hooks, and more
level: technical
Google has updated managed agents in the Gemini API, making Gemini 3.6 Flash the default model. Developers can now use environment hooks to run custom scripts before or after tool calls inside the sandbox. The update also introduces budget controls, scheduled triggers, and free tier access. These features build on earlier background task and remote MCP server integration, aiming to give developers more control over autonomous agent workflows.
Environment hooks let teams block, lint, or audit tool calls by defining handlers in a .agents/hooks.json file. For example, a pre-execution hook can deny a code_execution call if a security script returns a rejection. Offdeal, an AI-native investment bank, uses post-execution hooks to verify company logos inside the sandbox. Budget controls cap total token usage via max_total_tokens, pausing execution when the limit is reached and preserving state for later resumption.
Managed agents are now available on free tier projects, allowing experimentation without billing. Scheduled triggers bind an agent, environment, and prompt to a cron schedule for recurring tasks, reusing the same sandbox across runs. The Environments API lets developers list, inspect, and delete sandbox sessions programmatically. These changes turn managed agents into cost-controlled, scheduled workers that operate autonomously inside real development environments without external orchestration.
why it matters: These updates give AI developers production-ready controls for autonomous coding agents, including safety hooks, cost limits, and scheduling, reducing the need for external orchestration.
source: Google AI: Gemini API Managed Agents: 3.6 Flash, hooks, and more