🟡 🤝 Agents Published: · 4 min read ·

Google Expands Managed Agents in the Gemini API for Production Environments

Editorial illustration: Google Gemini API expands managed agents for developers

Google has added background execution, remote MCP integration, custom function calling, and credential refresh to the Gemini API — four capabilities that enable developers to deploy agents beyond prototype environments.

🤖

This article was generated using artificial intelligence from primary sources.

On July 7, 2026, Google announced an expansion of Managed Agents capabilities within the Gemini API with four new technical features. The expansion is explicitly described as a response to developer feedback requesting “production-ready” agentic capabilities — bridging the gap between prototype and real production deployment of agents.

Four New Tools for Production Agents

Each of the four new features addresses a concrete technical problem that blocks the deployment of AI agents outside development environments.

1. Background Execution

By passing the background: true parameter with an API call, the agent task is immediately dispatched for asynchronous execution. The API instantly returns a session identifier; the client can poll for status or reconnect to the session when ready — without needing a continuously open HTTP connection for the entire duration of the task. These are asynchronous agent workers becoming first-class citizens of the Gemini API.

2. Remote MCP Integration

Managed Agents can now connect directly to MCP (Model Context Protocol) servers without custom proxy middleware or manual bridging. The agent gains direct access to private databases, internal APIs, and corporate resources. Developers can freely mix tools from MCP servers with the agent’s built-in sandbox capabilities, without writing an integration layer.

3. Custom Function Calling

In addition to built-in sandbox tools, it is now possible to add custom local functions. The execution logic is clearly defined: built-in server-side tools execute automatically without a callback to the client, while custom functions transition the agent to a requires_action state — signaling to the client that it must execute the function locally and pass the result back. This enables integration with internal business logic without exposing that logic to Google’s sandbox.

4. Network Credential Refresh

Agent sessions that outlast the lifetime of OAuth tokens or API keys faced a serious problem: the need to interrupt the session due to expired credentials. The new feature solves this by passing the existing environment_id with an updated network configuration. The sandbox retains its entire state — filesystem, installed packages, and repositories — while only the network layer is refreshed.

Why Was Asynchronous Execution a Critical Gap?

The previous Managed Agents model required a continuous HTTP connection for the entire duration of an agent session. In production environments, this created a series of reliability issues:

Load balancers and reverse proxies typically terminate connections longer than 60 to 120 seconds — which is shorter than the duration of more complex agent tasks.

Mobile clients and browsers lose connection when switching between WiFi and mobile networks, when the screen turns off, or when the app moves to the background.

Horizontal application scaling — pod restarts in Kubernetes environments interrupt active sessions with no way to resume.

The background: true parameter resolves all of these cases with a single model: the agent lives on Google’s infrastructure independently of the client connection state. The client can disconnect, restart, and reconnect to the same session with the same ID, finding the agent in exactly the state in which it was left.

Remote MCP Integration and Credential Refresh

Remote MCP integration solves another common problem: access to an organization’s private resources. Previously, a developer had to write custom middleware that forwarded calls between a Managed Agent and internal servers — adding latency, complexity, and additional code to maintain. Direct MCP connection eliminates that layer.

Credential refresh is particularly valuable in enterprise contexts where OAuth tokens have short expiration windows for security reasons. The session’s filesystem state — installed Python packages, cloned repositories, intermediate outputs — is fully preserved through credential rotation.

Gemini Interactions API as the Foundational Infrastructure

All four new features are built on the Gemini Interactions API — a single endpoint that encompasses inference, code execution, package installation, and web access within an isolated cloud sandbox. It is available in the @google/genai JavaScript SDK, with documented examples for both Python and cURL.

Google positions these changes as a direct response to developer feedback requesting production-use capabilities — as opposed to prototype environments. Together, the four features make Managed Agents capable of asynchronous workflows that operate within real development environments without blocking the applications that invoke them.

Frequently Asked Questions

What is background execution in Gemini Managed Agents and why is it useful?
By passing the `background: true` parameter, the API immediately returns a session ID without waiting; the client polls for status when ready. This eliminates reliance on long-lived HTTP connections that load balancers and mobile clients regularly interrupt.
How can Managed Agents access private databases and internal APIs?
Through Remote MCP integration: the agent connects directly to an MCP server without custom proxy middleware, gaining access to private resources and the ability to combine them with the agent's built-in sandbox tools.
How does credential refresh work in the middle of an agent session?
By passing the existing `environment_id` with an updated network configuration, the sandbox retains its entire state — filesystem, installed packages, and repositories — while only the network layer is refreshed with the new OAuth token or API key.