gemini-interactions-api
O que ela faz
Esta skill orienta desenvolvedores que usam a Gemini Interactions API com estado do Google, na qual a plataforma guarda a conversa por eles. É para equipes que criam conversas em várias etapas e pesquisas em segundo plano.
Quando usar
- ✓Quando você quiser executar uma conversa com várias trocas em que a plataforma guarda o histórico.
- ✓Quando precisar de tarefas de pesquisa em segundo plano ou respostas em streaming do Gemini.
- ✓Quando quiser saída estruturada ou chamadas de função pela Interactions API.
Link da skill
https://github.com/google/skills/blob/main/skills/cloud/gemini-interactions-api/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Crie um chat com o Gemini no Google Cloud que lembre das mensagens anteriores e possa executar uma tarefa de pesquisa em segundo plano.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Ela explica como autenticar, conectar e usar a Interactions API com o Google Gen AI SDK. Recomenda os modelos Gemini mais recentes e alerta contra pacotes antigos sem suporte.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Qual versão do SDK é necessária?
google-genai 2.3.0 ou superior para Python, e @google/genai 2.3.0 ou superior para JavaScript.
Ela oferece suporte aos pacotes Vertex antigos?
Não. Pacotes como google-cloud-aiplatform não têm suporte para a Interactions API.
Ela lida com streaming?
Sim. Ela cobre respostas em streaming.
Detalhes
Descrição original do 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
Popularidade
- Estrelas no GitHub
- 22 mil
- Posição no ranking
- #10262
- Licença
- Apache-2.0
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
finding-google-skills
22 milAjuda seu agente a achar os guias certos do Google para configurar um projeto, como hospedagem, banco de dados, armazenamento e login.
gcloud
22 milAjuda seu agente a escrever e verificar comandos gcloud do Google Cloud, consultando a sintaxe exata antes de executar qualquer coisa, para não adivinhar flags.
google-cloud-recipe-auth
22 milOrienta seu agente pela identidade e pelo acesso no Google Cloud, incluindo como pessoas e serviços fazem login e quais permissões recebem.
google-cloud-recipe-onboarding
22 milGuia um desenvolvedor novo pelos primeiros passos no Google Cloud, incluindo escolher um projeto, vincular o faturamento e implantar um primeiro recurso.
Skills parecidas
add-model-provider
394 milPermite que seu agente conecte um novo provedor de modelos de IA ao OpenClaw com comandos seguros, guarde as chaves de API com segurança e faça um teste ao vivo.
acp-router
394 milAjuda seu agente a enviar uma tarefa a um assistente de programação, como Claude Code ou Cursor, pelo OpenClaw, para que o trabalho rode nessa ferramenta.
browser-automation
394 milEnsina seu agente a controlar páginas web passo a passo, incluindo logins, abas e recuperação quando uma página para de responder.