Introduction to Gemini API Managed Agents

The Google DeepMind Gemini API has recently introduced major enhancements for managed agents, making the creation of AI applications smoother and more secure. These agents now enable a unique interaction between reasoning, code execution, package installation, file management, and web retrieval—all within an isolated cloud sandbox.

Default Flash 3.6 Version

The major update sets Flash 3.6 as the default configuration for all managed agents. This upgrade delivers higher performance and a significant reduction in usage cost without requiring code changes.

How to Benefit Immediately

Simply launch your agent with the same API call as before; the new version is automatically selected. You can also explicitly specify a model via agent_config.model to choose between Flash 3.6 or the Lite variant.

Environment Hooks: Granular Control

The new environment hooks allow you to block, lint, or audit calls to internal sandbox tools. This ensures your agent stays within defined limits and follows security best practices.

  • Blocking unauthorized calls
  • Automatic linting for generated code
  • Full audit before final execution

Implementation Example

“By adding a lint hook, you can intercept any attempt to inject malicious code and correct it in real time.”

The hooks are configurable via the @google/genai SDK, offering seamless integration into your Node.js or Python projects.

Advanced Budget Control

Google has introduced a budget control mechanism for managed agents, allowing you to set spending caps and receive alerts when they’re reached. This feature is crucial for businesses looking to master their AI costs.

Managing Budgets in Code

By adding a budget_limit parameter during agent creation, you impose a monetary cap. The sandbox automatically monitors spending and stops execution if the ceiling is exceeded.

Scheduled Triggers and Free Tier Access

Managed agents can now be triggered at precise times using new scheduled triggers—ideal for automating recurring tasks like report generation or data analysis.

Free Tier Entry-Level Access

Google added a free tier that lets developers experiment with agents without upfront costs. This plan includes a generous monthly quota to test all features, including hooks and budget control.

Practical Integration: Concrete Examples

To illustrate the use of these new capabilities, here are two integration scenarios:

  • An AI coding assistant that automatically installs required packages, executes code, and retrieves results via the sandbox.
  • A competitive intelligence bot triggered nightly to crawl websites, analyze data, and send a consolidated report.

By combining Flash 3.6, environment hooks, budget control, and scheduled triggers, you get a robust, cost‑effective, and highly secure agent for your AI projects.

Conclusion & Call to Action

The Gemini API Managed Agents represent a significant step forward for any developer or business looking to leverage AI responsibly and profitably. Take advantage of Flash 3.6, environment hooks, budget control, and free tier access now to transform your workflows.

Try the new version today by adding the @google/genai package to your project and discover how these improvements can accelerate your AI innovation.

Original source
Blog
Gemini API Managed Agents: 3.6 Flash, hooks, and more
https://blog.google/innovation-and-ai/technology/developers-tools/expanding-managed-agents-gemini-api-3-6-flash-hooks/ →