gemini-interactions-api
Qué hace
Esta skill guía a los desarrolladores que usan la API Gemini Interactions de Google, con estado, donde la plataforma guarda la conversación por ellos. Es para equipos que crean conversaciones de varios pasos e investigación en segundo plano.
Cuándo usarla
- ✓Cuando quieres ejecutar una conversación de varios turnos en la que la plataforma guarda el historial.
- ✓Cuando necesitas tareas de investigación en segundo plano o respuestas en streaming de Gemini.
- ✓Cuando quieres salida estructurada o llamadas a funciones a través de la API Interactions.
Link de la skill
https://github.com/google/skills/blob/main/skills/cloud/gemini-interactions-api/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Crea un chat con Gemini en Google Cloud que recuerde los mensajes anteriores y que pueda ejecutar una tarea de investigación en segundo plano.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Explica cómo autenticarse, conectarse y usar la API Interactions con el SDK de Google Gen AI. Recomienda los modelos Gemini más recientes y advierte contra los paquetes antiguos no compatibles.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Gemini Interactions API Skill
This skill provides instructions for authenticating, connecting to, and utilizing the stateful, server-managed Gemini Interactions API on Gemini Enterprise Agent Platform.
The Interactions API is the modern, recommended way to execute Generative AI agent conversations, background research tasks, multi-turn chats, and structured, multi-step workflows.
[!IMPORTANT] CRITICAL: Unified SDK, Latest Models & Model/Agent Targeting * Unified SDK: Use the Google Gen AI SDK (
google-genai >= 2.3.0for Python,@google/genai >= 2.3.0for JS/TS). SDK versions>= 2.0.0are the minimum floor at which the steps schema activates, but>= 2.3.0is the supported/recommended floor. Legacy SDKs likegoogle-cloud-aiplatform,@google-cloud/vertexai,google-generativeai, and@google/generative-aiare strictly unsupported for Interactions. * Mandatory Instruction: When explaining client initialization or writing import code, you must explicitly state/warn the user that legacy packages likegoogle-cloud-aiplatformorgoogle-generativeaiare strictly unsupported for interactions. * Latest Models Only: Usegemini-3.8-flash(fast, balanced, multimodal — the recommended default),gemini-3.1-pro-preview(complex reasoning, coding, research), orgemini-3.5-flash-lite(cost-efficient, high-frequency lightweight tasks). Refer to the latest model versions to check for new updates. Legacy models (gemini-3-flash-preview,gemini-2.5-*,gemini-2.0-*,gemini-1.5-*) are deprecated and do not support interactions. * Mandatory Instruction: In any interaction response, you must warn the user that legacy models likegemini-2.5-*,gemini-2.0-*, orgemini-1.5-*are deprecated and unsupported for the Interactions API. If a user asks for a deprecated model, usegemini-3.8-flashinstead and note the substitution. * Model & Agent Targeting: Target foundation models directly usingmodel="gemini-3.8-flash", or target autonomous managed/custom agents (antigravity-preview-05-2026,deep-research-preview-04-2026, or custom agents provisioned viaclient.agents.create()) usingagent="<AGENT_ID>". Managed agents (antigravity-preview-05-2026and custom agents) requireenvironment="remote"to provision a sandbox. * Turn-Scoped Parameters: Parameters liketools,system_instruction, andgeneration_configare turn-scoped. They MUST be passed with each interaction request.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gemini-interactions-api)"
and append
agent-skills/1.0 (skill:gemini-interactions-api)
to User-Agent headers.
1. Authentication
Before running any code, ensure you are authenticated with Application Default Credentials (ADC) and have the necessary API enabled.
Login:
gcloud auth application-default loginEnable API (if not already enabled):
gcloud services enable aiplatform.googleapis.com
2. Client Initialization
You can initialize the client using environment variables (recommended) or by passing explicit configuration parameters.
Option A: Environment Variables (Recommended)
Configure environment variables to let the SDK automatically resolve settings:
export GOOGLE_GENAI_USE_ENTERPRISE=true
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="global"
Python
from google import genai
# The SDK automatically picks up the environment variables
client = genai.Client()
TypeScript/JavaScript
import { GoogleGenAI } from "@google/genai";
// The SDK automatically picks up the environment variables
const ai = new GoogleGenAI();
Option B: Explicit Inline Parameters
Alternatively, pass configuration values directly inside your code:
Python
from google import genai
import google.auth
_, project_id = google.auth.default()
client = genai.Client(enterprise=True, project=project_id, location="global")
Typ
Preguntas frecuentes
¿Qué versión del SDK se necesita?
google-genai 2.3.0 o posterior para Python, y @google/genai 2.3.0 o posterior para JavaScript.
¿Admite los paquetes antiguos de Vertex?
No. Paquetes como google-cloud-aiplatform no son compatibles con Interactions.
¿Gestiona el streaming?
Sí. Cubre las respuestas en streaming.
Detalles
Descripción original del autor
Guides the usage of Gemini Interactions API on Gemini Enterprise Agent Platform. Use when the user wants to use the stateful, server-managed Interactions API for multi-turn conversations, background execution, streaming, structured output, and function calling on the Agent Platform.
repo: google/skills
Popularidad
- Estrellas en GitHub
- 22 mil
- Posición en el ranking
- #10262
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
finding-google-skills
22 milAyuda a tu agente a encontrar las guías de Google adecuadas para una tarea de configuración, como alojamiento, bases de datos, almacenamiento, inicio de sesión o servicio de modelos de IA.
gcloud
22 milAyuda a tu agente a escribir y comprobar comandos gcloud de Google Cloud, consultando la sintaxis exacta antes de ejecutar nada para no adivinar los parámetros.
google-cloud-recipe-auth
22 milGuía a tu agente por la identidad y el acceso en Google Cloud, incluido cómo inician sesión las personas y los servicios y qué permisos reciben.
google-cloud-recipe-onboarding
22 milGuía a un desarrollador nuevo en sus primeros pasos en Google Cloud, incluida la elección de un proyecto, la vinculación de la facturación y el despliegue de un primer recurso.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.