News
Google Adds Background Tasks and Remote MCP Support to Gemini API Agents
Google DeepMind has added four new capabilities to Managed Agents in the Gemini API: background task execution, connections to remote MCP servers, custom function calls, and network credential refreshing. The changes are meant to make it easier for developers to build agents that run in production.
Google DeepMind has expanded Managed Agents, the managed agent feature in the Gemini API, with four new capabilities designed to make it easier to build agents that run in production environments. The update, announced on July 7, 2026, covers background task execution, connections to remote MCP servers, custom function calls, and network credential refreshing.
Managed Agents is a Gemini API feature Google introduced earlier that lets developers run AI agents inside a secure server-side environment instead of building an entire agent infrastructure from scratch. The latest update addresses one of the most common limitations of such setups: the need to keep an HTTP connection open for the entire duration of a long-running task.
Background tasks
Previously, a long-running agent task required keeping a network connection open for its entire execution, which made the whole architecture vulnerable to interruptions and errors. With the background parameter set to true, the API now immediately returns a task identifier, and the client application can poll for status, track progress in real time, or reconnect later once the agent has finished working remotely.
These updates turn managed agents into asynchronous workers that operate inside real developer environments without blocking the application - Google DeepMind
Remote server connections
The second new feature is the ability to connect a managed agent directly to a remote Model Context Protocol server, the MCP standard used to link language models with external tools and data. Instead of writing custom middleware to access private databases or a company's internal APIs, developers can pass the mcp_server tool directly during an interaction, alongside built-in tools like Google Search or code execution.
The third feature, custom function calls, lets developers add application-specific actions to an agent, such as calculating a quote, checking a customer's permissions, or opening a pull request in a code repository. In these cases, the interaction moves into a requires_action state, and the client application executes the business logic locally instead of leaving it to the server.
Credentials and security
The fourth feature addresses the problem of long-running agents that need to maintain access to external systems across many interactions. Short-lived access tokens are considered a security best practice, but they need to be refreshed, so Google now lets developers pass an existing environment identifier along with a new network configuration on subsequent calls, without requiring the user to restart the session.
For developers working with the Gemini API, this means less work building custom infrastructure to handle long-running tasks and integrations with external systems. Previously, building an agent capable of running in the background for hours, with access to private APIs and the ability to securely refresh access, required writing a substantial middleware layer from scratch. Now these pieces are part of the API itself.
The update fits into a broader race among major language model providers to win over developers building AI agents for production tasks rather than just demos. Google is competing in this space with, among others, Anthropic and OpenAI, which are developing their own tools and interfaces for building agents that operate autonomously over extended periods rather than simply responding to single queries.
For Polish software houses and R&D teams working with the Gemini API, the change means they can more quickly deploy agents that handle business tasks, such as automatically processing service requests or integrating with internal systems, without building an entire background task management layer from scratch.
Sources: Expanding Managed Agents in Gemini API: background tasks, remote MCP and more (blog.google)


