agent-platform-inference
O que ela faz
Mostra como autenticar e enviar solicitações ao Gemini e a modelos abertos de terceiros, como Llama ou DeepSeek, no Agent Platform. É para desenvolvedores que estão testando ou criando com esses modelos.
Quando usar
- ✓Quando você quiser enviar um prompt de teste a um modelo Gemini no Google Cloud.
- ✓Quando quiser chamar um modelo aberto, como Llama ou DeepSeek, pelo Agent Platform.
- ✓Quando precisar de código para uma chamada de chat ou de completion usando o SDK GenAI ou o SDK OpenAI.
Link da skill
https://github.com/google/skills/blob/main/skills/cloud/agent-platform-inference/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
“Escreva um código que faça uma pergunta a um modelo Gemini no Agent Platform e mostre a resposta.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Ele configura a autenticação para o SDK certo, identifica o modelo e o projeto e executa a solicitação depois que você confirmar, já que cada solicitação pode gerar custo e consumir cota.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Agent Platform GenAI Inference Skill
This skill provides instructions for authenticating and connecting to Google Cloud Agent Platform to use Generative AI models. It covers:
- First-Party publisher models (Gemini) — section 2.
- Third-Party publisher models (OpenMaaS: Llama, DeepSeek, Qwen, etc.) — section 3.
- Custom endpoints (any model on a numeric
projects/.../endpoints/<id>resource — tuned Gemini models, OSS LLMs self-deployed from Model Garden via theagent-platform-deployskill, and legacy custom models) — section 4.
Safety & Confirmation Tiers (CRITICAL)
Before executing any commands or scripts on behalf of the user, you must adhere to the following safety tiers based on the action requested. (The skill is read-only; other safety tiers are omitted):
- Tier R: Read-only / Inference (
client.models.generate_content,client.chat.completions.create,client.completions.create,client.embeddings.create)- Requires interactive confirmation with 'Yes'/ 'No' options before executing model inference on behalf of the user, to prevent unexpected cost or quota consumption.
- Required Fields in Confirmation Card: The confirmation prompt must
clearly explain the proposed inference execution and explicitly list all
of the following parameters:
- Project ID: The Google Cloud project ID or number (e.g.
123456789012,my-project). - Region / Location: The target region (e.g.
us-central1,global). - Model ID: The exact model ID (e.g.
gemini-2.5-flash,deepseek-ai/deepseek-v3.2-maas). - SDK: The SDK choice (e.g.
Google GenAI SDK (google-genai),OpenAI SDK). - Input Prompt (or Input Image / Input Media): The prompt text or media URI.
- Any additional generation parameters (e.g.
max_output_tokens,response_schema) if specified. Natural-language paraphrases without explicitly listing these parameters are NOT sufficient.
- Project ID: The Google Cloud project ID or number (e.g.
- Same-turn restriction: Do not execute the inference scripts or commands in the same turn as presenting the confirmation prompt. Stop and wait for the user's reply; only execute after explicit 'Yes' / approval.
- Gold Standard Example:
I will perform model inference with the following parameters. Please confirm this information before I proceed:
- Project ID:
my-project - Region:
us-central1 - Model ID:
gemini-2.5-pro - SDK: Google GenAI SDK (
google-genai) - Input Prompt: "Summarize the plot of Hamlet in 3 sentences"
Do you confirm? [Yes/No]
- Project ID:
- Post-Execution Response Grounding (CRITICAL):
After receiving explicit user approval and executing the inference call
via the SDK, the response returning the generated text MUST
explicitly confirm the execution parameters alongside the model's
output. Never return a bare model response alone. Always include:
- Model ID: The exact model ID used (e.g.
gemini-2.5-proor<MODEL_ID>). - SDK: The SDK used (e.g.
Google GenAI SDK (google-genai)orOpenAI SDK). - Project ID: The Google Cloud project ID/number used.
- Region: The region or endpoint location used (e.g.
globalorus-central1). - Generated Output: The model's complete generated answer.
- Model ID: The exact model ID used (e.g.
Phase 0: Environment Setup
CRITICAL: Before running any of the Python sample scripts in the scripts/
directory (e.g., scripts/openmaas_openai_sdk.py), you MUST ensure the
environment is correctly initialized by following these steps:
Google Cloud Authentication: Authenticate with your Google Cloud credentials and configure active Application Default Credentials (ADC) for Agent Platform access:
gcloud auth login gcloud auth application-default loginEnable API (if not already enabled):
gcloud services enable aiplatform.googleapis.comPython Dependencies: The scripts import
vertexai(fromgoogle-cloud-aiplatform),google-genai, andopenai. Do not create a virtual environment — it starts empty
Perguntas frequentes
Ele executa uma solicitação sem perguntar?
Não. Ele pede confirmação antes da inferência, porque as solicitações podem custar dinheiro e consumir cota.
Ele cobre modelos personalizados?
Sim. Ele cobre endpoints personalizados, como modelos ajustados ou implantados por você mesmo.
Quais SDKs ele suporta?
O SDK GenAI, o SDK OpenAI e o SDK legado do Agent Platform.
Detalhes
Descrição original do autor
Connects to and performs inference with Google Cloud Agent Platform GenAI models, including First-Party Gemini models and Third-Party OpenMaaS models (Llama, DeepSeek, Qwen, etc.). Use when asked to perform inference, ask a model a question, run a test prompt, execute chat completions, or generate code for calling Gemini or OpenMaaS models, authenticate with GenAI SDK, OpenAI SDK, or legacy Agent Platform SDK, configure base URLs and global/regional endpoints, or troubleshoot 429 Resource Exhausted (DSQ), 400 User Validation, or 404 Not Found errors. Don't use for deploying models to endpoints
repo: google/skills
Popularidade
- Estrelas no GitHub
- 22 mil
- Posição no ranking
- #10203
- 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
writing-skills
311 milEnsina seu agente a escrever novas skills e testar cada uma antes, conferindo se a skill realmente muda o comportamento do agente.
writing-for-agents
310 milExplica como escrever instruções claras para agentes de IA, incluindo skills, arquivos AGENTS.md e CLAUDE.md, para que o agente se comporte de forma previsível.
bengali-nlp
280 milFaz seu agente processar textos em bengali. Ajuda a entender e trabalhar com a língua, normalizando o texto e lidando com suas características únicas.