Establishes a bidirectional streaming connection with the CES agent.
The agent processes continuous multimodal inputs (e.g., text, audio) and
generates real-time multimodal output streams.
--- Client Request Stream ---
The client streams requests in the following order:
Initialization:
The first message must contain
SessionConfig.
For audio sessions, this should also include
InputAudioConfig
and
OutputAudioConfig
to define audio processing and synthesis parameters.
Interaction:
Subsequent messages stream
SessionInput
containing real-time user input data.
Termination:
The client should half-close the stream when there is no more user
input. It should also half-close upon receiving
EndSession
or GoAway from
the agent.
--- Server Response Stream ---
For each interaction turn, the agent streams messages in the following
sequence:
Speech Recognition (First N messages):
Contains
RecognitionResult
representing the concatenated user speech segments captured so far.
This is only populated for audio sessions.
Response (Next M messages):
Contains
SessionOutput
delivering the agent's response in various modalities (e.g., text,
audio).
Turn Completion (Final message of the turn):
Contains
SessionOutput
with turn_completed
set to true. This signals the end of the current turn and includes
DiagnosticInfo
with execution details.
--- Audio Best Practices ---
Streaming:
Stream audio dataCONTINUOUSLY, even during silence. Recommended chunk size: 40-120ms
(balances latency vs. efficiency).
Playback & Interruption:
Play audio responses upon
receipt. Stop playback immediately if an
InterruptionSignal
is received (e.g., user barge-in or new agent response).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-02-27 UTC."],[],[]]