ADK for TypeScript: API Reference
    Preparing search index...

    Function createRunConfig

    • Creates a RunConfig with production-safe defaults.

      Default values applied when the corresponding field is absent from params:

      • saveInputBlobsAsArtifacts → false
      • supportCfc → false
      • enableAffectiveDialog → false
      • streamingMode → StreamingMode.NONE
      • maxLlmCalls → 500 (validated via validateMaxLlmCalls)
      • pauseOnToolCalls → false

      Parameters

      Returns {
          a2aMetadata?: Record<string, unknown>;
          allowRemoteToolConfirmation?: boolean;
          contextWindowCompression?: ContextWindowCompressionConfig;
          enableAffectiveDialog: boolean;
          inputAudioTranscription?: AudioTranscriptionConfig;
          maxLlmCalls: number;
          outputAudioTranscription?: AudioTranscriptionConfig;
          pauseOnToolCalls: boolean;
          plainTextToolConfirmation?: boolean;
          proactivity?: ProactivityConfig;
          realtimeInputConfig?: RealtimeInputConfig;
          remoteDelivered?: boolean;
          responseModalities?: Modality[];
          saveInputBlobsAsArtifacts: boolean;
          speechConfig?: SpeechConfig;
          streamingMode: StreamingMode;
          supportCfc: boolean;
      }

      A merged RunConfig object.

      • Optionala2aMetadata?: Record<string, unknown>

        Request-level metadata passed from an incoming A2A request or caller.

      • OptionalallowRemoteToolConfirmation?: boolean

        If true, a requireConfirmation gate may be answered by a message that arrived over A2A.

        Off by default: a remote peer is not the human operator, and a peer that can post to the task would otherwise be able to approve a dangerous tool call on the operator's behalf — the thing the gate exists to prevent. Turn it on only where the peer is a trusted relay for a real person: a front-end that renders the prompt and sends back what they chose.

        A deliberate divergence from adk-python, which refuses a remote-delivered confirmation outright and offers no way back. The default matches; the option does not exist there.

      • OptionalcontextWindowCompression?: ContextWindowCompressionConfig

        Context window compression config. When the running context exceeds triggerTokens, the server compresses older history to targetTokens.

      • enableAffectiveDialog: boolean

        If enabled, the model will detect emotions and adapt its responses accordingly.

      • OptionalinputAudioTranscription?: AudioTranscriptionConfig

        Input transcription for live agents with audio input from user.

      • maxLlmCalls: number
      • OptionaloutputAudioTranscription?: AudioTranscriptionConfig

        Output audio transcription config.

      • pauseOnToolCalls: boolean

        If true, the agent loop will suspend on ANY tool call, allowing the client to intercept and execute tools (Client-Side Tool Execution).

      • OptionalplainTextToolConfirmation?: boolean

        If true, a plain-text user reply (e.g. "yes"/"no") may resolve a pending requireConfirmation tool gate. Off by default so an ordinary chat message on a web/API surface is never silently reinterpreted as a security decision; interactive front-ends (e.g. adk run) opt in explicitly.

      • Optionalproactivity?: ProactivityConfig

        Configures the proactivity of the model. This allows the model to respond proactively to the input and to ignore irrelevant input.

      • OptionalrealtimeInputConfig?: RealtimeInputConfig

        Realtime input config for live agents with audio input from user.

      • Optional InternalremoteDelivered?: boolean

        Set by the A2A executor to record that this run's message came from a remote peer. Not part of the configuration surface: an application setting it by hand is asserting something about the message's provenance that only the transport can know.

        Read by the tool-confirmation resume path only. The other two interrupts a peer can answer — adk_request_credential and adk_request_input — are answerable by a client by design: a credential is something a client holds, and an input request asks for data, not for judgement. Confirmation is the one that asks a specific human to take responsibility for an action, which is why it is the one a peer cannot stand in for.

      • OptionalresponseModalities?: Modality[]

        The output modalities. If not set, it's default to AUDIO.

      • saveInputBlobsAsArtifacts: boolean

        Whether or not to save the input blobs as artifacts.

      • OptionalspeechConfig?: SpeechConfig

        Speech configuration for the live agent.

      • streamingMode: StreamingMode

        How the response is delivered. Defaults to StreamingMode.NONE, which emits one event when the turn completes; set StreamingMode.SSE to receive partial events as the response is produced. StreamingMode.BIDI is rejected by createRunConfig; bidirectional streaming is reached through Runner.runLive() instead.

      • supportCfc: boolean

        Whether to support CFC (Compositional Function Calling). Only applicable for StreamingMode.SSE. If it's true. the LIVE API will be invoked. Since only LIVE API supports CFC

        WARNING: This feature is experimental and its API or behavior may change in future releases.

      When params.maxLlmCalls exceeds Number.MAX_SAFE_INTEGER.

      When params.streamingMode is StreamingMode.BIDI.