Google DeepMind has updated the Gemini API's Managed Agents to support long-running background tasks, remote Model Context Protocol (MCP) server connections, and live credential refreshing. Developers can now pass background: true to trigger asynchronous execution in isolated cloud sandboxes without keeping HTTP sockets open. These capabilities allow engineering teams to build production-ready autonomous agents that operate continuously across enterprise environments.
Key Capabilities in the Managed Agents Update
The Gemini Interactions API provides an isolated cloud sandbox where models handle reasoning, code execution, dependency installation, filesystem management, and web searching through a single endpoint. Google DeepMind's update addresses practical hurdles in deploying autonomous workflows:
- Asynchronous Background Tasks: Passing background: true lets interactions run asynchronously on Google's servers, returning an immediate interaction ID for polling or progress streaming.
- Remote MCP Server Integration: Agents can connect directly to remote Model Context Protocol servers alongside built-in search and code tools, eliminating custom proxy middleware.
- Custom Function Calling: Developers can mix local domain functions with cloud sandbox tools using step-matching logic and status checks.
- In-Place Credential Refresh: Passing a new network configuration with an existing
environment_idrotates tokens without clearing the sandbox filesystem or repository state.
Mechanism: How Async Execution and MCP Work
To run long tasks—such as cloning a repository, scanning source code for TODO items, and compiling reports—developers initiate tasks using the @google/genai JavaScript SDK or Python SDK. The API returns an interaction ID while the agent proceeds inside the remote sandbox environment. Applications poll the client.interactions.get() endpoint or listen for completion without risking dropped HTTP connections.
For private internal data access, developers can supply an mcp_server tool definition containing a remote URL alongside built-in tools like google_search or code_execution. When standard function calls are included alongside sandbox capabilities, the system marks client-dependent turns with a requires_action status.
Managing Sandbox State and Security Caveats
When handling sensitive APIs or short-lived OAuth tokens, credential expiration previously risked interrupting long-running sandbox states. The new update allows developers to pass updated Authorization headers mapped to target domains while maintaining the existing . This preserves installed packages, cloned git repositories, and local text outputs across multiple API turns.