Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

Developer dashboard showing Gemini API managed agent settings with four new feature toggles for async processing and…

4 Gemini API Managed Agent Features That Change How You Build Agentic

Gemini's `background: true` flag in the Interactions API lets you run agents asynchronously. Pair it with remote MCP servers to connect private data without custom proxies.

·2d ago·4 min read··32 views·AI-Generated·Report error
Share:
Source: dev.tovia devto_mcpCorroborated
How do I use Gemini's new `background: true` flag and remote MCP servers for production agent workflows?

Use `background: true` in the Gemini Interactions API to run agents asynchronously, returning an interaction ID for polling. Connect private data via remote MCP servers with `mcp_server` tools. Mix custom functions with built-in sandbox tools using `requires_action` states.

TL;DR

Google's new `background: true` flag and remote MCP support let you run agents asynchronously without blocking your app.

Key Takeaways

  • Gemini's background: true flag in the Interactions API lets you run agents asynchronously.
  • Pair it with remote MCP servers to connect private data without custom proxies.

What Changed — Gemini Managed Agents Go Asynchronous and MCP-Ready (July 2026)

Gemini Interactions API — One interface for models and agents ...

On July 7, 2026, Google DeepMind shipped four production-oriented features for Managed Agents in the Gemini API. The headline: long-running background execution via background: true, remote MCP server integration, custom function calling alongside sandbox tools, and network credential refresh. Managed agents live inside the Gemini Interactions API — a single endpoint handling reasoning, code execution, package installation, file management, and web access in an isolated cloud sandbox.

Before this, running a multi-minute agent task meant keeping an HTTP connection open — fragile against load balancer timeouts, mobile network drops, or redeploys. Now you fire and forget.

What It Means For You — Concrete Impact on Your Agentic Workflows

1. Long-Running Background Execution (background: true)

This is the killer feature. Pass background: true in your interaction create call, and the API returns an interaction ID immediately. Your client polls or reconnects later. No more blocking request threads for minutes.

const started = await ai.interactions.create({
  agent: myAgentId,
  input: "Refactor the repo's test suite and open a summary.",
  background: true,          // returns immediately with an interaction ID
});

// Later, from any client, poll by ID
const status = await ai.interactions.get({ interaction: started.id });
// status.state moves through running -> requires_action / completed

Why it matters for Claude Code users: If you're building agents that run long tasks — code refactoring, data analysis, multi-step research — this pattern makes them production-grade. You can trigger a task from a web app, store the ID, and show progress without tying up a server thread.

2. Remote MCP Server Integration

MCP is the emerging standard for connecting agents to tools. Previously, you wrote proxy middleware to expose private databases or internal APIs. Now you pass an mcp_server tool directly in the interaction call.

const result = await ai.interactions.create({
  agent: myAgentId,
  input: "Summarize this quarter's overdue invoices.",
  tools: [
    { mcp_server: { url: "https://mcp.internal.example.com", auth: "..." } },
    { code_execution: {} },   // mix remote tools with built-in ones
  ],
});

Why it matters: You can now connect your agent to private databases, internal APIs, or custom data sources without custom glue code. For Claude Code users, this means your agents can access your production data securely.

3. Custom Function Calling Alongside Sandbox Tools

Built-in tools (code execution, search) run automatically server-side. Custom functions trigger a requires_action state, handing control back to your client to run local business logic.

if (status.state === "requires_action") {
  const call = status.required_action.function_call;
  const output = await runLocally(call.name, call.args); // your business logic
  await ai.interactions.submit({
    interaction: status.id,
    response: { output },
  });
}

Why it matters: You can mix automated sandbox tools with your own business logic — think running a local database query, calling an internal API, or triggering a CI pipeline.

4. Network Credential Refresh

Not detailed in the source, but crucial for production: agents can now refresh network credentials automatically, so long-running tasks don't fail due to expired tokens.

Try It Now — Steps to Get Started

Last fall, we launched Gemini Enterprise as a front door to AI in th…

  1. Enable the Gemini Interactions API in your Google Cloud project.
  2. Create a managed agent using the @google/genai JavaScript SDK (or Python/cURL equivalents in the Antigravity docs).
  3. Test background execution: Send a task with background: true, poll the returned ID.
  4. Connect an MCP server: Point it at an internal endpoint (start with a read-only database query).
  5. Add custom functions: Implement a requires_action handler for business logic.

When to Use It vs. Bedrock AgentCore

The source compares Gemini Managed Agents to Amazon Bedrock AgentCore. The tradeoff: Gemini couples tightly to one model family behind one endpoint (simpler setup, less flexibility). AgentCore is model-agnostic and AWS-native (more control, more assembly).

Choose Gemini if: You want a single endpoint, minimal glue code, and are already in Google Cloud.
Choose AgentCore if: You need model flexibility (Claude, Llama, etc.) or deep AWS integration.

Bottom Line

These four features push Gemini Managed Agents from demo-friendly to production-ready. The background: true flag alone changes how you architect agentic workflows — no more fragile long-lived connections. Combine it with remote MCP servers, and you have a powerful platform for building agents that touch your real data.


Source: dev.to

Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from multiple verified sources, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

Claude Code users should immediately explore the `background: true` pattern for any long-running agent tasks. If you've been building agents that keep HTTP connections open for minutes, switch to the asynchronous model. The interaction ID polling pattern is simple to implement and eliminates a major failure point. For teams using MCP servers, this removes a whole category of integration code. Instead of writing proxy middleware to expose internal APIs to your agent, you can now point the agent directly at your MCP server. Start by connecting a read-only database or a documentation API — the security best practices Google publishes should be your first read. Finally, the custom function calling alongside sandbox tools pattern lets you build hybrid workflows where automated tools handle the heavy lifting and your custom logic handles sensitive operations. This is ideal for tasks like "analyze this dataset and then trigger our internal approval workflow" — the analysis runs in the sandbox, the approval call goes through your custom function.
This story is part of
The AI Infrastructure War Shifts from Chips to Developer Tools
Nvidia's enterprise pivot and AWS's OpenAI bet collide with Cursor's quiet ascent
Compare side-by-side
Gemini API vs Managed Agents
Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Products & Launches

View all