Article

Google Gemini Managed Agents: Background Tasks, MCP-Integration und mehr

AI Google Gemini Agents MCP API

Die Ankündigung

Google erweitert Managed Agents in Gemini API mit neuen Capabilities:

  • Background Execution für async Interaktionen
  • Remote MCP Server Integration
  • Custom Function Calling
  • Credential Refresh across interactions

Was sind Managed Agents?

Mit Managed Agents in der Gemini Interactions API rufst du einen einzigen Endpoint auf, und Gemini kümmert sich um:

  • Reasoning
  • Code-Ausführung
  • Package-Installation
  • File-Management
  • Web-Information

Alles in einer isolierten Cloud-Sandbox.

Die neuen Features

1. Long-Running Background Execution

Das Problem: HTTP-Connections für langlaufende Tasks sind fragil.

Die Lösung: background: true starten die Interaktion asynchron auf dem Server.

const agent = await client.agents.create({
  background: true
});
// API gibt sofort ID zurück
// Poll für Status, stream Progress, reconnect später

Vorteile:

  • Keine Timeout-Probleme
  • Reconnect jederzeit möglich
  • Poll für Status

2. Remote MCP Server Integration

Model Context Protocol (MCP) ermöglicht den direkten Zugang zu:

  • Private Datenbanken
  • Interne APIs
  • Custom Tools

Ohne Proxy-Middleware schreiben zu müssen.

const agent = await client.agents.create({
  mcp_server: {
    url: "https://your-mcp-server.com",
    authentication: { type: "bearer", token: "xxx" }
  }
});

Du kannst Remote-Tools mit Built-in Sandbox Capabilities mixen.

3. Custom Function Calling

Definiere eigene Functions direkt im Agent:

const agent = await client.agents.create({
  functions: [{
    name: "query_internal_db",
    description: "Query internal database",
    parameters: { ... }
  }]
});

4. Credential Refresh

Agents können Credentials über mehrere Interaktionen hinweg refreshen – wichtig für OAuth-flows und langlaufende Sessions.

Warum das wichtig ist

Für Entwickler

Managed Agents reduzieren die Boilerplate:

  • Kein Proxy-Server für private Ressourcen
  • Keine State-Verwaltung für Background-Tasks
  • Keine komplexen Credential-Setups

Für Production

Die Features addressieren echte Pain-Points:

  • Long-running Tasks ohne Timeouts
  • Integration mit existierender Infrastruktur
  • Production-ready Agents

Vergleich

FeatureManaged AgentsSelf-Hosted Agents
Code Execution✅ Built-in⚠️ Eigenes Setup
Background Tasks✅ Native⚠️ Queue-System
MCP Integration✅ Direct❌ Proxy nötig
Package Install✅ Auto⚠️ Docker-Setup
Credential Management✅ Built-in⚠️ Eigenes Secret-System

SDK Support

Beispiele sind verfügbar für:

  • JavaScript: @google/genai
  • Python: Siehe Antigravity Dokumentation
  • cURL: REST API

Für AI-Coding Agents gibt’s einen Skill:

npx skills add google-gemini/gemini-skills --skill gemini-interactions-api

Ausblick

Managed Agents werden zu echten Production-Workhorses:

  • Background-Tasks für langlaufende Workflows
  • MCP für Enterprise-Integration
  • Custom Functions für domänenspezifische Logik

Google positioniert Gemini als Full-Stack Agent Platform – nicht nur als LLM-API.


Links: Google Blog