Gemini API managed agents offer new features including 3.6 Flash, hooks, and more
The Gemini API now standardizes its Managed Agents to operate on Gemini 3.6 Flash by default. Among the new features introduced are environment hooks, which allow users to block, lint, or audit tool calls within the sandbox environment. Additional enhancements include budget controls, scheduled triggers, and free tier access.
The latest updates expand on the previous release, which introduced background tasks and integrated remote MCP servers. These enhancements facilitate operations such as coordination, reasoning, code execution, package installation, file management, and web retrieval, all within a secure cloud sandbox using a single API call.
For those utilizing an AI coding assistant, the Interactions API skill can be accessed by running a specific command in the terminal: npx skills add google-gemini/gemini-skills --skill gemini-interactions-api.
Examples using the @google/genai SDK for TypeScript/JavaScript are provided, with additional documentation available for Python or cURL in the Antigravity agent documentation.
Model Selection and Environment Hooks
The antigravity-preview-05-2026 agent now runs on Gemini 3.6 Flash by default without requiring code changes. Users can also select models explicitly by specifying agent_config.model when creating an interaction or managed agent. Options include Gemini 3.5 Flash-Lite for lower costs or selecting a preferred model.
Environment hooks allow custom scripts to run before or after tool calls within the sandbox. Users can add a .agents/hooks.json file into their environment to execute handlers on pre_tool_execution or post_tool_execution events. The matcher field supports regular expressions for targeting multiple tools or catching all with *.
These hooks are already being utilized by teams to establish production-grade validation pipelines. For instance, AI-native investment bank Offdeal uses post-tool-execution hooks to automate image verification in a remote sandbox, ensuring company logos in banker decks meet specific criteria.
“OffDeal is an AI-native investment bank, and Archie is the AI analyst our bankers use every day. A requirement for banker-ready decks is company logos: buyer tables, sponsor columns, tombstone grids, often 30+ logos in a single deck, every one of which must be the right company, the appropriate size and aspect ratio, contain the name, have a transparent background, and have a high contrast when placed on a white slide. Before agent hooks, we couldn’t do this on Gemini’s managed agents. With hooks, a post_tool_execution hook triggers our pipeline inside the sandbox the moment Archie writes its company list, fetching candidates, enforcing pixel-level quality checks, verifying each logo with Gemini vision, and publishing a manifest of approved files that are the only images allowed into the deck.” – Alston Lin, Founder & CTO of OffDeal
Free Tier and Budget Controls
Managed agents are now accessible on free tier projects, allowing developers to experiment with agentic workflows without active billing. To manage task complexity and resource usage, users can set a maximum token limit via max_total_tokens in agent_config. If this limit is reached, the agent pauses execution safely and returns an “incomplete” status, preserving the environment state to allow continuation when resources are replenished.
Scheduled Triggers and Environment Management
Recurring tasks can be automated using scheduled triggers, which bind an agent, environment, prompt, and cron schedule into a persistent resource that activates without manual intervention. The same sandbox is reused for each run, maintaining file continuity across executions.
The Environments API facilitates the listing, inspection, and deletion of sandbox sessions from code, enabling the recovery of environment IDs after a disconnection or the cleanup of sandboxes once a pipeline concludes, rather than waiting for the default 7-day expiration period.
These updates transform managed agents into efficient, cost-controlled, and autonomous workers that function seamlessly in real development environments, eliminating the need for external orchestration and helping manage budget constraints.
For more detailed information on custom agent definitions, environment configurations, network rules, and advanced streaming patterns, users are encouraged to explore the Gemini Interactions API overview and the managed agents quickstart guide.