Google announces new capabilities for Managed Agents in the Gemini API that are meant to help you build more reliable, production-ready agents. Sound like more flexibility? It is: background execution, connection to remote MCP servers, custom functions, and credential refresh across interactions.
What's new
With Managed Agents in the Gemini Interactions API you call a single endpoint and Gemini handles reasoning, code execution, package installation, file handling and web searches inside a cloud sandbox. That was already powerful, but now it adds features for real-world use cases.
Background execution: pass background: true and the interaction runs asynchronously on the server. The API returns an immediate ID you can use to check status, stream progress, or reconnect later. Perfect if you don't want to keep an HTTP connection open while a long task runs.
Integration with remote MCP servers: instead of building custom middleware to access internal databases or private APIs, you can connect managed agents directly to remote Model Context Protocol (MCP) servers using the option. You can combine remote tools with the sandbox capabilities.
mcp_server
Custom functions alongside sandbox tools: the API uses "step matching": built-in tools run automatically on the server, while custom functions change the state to requires_action so your client executes local business logic.
Network credential refresh: if a token or API key expires, you can pass the same environment_id with a new network configuration in the next interaction. The new rules replace the old ones immediately and the sandbox keeps its state: filesystem, installed packages and cloned repositories.
Why this matters to you as a developer or entrepreneur?
Do you have long processes like builds, scraping or ETL workflows that don't fit in a single HTTP request? Background execution turns your agents into asynchronous workers that don't block the app. That reduces fragility and improves user experience.
Need controlled access to internal APIs or private data? With remote MCP you avoid spinning up pointless proxies and can keep sensitive logic outside the sandbox while the agent handles the rest. Imagine an assistant that reads internal docs and then runs safe steps on your infrastructure.
Does your business require local logic (for example, payment validations, auditing or calls to legacy systems)? Custom functions let the agent try to solve it server-side and, when needed, delegate the action to the client to maintain control and compliance.
And operational security? Being able to rotate credentials without rebuilding environments is a relief: update network rules, keep the environment, and avoid downtime caused by expired credentials.
Practical examples (quick)
Run long tests or CI pipelines in the sandbox with background: true and query progress from your frontend.
Connect an agent to an MCP that exposes internal metadata and combine it with Google Search for assisted research tasks.
Use custom functions so the client confirms a sensitive transaction after the agent prepares the flow.
Rotate tokens for an external service by passing a new network configuration without losing the environment state.
How to get started
If you're building a code agent, ask your human to install the Interactions API skill: npx skills add google-gemini/gemini-skills --skill gemini-interactions-api. Google publishes examples with the JavaScript SDK @google/genai; for Python or cURL they recommend checking the Antigravity agent documentation.
Review the background execution guide and the managed agents quickstart to explore agent definitions, environment configurations, network rules and advanced streaming patterns.
In short: Managed Agents move from reactive assistants to asynchronous, connectable workers designed to integrate with real development environments without stopping your application.