Skip to content

Gemini API Managed Agents: 3.6 Flash, hooks, and more

24 8 月, 2026

Managed Agents in Gemini API now default to Gemini 3.6 Flash. New environment hooks let you block, lint, or audit tool calls inside the sandbox. Also, we’ve added budget controls, scheduled triggers, and free tier access.

Managed Agents in Gemini APIare gettingenvironment hooks,model selection, andfree tier access. These capabilities build on our previous release introducingbackground tasks and remote MCP server integration.

With managed agents in theGemini Interactions API, a single API call coordinates, reasoning, code execution, package installation, file management, and web retrieval inside an isolated cloud sandbox.

If you’re using an AI coding assistant, drop this in your terminal to give it access to the Interactions API skill:npx skills add google-gemini/gemini-skills –skill gemini-interactions-api.

Below are examples using the@google/genaiTypeScript/JavaScript SDK. For Python or cURL, check out theAntigravity agent documentation.

Theantigravity-preview-05-2026agent now runsGemini 3.6 Flashby default. No code changes are required. Your next interaction picks it up automatically.

You can also explicitly select models by passingagent_config.modelwhen creating an interaction or managed agent. Use Gemini 3.5 Flash-Lite for lower cost, or pin to your model of preference.

Environment hookslet you run your custom scripts before or after every tool call the agent makes inside its sandbox. Add a .agents/hooks.jsoninto your environment and the runtime executes your handlers onpre_tool_execution or post_tool_executionevents.

Thematcherfield supports regular expressions, allowing you to target multiple tools with|or catch everything with*:

For complete HTTP hook definitions and failure handling semantics, refer to thehooks documentation.

Teams are already using hooks to build production-grade validation pipelines. For example, AI-native investment bank Offdeal usespost_tool_executionhooks to run automated image verification inside the remote sandbox.

“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: the sandbox is remote, so our validation code had nowhere to run. 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.”

Managed agents are now available onfree tier projects. Developers can experiment with agentic workflows using anAPI key from a project without active billing.

Because managed agents execute multi-turn autonomous loops, complex tasks can consume significant token budgets. To prevent runaway tasks, you can passmax_total_tokensinsideagent_configto cap total consumption (input + output + thinking).

When the agent reaches the limit, execution safely pauses and the interaction returnsstatus: “incomplete”. The environment state is preserved, enabling you tocontinue where it stoppedby passingprevious_interaction_idwith a fresh budget.

Automate recurring agent tasks withscheduled triggers. A trigger binds an agent, environment, prompt, and cron schedule into a persistent resource that fires without manual intervention. Each run reuses the same sandbox, so files persist across executions.

TheEnvironments APIlets you list, inspect, and delete sandbox sessions from code. Recover environment IDs after a disconnect, or clean up sandboxes when your pipeline finishes instead of waiting for the 7-day TTL.

These updates turn managed agents into cost-controlled, scheduled workers that operate autonomously inside real development environments without breaking your budget or requiring external orchestration.

Check out theGemini Interactions API overviewand themanaged agents quickstartto explore custom agent definitions, environment configurations, network rules, and advanced streaming patterns.