Back to feed
News Story
APriority80
Google AI Blog
2 sources

Expanding Managed Agents in Gemini API: background tasks, remote MCP and more

Original

Google has announced new capabilities for Managed Agents in the Gemini API, including support for background tasks and remote MCP. These updates aim to help developers build more reliable, production-ready agents.

SynthePulse Insight · AI deep reading

Google DeepMind Adds Background Execution and Remote MCP Integration to Gemini API Managed Agents

Version 1 · 2 sources

Google DeepMind announces four key capabilities for Managed Agents in the Gemini API: background execution, remote MCP server integration, custom function calling, and credential refresh across interactions. These updates address developer feedback, making agents more reliable and production-ready.

  • Background execution: By setting background: true, agents run asynchronously on the server, returning an interaction ID immediately. Clients can poll status or reconnect later without keeping an HTTP connection open.
  • Remote MCP integration: Developers can connect Managed Agents directly to remote MCP servers to access private databases or internal APIs without writing custom proxy middleware.
  • Custom function calling: Allows adding custom functions alongside sandbox tools (e.g., code execution, Google Search). Built-in tools run automatically on the server; custom functions trigger a requires_action state for client-side local business logic.
  • Credential refresh: Supports refreshing tokens and other credentials between interactions without losing sandbox state.
Open section navigationBackground Execution: A New Paradigm for Asynchronous Tasks

Background Execution: A New Paradigm for Asynchronous Tasks

The new background execution feature for Managed Agents allows developers to offload long-running tasks asynchronously. By passing the background: true parameter, the API immediately returns an interaction ID. Clients can poll status, stream progress, or reconnect later without keeping an HTTP connection open. Google's official blog notes that maintaining long-lived HTTP connections is fragile, and background execution directly addresses this issue.

A code example demonstrates launching a background task using the JavaScript SDK: cloning a GitHub repository, finding all TODO comments, and generating a Markdown report categorized by module and priority. The client polls the interaction ID for results with a 5-second interval. This mechanism makes it possible to build reliable long-running agents.

Remote MCP Integration: Connecting Private Data Sources

Developers can now connect Managed Agents directly to remote MCP servers, enabling access to private databases or internal APIs without writing custom proxy middleware. During an interaction, mcp_server tools can be passed alongside built-in sandbox capabilities like Google Search and code execution.

The official blog provides an example: an agent checks an internal observability server for authentication service latency spikes and correlates them with Git commits. This demonstrates how MCP integration allows agents to communicate with external endpoints from within a secure sandbox, expanding the agent's data access range.

Custom Functions and Credential Refresh: Enhanced Flexibility and Persistence

Custom function calling allows developers to combine custom tools with built-in sandbox tools. The API uses step matching: built-in tools run automatically on the server, while custom functions transition the interaction state to requires_action, with the client executing local business logic. For example, a custom function to get weather can be passed alongside a code execution tool to the agent.

Credential refresh supports refreshing tokens and other credentials between interactions without losing sandbox state. This is crucial for agents that need long-running or cross-session authentication. THE DECODER's report confirms these four new features are available via the Gemini Interactions API and provides code examples in JavaScript, Python, and cURL.

Credibility boundary

This article primarily sources information from Google's official blog (first-hand source) and THE DECODER's report (second-hand source). The official blog provides detailed feature descriptions and code examples; THE DECODER's report summarizes and confirms the features. All feature claims originate from the official blog, with no external knowledge introduced.

Insight takeaway

Google DeepMind's update brings Gemini API Managed Agents closer to production readiness: background execution solves reliability issues for asynchronous tasks, remote MCP integration reduces complexity in connecting private data, and custom functions with credential refresh enhance flexibility and persistence. These improvements directly address developer needs for building reliable agents.

Primary report

Google AI Blog

Primary source

Same-event coverage

Also covered by 1 sources