Thursday, July 9, 2026

News

Google Expands Gemini API Agents with Background Tasks and Remote MCP

CodingPatryk Raba

Google DeepMind added background task execution, remote MCP server support, custom functions, and credential refresh to Managed Agents in the Gemini API, moving AI agents closer to production use.

Contents
  1. Tasks That Run Without an Open Connection
  2. Connecting to Internal Company Systems
  3. Refreshing Access Without a Restart

Google DeepMind has expanded the Managed Agents service in the Gemini API with four new features designed to make it easier to build AI agents for production environments. The changes, announced on July 7 on Google's official blog, cover background task execution, connections to remote MCP servers, support for custom functions, and credential refresh.

Managed Agents is a service within the Gemini Interactions API where a developer calls a single endpoint, and Gemini handles reasoning, code execution, package installation, file management, and retrieving information from the web inside an isolated cloud sandbox. Until now, that sandbox operated only within a single session, which limited its usefulness for tasks running longer than the lifetime of one connection.

Tasks That Run Without an Open Connection

The most significant of the new additions is background task execution. Previously, long-running operations required keeping an HTTP connection open for their entire duration, a fragile setup prone to interruptions. With the background: true parameter added, a developer now receives a task ID and can poll its status, track progress in real time, or simply close the client application and come back to check the result later, while the agent keeps working remotely on Google's servers.

Connecting to Internal Company Systems

The second new feature, integration with remote Model Context Protocol servers, lets agents running in Google's cloud connect directly to private databases, ticketing systems, or internal company APIs without building their own proxy servers or tunneling connections. Previously, such access required the MCP server to run locally on the developer's side, which complicated deployments in production environments.

Agents can now combine remote tools with the sandbox's built-in capabilities within a single interaction. The third feature, custom function calls, lets developers add custom tools alongside the built-in ones: the built-in tools execute automatically on the server side, while custom function calls switch the interaction into a state requiring action on the local client side.

Refreshing Access Without a Restart

The fourth change concerns credential refresh. Developers can pass an existing environment ID along with a new network configuration to refresh access tokens and rotate API keys without having to restart the user's session. The sandbox preserves the file system state, installed packages, and cloned repositories, which matters for agents running across multiple successive interactions spread out over time.

Short-lived tokens are considered a security best practice, but they clash with the need for continuity in agents working in the background over longer periods. The new mechanism is meant to reconcile these two requirements, refreshing the scope of permissions without silently expanding it.

For Polish development teams building AI agents, the changes mean less in-house infrastructure code to write and maintain. Companies that previously had to build their own mechanisms for queuing long-running tasks or tunneling into internal systems can now rely on ready-made Gemini API features, shortening the time needed to deploy agents in corporate environments where integration with existing databases and internal systems matters most.

Google has not yet disclosed detailed pricing for the new features or a specific date for full general availability, limiting itself to announcing the technical capabilities and how to enable them within the existing API.

Sources: Expanding Managed Agents in Gemini API: background tasks, remote MCP and more (blog.google), Google DeepMind adds background execution and MCP support to Gemini API managed agents (the-decoder.com)

Share: