Optional aecOptional connOptional expressive?: boolean | ExpressiveOptionsLet the LLM steer how the agent sounds.
When enabled, the provider's markup guide is injected into the LLM prompt so it can emit inline delivery tags (emotion, pacing, non-verbal sounds), which are rendered by the TTS and stripped from the transcript. Pass an ExpressiveOptions object to steer or override the injected instructions. Requires an TTS with a model that declares a markup dialect; it stays off otherwise.
false
Optional forwardMaximum time in milliseconds to wait for the next frame while forwarding TTS
audio to the audio output inside performAudioForwarding. Applies to every read,
including the first. If exceeded, forwarding is forcibly closed and a stall
warning is logged.
10000
Optional keytermsKeyterm biasing for the STT. Holds static keyterms plus keytermDetection
(LLM extraction). Applies to STTs that accept a term list; on others it warns
and is ignored.
Optional llm?: llm.LLM | llm.RealtimeModel | LLMModelsOptional maxOptional preemptiveUse turnHandling.preemptiveGeneration instead.
When set, migrated into turnHandling.preemptiveGeneration.enabled.
Optional stt?: stt.STT | STTModelStringOptional toolOptional tools?: ToolContextLike<UserData>Optional transcriptionEmit user_transcription_timeout when VAD detects user speech during the user's turn but no
non-empty final transcript arrives within this many milliseconds after the speech ends. This
can happen because STT failed or because audio was intentionally withheld from STT, such as
during AEC warmup or uninterruptible agent speech. A non-empty final transcript satisfies the
timeout for the current turn even if adaptive interruption detection later discards it as a
backchannel. Requires both VAD and STT. Set to null to disable.
null
Optional tts?: tts.TTS | TTSModelStringOptional ttsMaximum time in milliseconds to wait for the next frame on the TTS audio stream
inside performTTSInference. Applies to every read, including the first.
If exceeded, the TTS stream is forcibly closed and a stall warning is logged.
10000
Optional ttsTransforms to apply to TTS input text. Built-in transforms are filter_markdown
and filter_emoji; pass null to disable text transforms.
Optional turnuse turnHandling.turnDetection instead
Optional turnConfiguration for turn handling.
Optional useOptional userIf set, set the user state as "away" after this amount of time after user and agent are
silent. Set to null to disable.
15.0
Optional userOptional vad?: VAD | nullVoice Activity Detection. When omitted, AgentSession auto-provisions a
bundled inference.VAD({ model: 'silero' }) and marks it as the default
(so sites that check whether the user supplied a VAD treat the bundled
one as absent). Pass null to opt out entirely.
Optional voiceuse top-level SessionOptions fields instead
Duration in milliseconds for AEC (Acoustic Echo Cancellation) warmup, during which interruptions from audio activity are suppressed. Set to
nullto disable. Defaults to 3000, ornullfor outbound SIP calls.