Prompt Buddy logoPrompt Buddy

google · Google AI Docs

Gemini API Session management with Live API

Explains how to manage stateful interactions within the Gemini Live API, including session lifecycles and handling real-time connections.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Gemini API Session management with Live API

Explains how to manage stateful interactions within the Gemini Live API, including session lifecycles and handling real-time connections.

When To Use

Use when implementing real-time, stateful multimodal interactions that require managing connection lifecycles and session continuity via the Gemini Live API.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/gemini-api-session-management-with-live-workflow-guide.mdA guide explaining session lifetime and context window compression for the Gemini Live API.Questions about a guide explaining session lifetime and context window compression for the Gemini Live API.
examples/gemini-api-session-management-with-live-gemini-api-live-session-manageme.textA Python code snippet demonstrating how to configure Live API session management using LiveConnectConfig and ContextWindowCompressionConfig.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to configure Live API session management using LiveConnectConfig and ContextW...
examples/gemini-api-session-management-with-live-gemini-api-live-session-manageme-2.textA configuration object defining response modalities and context window compression settings for Gemini API Live sessions.Exact payloads, commands, or snippets shown in A configuration object defining response modalities and context window compression settings for Gemini API Live sessi...
examples/gemini-api-session-management-with-live-gemini-api-live-session-resumpti.textA Python code example demonstrating how to use the Gemini Live API to manage and resume sessions using session resumption configurations.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the Gemini Live API to manage and resume sessions using session resump...
examples/gemini-api-session-management-with-live-gemini-api-live-session-manageme-3.textA Node.js code example demonstrating how to manage sessions using the Gemini API Live feature.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to manage sessions using the Gemini API Live feature.
examples/gemini-api-session-management-with-live-gemini-api-live-session-receive-.textA Python code snippet demonstrating how to asynchronously iterate through incoming responses and handle goaway signals within a Gemini Live API session.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to asynchronously iterate through incoming responses and handle goaway signal...
examples/gemini-api-session-management-with-live-gemini-api-live-session-manageme-4.textA JavaScript code snippet demonstrating how to iterate through turns and handle the goAway signal during a Gemini Live API session.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to iterate through turns and handle the goAway signal during a Gemini Liv...
examples/gemini-api-session-management-with-live-gemini-api-live-session-receive--2.textA Python code snippet demonstrating how to asynchronously iterate through incoming responses from a Gemini Live API session.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to asynchronously iterate through incoming responses from a Gemini Live API s...
examples/gemini-api-session-management-with-live-gemini-api-live-session-manageme-5.textA JavaScript code example demonstrating how to iterate through and handle server content turns within a Gemini API Live session.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to iterate through and handle server content turns within a Gemini API Li...

What This Skill Covers

  • In the Live API, a session refers to a persistent connection where input and output are streamed continuously over the same connection (read more about how i...
  • Main sections: Session lifetime, Context window compression, Python, JavaScript, Session resumption.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://ai.google.dev/gemini-api/docs/live-api/session-management