Gemini API Managed Agents Add Background Execution and Remote MCP
- Aisha Washington
- 13 hours ago
- 2 min read
Google expanded Gemini API Managed Agents with background execution, remote MCP server connections, custom function support, and credential refresh options. Developers can now run tasks asynchronously, connect directly to external model context protocol servers, and mix local business logic with built-in sandbox tools without extra middleware layers.
The update targets production reliability. Teams previously had to build custom proxies or handle long-running tasks through polling loops. The new options reduce that overhead.
Background mode changes task handling
Developers start a background task by sending the parameter background: true. The API returns a task ID immediately. Status can be checked through polling or streamed as updates arrive.
This approach fits long-running operations such as large document analysis, multi-step code refactoring, or extended web research. The agent continues work after the initial connection closes.
Existing sandbox tools like Google Search and code execution remain available. They run on the server side while custom functions execute locally, allowing mixed tool use within one agent session.
Remote MCP support removes proxy layer
Managed Agents now connect straight to remote MCP servers. No separate proxy service is required. The connection accepts the server endpoint and authentication details directly in the agent configuration.
Teams can keep their internal tools behind the MCP interface while still using Gemini sandbox capabilities in the same workflow. This setup cuts deployment steps compared with earlier patterns that needed an extra translation layer.
Custom functions and credential refresh
Custom function calling lets the agent invoke user-defined business logic. The function runs on the developer side, receives structured arguments from the model, and returns results back into the agent loop. Built-in tools continue to operate inside Google infrastructure.
Credential refresh uses an existing environment ID plus updated network settings. The sandbox file system, installed packages, and cloned repositories stay intact after refresh. This avoids full environment restarts when network tokens rotate.
Tradeoffs and remaining questions
The updates improve operational flexibility, yet they place more responsibility on developers to manage task state and error recovery. Background jobs require careful handling of partial results and timeout policies that were previously managed inside a single synchronous call.
Security teams must verify that remote MCP connections meet their access policies, since the agent can now reach external endpoints without an intermediate control point. Google has not published detailed audit logs or rate limits for the new MCP pathway.
What to watch next
Google may release updated client libraries that simplify background job tracking. Watch for documentation on error codes specific to long-running tasks.
Competitors are likely to ship similar background modes or MCP connectors within the next quarter. Any public benchmarks comparing completion rates or cost per task will test whether the new features deliver measurable gains.
Adoption signals will appear in open-source agent repositories that adopt the new parameters. Watch for example projects that combine background execution with remote MCP within the next 60 days.