gemini-live-api
O que ela faz
Esta skill gera código para um cliente Gemini em tempo real que lida com áudio, vídeo e texto em streaming. É para desenvolvedores que criam assistentes de voz ou vídeo no Google Cloud.
Quando usar
- ✓Quando você quiser criar um cliente de voz ou vídeo em tempo real para o Gemini no Google Cloud.
- ✓Quando precisar de um cliente da Live API que retome sessões e renove tokens.
- ✓Quando quiser um frontend e um backend de exemplo para testar uma conexão ao vivo com o Gemini.
Link da skill
https://github.com/google/skills/blob/main/skills/cloud/gemini-live-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 cliente para a Live API do Gemini que envie o áudio do meu microfone ao modelo e reproduza as respostas dele.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Ela escreve uma classe cliente que abre uma conexão WebSocket com um token do seu login do Google, envia e recebe mensagens e retoma sessões. Também cria um frontend e um backend de demonstração para testá-lo.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
LiveAPI Service Skill
This skill provides instructions for generating a LiveAPI client service
class that connects to the Gemini Enterprise Live API over WebSockets. The
generated client handles bidirectional streaming, bearer-token authentication
via Application Default Credentials (ADC), transparent session resumption, and
ClientMessage / ServerMessage proto exchange.
The skill also produces a demo frontend + backend service so the user can interactively validate the generated client (text, audio, video, transcription, and interrupt handling).
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-live-api)"
and append agent-skills/1.0 (skill:gemini-live-api) to User-Agent headers.
Prerequisites
Before running the generation flow, ensure the following are available on the host:
A Google Cloud project with the Vertex AI / Gemini Enterprise Agent Platform APIs enabled.
Application Default Credentials configured on the host running the generated client:
gcloud auth application-default loginA destination output folder supplied by the user (e.g.
/tmp/liveapi_out) where the generated code, environment, and demo will be written. Never mutate the host's system Python environment.The user's chosen implementation language (Python is the default and reference language for this skill).
Reference Files
Provided files in references/ (do not treat these as standalone skills —
they are loaded on demand):
client_server_messages.md: Public reference for theClientMessage/ServerMessageschemas used by the Live API.client_server_messages.proto: The proto definition generated fromclient_server_messages.md.session_manager.md: Describes how to correctly handle sessions, buffering, and resumption on disconnection.
Steps
Step 1: Copy the reference files
Copy client_server_messages.md, client_server_messages.proto, and
session_manager.md from this skill's references/ folder into the user's
destination output folder. These files become the source of truth for the
generated client.
Step 2: Reconcile with the public documentation
Examine the public documents linked from client_server_messages.md. If there
are any discrepancies between the public documents and the copied
client_server_messages.md / client_server_messages.proto, update the copies
in the destination folder so the generated client compiles and runs against the
current server contract.
Step 3: Implement the client class
Implement a class in the user's chosen language that:
- Imports the local
client_server_messages.prototypes (ClientMessage,ServerMessage). - Opens a WebSocket connection to the Live API endpoint.
- Exposes async methods so the user can send and receive data to/from the model.
For languages that require an isolated runtime (e.g. Python), create an isolated
environment (e.g. venv) inside the destination folder and generate a bash
script (e.g. setup.sh) that recreates the environment and installs
dependencies. Never install into the system interpreter or the user's global
site-packages, and never instruct the user to run sudo pip install.
Initialization parameters
The user provides the following at construction time:
project_idlocationmodel_idconfig: aClientMessagewith thesetupfield populated.
Authentication
Obtain a bearer token via Application Default Credentials, attach it to the
WebSocket connect request as Authorization: Bearer <token>, refresh the token
before or upon expiry, and reuse the refreshed token on every reconnection
(including go_away and unexpected disconnects). Do not hard-code a
long-lived API key as the only auth mechanism.
Public async API
The class MUST expose the following async methods, gated on receipt of a
setup_complete ServerMessage before sending:
send_realtime_data(data): send realtime input.datais aClientMessagecarrying arealtime_inputfield.send_client_content(data): send non-realtime, turn-based content that contributes to history. `da
Perguntas frequentes
Ela funciona para chamadas normais do Gemini, sem ser ao vivo?
Não. Ela serve apenas para conexões ao vivo e bidirecionais.
O que preciso ter antes de executar?
Um projeto do Google Cloud com as APIs ativadas e as Application Default Credentials configuradas.
Posso testar sem criar uma interface?
Sim. Ela também gera um frontend e um backend de demonstração que você pode usar.
Detalhes
Descrição original do autor
Generates a Gemini LiveAPI client service class in the user's chosen programming language. Use when the user wants to build, scaffold, or integrate a client that connects to the Gemini Enterprise LiveAPI websocket endpoint, handles session setup/resumption, bearer token refresh, and sending/receiving `ClientMessage`/`ServerMessage` protos. Don't use for general (non-live, non-bidirectional) Gemini API usage such as one-shot `generateContent`, embeddings, image/video generation, or fine-tuning — use the `gemini-api` skill for those.
repo: google/skills
Popularidade
- Estrelas no GitHub
- 22 mil
- Posição no ranking
- #10263
- 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
api-connector-builder
280 milFaz seu agente construir novas conexões com APIs seguindo o padrão já existente. Use quando precisar adicionar mais uma integração sem criar um novo jeito de fazer.
api-design
280 milAjuda seu agente a projetar APIs REST seguindo as melhores práticas. É útil para definir como as APIs se comunicam, como os erros são mostrados e como organizar os dados.
backend-patterns
280 milAjuda seu agente com padrões de arquitetura do lado do servidor e otimização de banco de dados. É útil para construir ou revisar o código que roda no servidor.