Every developer who has tried to run an AI agent for more than a few minutes knows the pain of a dropped HTTP connection wiping out hours of progress. With its latest update to the Gemini API, Google is directly targeting this fragility. It’s shipping features that allow agents to finally run complex, long-running tasks without a constant, precarious connection. This isn’t an incremental update; it’s a foundational shift that makes production-grade agents possible.
Four Features, One Shift
Google’s announcement, detailed in their “Building production-ready agents with Gemini Managed Agents” post, introduces four specific capabilities: Background Execution, Remote MCP server integration, Custom Function Calling, and Credential Refresh. Together, they solve two classes of problems that have kept agentic workflows in the demo stage.
- Reliability and Persistence: Background Execution and Credential Refresh ensure an agent can finish its work even if the client disconnects or its authentication token expires mid-task.
- Integration and Extensibility: Remote MCP and Custom Function Calling give agents a secure way to operate on external systems and use developer-defined tools, breaking them out of the API sandbox.
This is a coordinated attack on the flakiness of agentic systems. Google is building the infrastructure to support what it calls “reliable, production-ready agents.” The tools are finally starting to match the ambition.
Background Execution: The Disconnected Task
The core mechanism for persistence is a new background: true parameter in the API call. Firing off a task with this flag tells the Gemini API that the task’s lifecycle is no longer tied to the client’s HTTP connection. You can close your laptop and the job keeps running.
So what happens after you disconnect? You have three ways to track the job and get the result:
- Webhooks: Provide a callback URL and Google will send a POST request when the task is complete. This is the best option for event-driven workflows.
- API Polling: The initial API call returns a task ID. You can poll a status endpoint with this ID to check progress or retrieve the final output.
- Output Sink: Configure the agent to write its output directly to a destination like a Google Cloud Storage bucket. This is ideal for large artifacts or batch processing.
Fault tolerance is the main concern here. If the agent’s environment needs to restart, Google persists the intermediate state. This means a long-running research job that gets interrupted at hour three doesn’t start over from scratch. It picks up where it left off. That guarantee alone changes the calculus for what’s worth automating.
Remote MCP and Custom Functions
The Multi-Modal Control Plane (MCP) is the agent’s interface to a digital environment. Think of it as the virtual keyboard, mouse, and screen the agent uses to interact with applications. The key word in this update is remote. Agents can now connect to an MCP server running on a different machine.
This solves a huge security and logistics problem. Instead of running the agent directly on a sensitive production server, you deploy a lightweight, sandboxed MCP client there. The agent, running on Google’s infrastructure, connects to this client to perform its tasks.
The security model relies on standard Google Cloud IAM and authentication protocols. You grant the agent’s service account specific permissions to connect to the remote MCP instance, using encrypted connections. Developers are still responsible for network prerequisites like firewall rules and ensuring the client is reachable, but it abstracts away the need to manage the agent’s entire execution environment on the target machine.
Combined with Custom Function Calling, this becomes a serious automation tool. You can define your own Python functions or wrappers for private APIs and make them available to the agent. The agent can now use your proprietary tools on a remote system, all orchestrated through the Gemini API.
What You Can Build Now
These features unlock architectures that were previously impractical or impossible.
Autonomous Research Agent
- Before: You kick off an agent to scrape 10,000 web pages, analyze the content, and generate a market report. The task takes five hours. Your Wi-Fi drops for a second, the connection breaks, and the entire run is lost.
- After: You launch the agent as a background task and specify a GCS bucket as the output sink. The agent checkpoints its progress, writing intermediate findings to the bucket. If the process fails, it can be restarted to resume from the last completed page, not from zero. The final report appears in the bucket when the job is done.
Remote IT Automation
- Before: You want an agent to SSH into a fleet of servers, check for security patches, and apply them. The security team vetoes the idea of running a generative AI agent with root access directly on production machines.
- After: You deploy a remote MCP client on each server with a restricted set of permissions. Your Gemini agent authenticates using a short-lived OAuth token obtained via its service account. It connects to each MCP client and executes a predefined custom function,
apply_patches(), that you wrote. The agent orchestrates the workflow, but the actual privileged operations are executed by your own trusted code within the MCP’s sandboxed environment.
This MCP-based architecture is Google’s distinct answer to a problem the whole industry is tackling. Where the OpenAI Assistants API or LangChain focus heavily on state management and tool-use abstractions, Google is building a formal model for how an agent interacts with a remote environment. It’s a more structured, and arguably more scalable, approach to giving agents real-world capabilities.
Availability and Cost
These Managed Agents features are now available through the Gemini API, and you can start experimenting on the free tier. When you move to production, the pricing model will account for the resources consumed by these more complex, long-running tasks. Expect to pay for the compute duration and resources your background jobs use, not just the token count. It’s a shift from paying for a single inference to paying for a persistent service.
Related
- Build Multi-Step AI Agents in Google AI Studio with Gemini 3.5
- Your AI Agent Is a Financial Liability
The question is no longer if you can build a reliable agent that survives a disconnect. The question is what you’ll automate first.