Google shipped a major update to Gemini API Managed Agents on July 28, 2026, turning what was a background execution feature into a governed platform. The antigravity-preview-05-2026 agent now runs Gemini 3.6 Flash by default, and four new controls sit around every run: environment hooks that fire before and after tool calls, a max_total_tokens budget cap that pauses tasks safely, cron-based scheduled triggers, and a new Environments API for inspecting sandbox sessions. Managed agents are also now free for API-key projects on the free tier, which removes the last cost barrier to building autonomous agents on Gemini.

This is a different release from the July additions that brought background execution and remote tool access. Those made agents run longer and reach further. This one makes them safer to trust in production, because you can now wrap guardrails, budgets, and schedules around an agent without writing your own orchestration layer.

What Google Shipped

The update lands entirely inside the existing Managed Agents surface, so no migration is required. Existing agents keep working; the new capabilities are opt-in through configuration. The headline change is the default model swap: the Antigravity preview agent now uses Gemini 3.6 Flash unless you set agent_config.model to an alternative such as Gemini 3.5 Flash or Gemini 3.5 Flash-Lite. Everything else is a new lever you add when you need it.

Four of those levers form a control plane that agent builders have been asking for since the platform launched. Together they answer three questions every production team eventually hits: how do I stop an agent from doing something unsafe, how do I stop it from spending too much, and how do I run it on a schedule without standing up my own cron infrastructure.

Gemini API Managed Agents control plane diagram
The July 28 update wraps hooks, budgets, and schedules around every managed agent run.

The Control Layer: Hooks, Budgets, and Schedules

Environment hooks are the most consequential addition. You define custom scripts in a .agents/hooks.json file that run before or after any tool call, matched by regex. A pre-call hook can validate that a shell command is safe or block writes to protected paths; a post-call hook can lint generated code or write an audit log. Hooks support both command handlers that run inside the sandbox and HTTP handlers that call out to your own services. Google documents the format and matcher syntax in the environment hooks reference.

Budget controls cap total consumption with a single max_total_tokens parameter. When an agent reaches the limit, the task does not fail or truncate mid-thought. It returns status: "incomplete" and preserves the full environment state, so you can inspect what happened and resume from exactly where it stopped. That pause-and-preserve behavior is what makes the cap usable in production rather than a blunt kill switch.

Scheduled triggers let a managed agent run recurring tasks on a cron expression, with the sandbox session persisted across executions. A nightly research digest, a morning changelog summarizer, or an hourly inbox triager no longer needs an external scheduler wired to your API. Combined with the free tier, documented on the agent pricing page, a solo builder can now run a small autonomous agent around the clock at no cost.

How the New Controls Compare

Here is what each new capability does and where it is configured, so you can decide which ones your workflow actually needs.

CapabilityWhat it doesWhere you set it
Default model: 3.6 FlashFaster, cheaper default for the Antigravity agentagent_config.model
Environment hooksRun validation, linting, or audit scripts around tool calls.agents/hooks.json
Budget controlsCap tokens, pause safely, preserve state to resumemax_total_tokens
Scheduled triggersRun recurring tasks on a cron scheduleTrigger config (cron)
Environments APIList, inspect, and delete sandbox sessionsEnvironments API
Free tier accessRun managed agents on API-key projects at no costAutomatic for free tier

The model options matter for cost tuning. Gemini 3.6 Flash is the new default workhorse for agent loops, and you can drop to Gemini 3.5 Flash-Lite for cheaper, simpler steps. Google covers the underlying agent runtime in its Antigravity agent documentation.

Hooks, budget cap, and cron schedule configuration for a Gemini agent
Each control is opt-in configuration, so existing agents keep running unchanged.

Build It: A Governed Nightly Agent in Six Steps

Here is a concrete workflow that uses four of the new features together to run a safe, budget-capped nightly digest agent. Full parameter details are in the Managed Agents overview.

  1. Create the agent with agent_config.model left at the default so it runs on Gemini 3.6 Flash.
  2. Add a pre-call hook in .agents/hooks.json that matches shell commands and blocks anything writing outside a working directory. This is your safety gate.
  3. Add a post-call hook that appends every tool call to an audit log via an HTTP handler pointed at your logging endpoint.
  4. Set max_total_tokens to a nightly ceiling so a runaway loop pauses with status: "incomplete" instead of draining your quota.
  5. Attach a scheduled trigger with a cron expression for 2 a.m., persisting the sandbox so the agent keeps its working files between runs.
  6. Monitor with the Environments API, listing sessions each morning and deleting stale sandboxes to keep the environment clean.

The result is an agent that runs unattended overnight, cannot touch files it should not, stops before it overspends, and leaves an audit trail. None of that required a separate orchestration service.

Nightly digest agent running on a cron schedule with an audit log
Four of the new controls combine into an unattended agent with guardrails and a budget.

What This Enables

For creators and small teams, the practical unlock is trust plus zero cost. Before this update, running an autonomous Gemini agent in production meant building your own guardrails, your own budget accounting, and your own scheduler, then paying for every token. Now the guardrails are a JSON file, the budget is one parameter, and the scheduler is built in. That collapses the distance between a weekend prototype and something you can leave running.

The free tier is the accelerant. A designer who wants an agent to regenerate asset variations every night, or a writer who wants a morning research brief compiled from a fixed set of sources, can now build and run that without a bill. When it works, the same configuration scales up on a paid tier with the identical hooks and budget logic. This continues the trajectory we covered when Gemini Managed Agents added background execution and remote MCP, and when Gemini 3.6 Flash became the agent workhorse.

How It Fits the Broader Agent Race

Every major agent platform is converging on the same control-plane features, because production teams will not adopt agents they cannot govern. The differentiator here is that Google bundled hooks, budgets, scheduling, and a free tier into a single managed surface rather than shipping them as separate products. The Gemini Interactions API ties these agents into the wider request model, so the same account and tooling carry across simple calls and full agent runs. For builders already on Gemini, that reduces the number of moving parts you have to learn and pay for.

What to Do Next

If you already build on Gemini, the fastest way in is to take an existing agent, add a single pre-call hook and a max_total_tokens cap, and watch how the pause-and-resume behavior changes your comfort level with letting it run unattended. If you are new to managed agents, start on the free tier with a small scheduled task, such as a nightly summary, and add hooks only once the core loop works. Keep the first version simple: one model, one schedule, one budget cap, and one audit hook. Add complexity only when the simple version proves reliable.

Frequently Asked Questions

What model do Gemini Managed Agents use by default now?

The Antigravity preview agent (antigravity-preview-05-2026) now defaults to Gemini 3.6 Flash. You can override it through agent_config.model to use Gemini 3.5 Flash or Gemini 3.5 Flash-Lite.

What are environment hooks?

Environment hooks are custom scripts defined in a .agents/hooks.json file that run before or after tool calls, matched by regex. They support command handlers inside the sandbox and HTTP handlers to external services, and are used for safety validation, code linting, and audit logging.

How do budget controls work?

The max_total_tokens parameter caps total token consumption for a task. When the limit is reached, the task returns status: "incomplete" and preserves the environment state, so you can inspect and resume rather than losing progress.

Can I run Gemini Managed Agents on a schedule?

Yes. Scheduled triggers use cron-based expressions to run recurring agent tasks autonomously, and the sandbox session persists across executions so the agent keeps its files and packages between runs.

Are managed agents free?

Managed agents are now available on the free tier for projects using API keys. Full details on paid usage are on Google's agent pricing page.

What is the Environments API for?

The Environments API lets developers list, inspect, and delete sandbox sessions programmatically, which is useful for monitoring active agents and cleaning up stale environments.