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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/gemini-api-session-management-with-live-workflow-guide.md | A 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.text | A 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.text | A 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.text | A 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.text | A 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-.text | A 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.text | A 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.text | A 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.text | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
