Engineering
gemini-interactions-api avatar

gemini-interactions-api

Expert skill for implementing the Gemini Interactions API. Use for stateful multi-turn chat, background Deep Research agent tasks, function calling, structured outputs, and modern Python/TypeScript SDK integration.

Introduction

The Gemini Interactions API skill provides the essential framework for developers building agentic applications using Google's latest Gemini models and integrated agents. This skill is designed for engineers and software developers who need to implement complex, stateful, or background-intensive interactions that go beyond simple request-response patterns. It covers the full lifecycle of an interaction, from initializing the google-genai or @google/genai client to orchestrating advanced tool-use features like function calling and Deep Research agents.

  • Full support for stateful conversations using server-side previous_interaction_id to manage history without manual context tracking.

  • Optimized workflows for background tasks, particularly for long-running processes like the Deep Research agent, including polling mechanisms for result retrieval.

  • Strict adherence to current model specifications, including Gemini 3.1 Pro, Flash, and specialized Lite or Image variants, with automated fallbacks for legacy requests.

  • Implementation guidance for streaming responses via Server-Sent Events, ensuring low-latency UX in agentic UI applications.

  • Best practices for utilizing structured output and function calling to integrate the model with external APIs, databases, or MCP servers.

  • Compatibility with the latest Python and TypeScript SDKs, explicitly avoiding deprecated libraries like google-generativeai.

  • Use this skill when you need to maintain conversational state across multiple turns for chat-based applications or customer service bots.

  • Leverage this skill for background research tasks where user input requires deep reasoning and autonomous information gathering through the Deep Research agent.

  • Apply the skill when integrating Gemini with external data sources using function calling to perform live database lookups or tool-based code execution.

  • Ensure all project dependencies are updated to support google-genai >= 1.55.0 for Python or @google/genai >= 1.33.0 for JavaScript/TypeScript.

  • Note that legacy models (e.g., Gemini 1.5, 2.0) are strictly deprecated; this skill provides guardrails to automatically substitute them with gemini-3-flash-preview to maintain performance and compatibility.

Repository Stats

Stars
3,395
Forks
316
Open Issues
4
Language
Not provided
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 02:21 AM
View on GitHub