{"id":548300,"date":"2026-07-28T19:05:19","date_gmt":"2026-07-28T19:05:19","guid":{"rendered":"https:\/\/www.newsbeep.com\/nz\/548300\/"},"modified":"2026-07-28T19:05:19","modified_gmt":"2026-07-28T19:05:19","slug":"whats-new-in-managed-agents-in-gemini-api","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/nz\/548300\/","title":{"rendered":"What\u2019s new in Managed Agents in Gemini API"},"content":{"rendered":"<p data-block-key=\"4qwp3\">In this configuration:<\/p>\n<p>The security-gate group runs gate.py before every code_execution or write_file call. If the script returns {&#8220;decision&#8221;: &#8220;deny&#8221;, &#8220;reason&#8221;: &#8220;&#8230;&#8221;}, the tool call is skipped and the rejection reason is passed into the model\u2019s context.The auto-format group runs auto_lint.py after every tool finishes to enforce code styling.Hooks also support http type handlers that POST directly to an external endpoint.<\/p>\n<p data-block-key=\"b4gjc\">For complete HTTP hook definitions and failure handling semantics, refer to the <a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\/agent-hooks\" rel=\"nofollow noopener\" target=\"_blank\">hooks documentation<\/a>.<\/p>\n<p data-block-key=\"41nqa\">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.<\/p>\n<p data-block-key=\"djsm2\">&#8220;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.<\/p>\n<p data-block-key=\"ditab\">Before agent hooks, we couldn\u2019t do this on Gemini\u2019s 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.&#8221;<\/p>\n<p data-block-key=\"8clm2\">&#8211; Alston Lin, Founder &amp; CTO of OffDeal<\/p>\n<p>Cost control and automation featuresFree tier availability<\/p>\n<p data-block-key=\"e62dr\">Managed agents are now available on <a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\/pricing#pricing-for-agents\" rel=\"nofollow noopener\" target=\"_blank\">free tier projects<\/a>. Developers can experiment with agentic workflows using an <a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\/api-key\" rel=\"nofollow noopener\" target=\"_blank\">API key from a project without active billing<\/a>.<\/p>\n<p>Budget controls<\/p>\n<p data-block-key=\"624dk\">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).<\/p>\n<p data-block-key=\"6cs8g\">When the agent reaches the limit, execution safely pauses and the interaction returns status: &#8220;incomplete&#8221;. The environment state is preserved, enabling you to <a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\/antigravity-agent#continuing-incomplete-interaction\" rel=\"nofollow noopener\" target=\"_blank\">continue where it stopped<\/a> by passing previous_interaction_id with a fresh budget.<\/p>\n","protected":false},"excerpt":{"rendered":"In this configuration: The security-gate group runs gate.py before every code_execution or write_file call. If the script returns&hellip;\n","protected":false},"author":2,"featured_media":548301,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[365,363,364,111,139,11439,69,145],"class_list":["post-548300","post","type-post","status-publish","format-standard","has-post-thumbnail","category-artificial-intelligence","tag-ai","tag-artificial-intelligence","tag-artificialintelligence","tag-new-zealand","tag-newzealand","tag-none","tag-nz","tag-technology"],"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/posts\/548300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/comments?post=548300"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/posts\/548300\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/media\/548301"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/media?parent=548300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/categories?post=548300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/tags?post=548300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}