Key takeaways

  • Your browser does not support the audio element.
  • 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…
  • 5 Flash-Lite for lower cost, or pin to your model of preference.

What happened

Your browser does not support the audio element. This content is generated by Google AI. Generative AI is experimental With managed agents in the Gemini Interactions API, a single API call coordinates, reasoning, code execution, package installation, file management, and web retrieval inside an isolated cloud sandbox.

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. " - Alston Lin, Founder & CTO of OffDeal Managed agents are now available on free tier projects. Developers can experiment with agentic workflows using an API 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 pass max_total_tokens inside agent_config to cap total consumption (input + output + thinking). When the agent reaches the limit, execution safely pauses and the interaction returns status: "incomplete". The environment state is preserved, enabling you to continue where it stopped by passing previous_interaction_id with a fresh budget.

Why it matters

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/genai TypeScript/JavaScript SDK. For Python or cURL, check out the Antigravity agent documentation. 6 Flash by default. No code changes are required. Your next interaction picks it up automatically. model when creating an interaction or managed agent.

5 Flash-Lite for lower cost, or pin to your model of preference. Environment hooks let you run your custom scripts before or after every tool call the agent makes inside its sandbox. json into your environment and the runtime executes your handlers on pre_tool_execution or post_tool_execution events.

The matcher field 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 the hooks documentation. Teams are already using hooks to build production-grade validation pipelines. For example, AI-native investment bank Offdeal uses post_tool_execution hooks 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.

What to watch

Automate recurring agent tasks with scheduled 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. The Environments API lets 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 the Gemini Interactions API overview and the managed agents quickstart to explore custom agent definitions, environment configurations, network rules, and advanced streaming patterns.