RunConfig

data class RunConfig @JvmOverloads constructor(val streamingMode: StreamingMode = StreamingMode.NONE, val maxLlmCalls: Int = 500, val customMetadata: Map<String, Any>? = null, val responseModalities: List<Modality> = emptyList(), val speechConfig: SpeechConfig? = null, val outputAudioTranscription: AudioTranscriptionConfig? = AudioTranscriptionConfig(), val inputAudioTranscription: AudioTranscriptionConfig? = AudioTranscriptionConfig(), val realtimeInputConfig: RealtimeInputConfig? = null, val explicitVadSignal: Boolean? = null, val translationConfig: TranslationConfig? = null, val enableAffectiveDialog: Boolean? = null, val proactivity: ProactivityConfig? = null, val sessionResumption: SessionResumptionConfig? = null, val contextWindowCompression: ContextWindowCompressionConfig? = null)

Configs for runtime behavior of agents.

Properties from responseModalities onwards apply only to a live connection, which is configured once when it opens and cannot be changed per turn. They only take effect through the experimental live API.

Constructors

Link copied to clipboard
constructor(streamingMode: StreamingMode = StreamingMode.NONE, maxLlmCalls: Int = 500, customMetadata: Map<String, Any>? = null, responseModalities: List<Modality> = emptyList(), speechConfig: SpeechConfig? = null, outputAudioTranscription: AudioTranscriptionConfig? = AudioTranscriptionConfig(), inputAudioTranscription: AudioTranscriptionConfig? = AudioTranscriptionConfig(), realtimeInputConfig: RealtimeInputConfig? = null, explicitVadSignal: Boolean? = null, translationConfig: TranslationConfig? = null, enableAffectiveDialog: Boolean? = null, proactivity: ProactivityConfig? = null, sessionResumption: SessionResumptionConfig? = null, contextWindowCompression: ContextWindowCompressionConfig? = null)

Types

Link copied to clipboard
class Builder

Fluent builder for RunConfig, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Keeps the session's context below a given length.

Link copied to clipboard

Custom metadata for the current invocation.

Link copied to clipboard

Whether the model detects emotion and adapts its responses.

Link copied to clipboard

Whether the model sends its voice activity detection signals. Only the Vertex AI backend accepts true; Gemini API clients reject it.

Link copied to clipboard

Transcription of the audio the user sends. Enabled by default with automatic language detection; set to null to disable it.

Link copied to clipboard

Limit on the total number of LLM calls per run. A positive value is enforced, except by a live run, which ignores it; a value <= 0 means unbounded.

Link copied to clipboard

Transcription of the audio the model returns. Enabled by default with automatic language detection; set to null to disable it.

Link copied to clipboard

Whether the model may decline to respond to a prompt.

Link copied to clipboard

How realtime input is interpreted as turns, including voice activity detection.

Link copied to clipboard

The modalities the model may return. Empty leaves it unset, and the SDK then asks for audio on a live connection, as unset does in ADK Python. A value set here is sent as is, as in ADK Python, so a modality the model cannot answer in fails the connection.

Link copied to clipboard

Configuration of the session resumption mechanism.

Link copied to clipboard

The speech generation configuration.

Link copied to clipboard

Streaming mode, NONE, SSE or BIDI.

Link copied to clipboard

Real-time speech-to-speech translation. Only translation models support it.

Functions

Link copied to clipboard

Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.