Google has introduced new capabilities for Managed Agents in the Gemini API, enhancing developers' ability to create reliable and production-ready agents. These updates include background execution, remote MCP server integration, custom function calling, and credential refresh, directly addressing developer feedback and product needs. The changes aim to support asynchronous interactions and seamless integration with external tools and APIs. The Gemini Interactions API allows developers to call a single endpoint, with Gemini handling reasoning, code execution, and file management within an isolated cloud sandbox. Developers can now install the Interactions API skill using the command 'npx skills add google-gemini/gemini-skills --skill gemini-interactions-api'.
The new background execution feature enables long-running tasks to run asynchronously on the server. By passing 'background: true', the API returns an ID that clients can use to check the status or reconnect later. This allows for more efficient handling of extended processes without blocking the application. Additionally, developers can now connect managed agents directly to remote MCP servers, eliminating the need for custom proxy middleware. This integration allows agents to communicate with endpoints from a secure sandbox, combining remote tools with built-in sandbox capabilities. Developers can mix and match these tools while following best practices for extending their agents with external services.
The updates also include custom function calling alongside sandbox tools, allowing developers to add custom tools for local execution. The API uses step matching, with built-in tools running automatically on the server, while custom functions transition the interaction to 'requires_action' for client-side execution. Credential refresh is also supported, enabling developers to update access tokens or API keys by passing an existing environment_id with a new network configuration. These changes ensure that the sandbox maintains its state, including installed packages and repositories. Developers can explore these features through the Gemini Interactions API overview and the managed agents quickstart guide.
Source: googleai