Artificial intelligence

Google expands Managed Agents capabilities in the Gemini API with background tasks and MCP server support

Google announced new updates for Managed Agents in the Gemini API, including running long-running tasks in the background, connecting to remote MCP servers, calling custom functions, and updating credentials between interactions. The updates are intended to help developers build agents better suited for operation in production environments.

2026-07-06
4 min read
6 views
فريق تحرير certi.news
Google expands Managed Agents capabilities in the Gemini API with background tasks and MCP server support

Google announced expanded capabilities for Managed Agents in the Gemini API, adding asynchronous execution for long-running tasks, direct integration with remote Model Context Protocol (MCP) servers, support for calling custom functions, and the ability to update credentials between interactions. The company said these additions came in response to developer feedback and the need to build agents that can operate reliably in production environments.

The announcement was published on July 6, 2026, while the post is dated July 7, 2026, and was written by Philipp Schmid, Developer Relations Engineer at Google DeepMind, and Mariano Cocirio, Product Manager at Google DeepMind.

Running long-running tasks in the background

Managed Agents in the Gemini Interactions API allow a single endpoint to handle Gemini’s reasoning tasks, code execution, package installation, file management, and access to web information within an isolated cloud environment. With the new update, developers can pass the background: true option to run the interaction asynchronously on the server.

The interface immediately returns a task ID, which the client application can use to poll the status, stream progress, or reconnect later while the agent continues working remotely. This eliminates the need for the application to keep an HTTP connection open throughout lengthy analysis or processing operations.

Connecting to remote MCP servers

Agents can now connect directly to remote MCP servers instead of creating custom middleware to access private databases or internal APIs. Remote tools can be combined with built-in isolated-environment capabilities, such as Google Search and code execution, within the same interaction.

Google provides an example of an agent that checks an internal monitoring server for recent spikes in latency for the authentication service and then correlates them with Git repository changes. The server is defined through a tool of type mcp_server with its name and URL, allowing the agent to communicate with the specified endpoints from its cloud environment.

Custom functions alongside isolated-environment tools

The update adds the ability to define custom tools for executing local business logic alongside Gemini’s built-in tools. The system uses step matching: built-in tools are executed automatically on the server, while the interaction moves to a requires_action state when it needs a function to be executed by the client application.

In the provided example, a function named get_weather is defined to obtain the weather at a specific location. The agent then requests a weather check for Tokyo and asks for Python code to convert the temperature to Fahrenheit and save the result to a file. The client handles local function calls or queries for APIs and databases, then returns the function result to the interaction.

Updating network credentials

Managed Agents also support updating short-lived access tokens and API keys by passing the current environment_id with new network settings in the next interaction. The new rules immediately replace the previous rules, while the isolated environment retains the state of the file system, installed packages, and cloned repositories.

Google explains that a developer can start an interaction using an initial token to access a service such as the GCS JSON API, then later use the same environment with an updated token to download a file, without recreating the environment or losing its state.

The examples are available using the JavaScript package named @google/genai, with references to Python and cURL documentation in the Antigravity agent documentation. Google also directs developers to an overview of the Gemini Interactions API and the Managed Agents quickstart guide to explore custom agent definitions, environment settings, network rules, and advanced streaming patterns.

News source
ف
Author

فريق تحرير certi.news

In the same category

You may also like

View all news