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

    Interface RunConfig

    Configs for runtime behavior of agents.

    interface RunConfig {
        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;
    }

    Properties

    a2aMetadata?: Record<string, unknown>

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

    allowRemoteToolConfirmation?: 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.

    contextWindowCompression?: 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.

    inputAudioTranscription?: AudioTranscriptionConfig

    Input transcription for live agents with audio input from user.

    maxLlmCalls?: number

    A limit on the total number of llm calls for a given run.

    Valid Values:

    • More than 0 and at most Number.MAX_SAFE_INTEGER: The bound on the number of llm calls is enforced. createRunConfig() throws for anything larger.
    • Less than or equal to 0: This allows for unbounded number of llm calls.
    outputAudioTranscription?: 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).

    plainTextToolConfirmation?: 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.

    proactivity?: ProactivityConfig

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

    realtimeInputConfig?: RealtimeInputConfig

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

    remoteDelivered?: 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.

    responseModalities?: Modality[]

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

    saveInputBlobsAsArtifacts?: boolean

    Whether or not to save the input blobs as artifacts.

    speechConfig?: 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.