interface AMDOptions {
    humanInstructions?: null | string;
    idleTimeout?: number;
    inferenceTimeout?: number;
    ivrInstructions?: null | string;
    llm?: null | string | llm.LLM | llm.DecisionModel<DecisionModelCallbacks>;
    machineSilenceThreshold?: number;
    maxInferenceTimeouts?: number;
    maxUncertainTurns?: number;
    openingInstructions?: null | string;
    openingText?: null | string;
    participantIdentity?: string;
    screeningInstructions?: null | string;
    stt?: null | string | stt.STT;
    timeout?: number;
    voicemailIdleTimeout?: number;
    voicemailInstructions?: null | string;
    waitUntilAnswered?: boolean;
}

Properties

humanInstructions?: null | string

Temporary instructions for the first human turn after a machine stage. Skipped if no machine stage preceded the human. null keeps the Agent's own instructions.

idleTimeout?: number

Silent, inactive time before AMD completes outside voicemail, in ms. Defaults to 10 s.

inferenceTimeout?: number

Prediction deadline per committed turn, in ms. Late results are ignored. Defaults to 2 s.

ivrInstructions?: null | string

Instructions for each IVR turn. The SDK supplies a DTMF tool only to IVR reply generations. null completes AMD when the call enters IVR, without a reply or menu extraction.

Classification model, and menu model when it is an LLM. When omitted, use google/gemma-4-31b-it if LiveKit Cloud credentials are available; otherwise use the current Agent's LLM. Pass null to always use the current Agent's LLM, for example to keep AMD within the quota of the session's models. A string selects a LiveKit Inference model. AMD logs the selected models when it starts. A DecisionModel that supports choice decisions classifies, but AMD then skips menu extraction. Calls use session.connOptions.llmConnOptions. Supplied models stay open when AMD completes.

machineSilenceThreshold?: number

Continuous participant silence before a machine reply plays, in ms. Includes silence before and during classification. Pipeline reply generation starts before the silence ends; realtime generation starts after it. Predictions update the category immediately. Replies outside a machine stage do not wait. Set to zero to disable the extra silence wait. Defaults to 1.5 s.

maxInferenceTimeouts?: number

Prediction timeouts before completion. A valid prediction resets the count. Defaults to 3.

maxUncertainTurns?: number

Consecutive uncertain predictions before completion with the current stage. A wait prediction resets the count. Defaults to 3.

openingInstructions?: null | string

Instructions for a reply that the agent generates and says first, when AMD starts listening. The reply cannot call tools. Set at most one of openingText and openingInstructions. The opening follows the same rules as openingText.

openingText?: null | string

Fixed text that the agent says first, when AMD starts listening. With waitUntilAnswered, that is after the SIP answer. Requires a TTS model. Set at most one of openingText and openingInstructions. null (the default) lets the participant speak first. The opening is skipped if the participant is already speaking, and cancelled, without a retry, if the participant starts speaking before it plays. Once it plays, participant speech interrupts it as usual. Do not also start speech before AMD, such as a reply in onEnter: AMD holds that speech, and the opening waits behind it. With a realtime model, a cancelled opening can stay in the model's server-side history.

participantIdentity?: string

Select the participant before placing an outbound call. When omitted, AMD listens to the participant that room I/O links.

screeningInstructions?: null | string

Instructions for each screening turn. null completes AMD when the call enters screening, without a reply.

stt?: null | string | stt.STT

Optional streaming STT model for AMD. When omitted, use cartesia/ink-whisper if LiveKit Cloud credentials are available; otherwise use only the session transcript. Pass null to always use only the session transcript, with no extra STT usage. With session STT configured, the classifier sees both transcripts of each turn. A string selects a LiveKit Inference model.

timeout?: number

Hard limit from the start of listening, in ms. Defaults to 60 s. Lower it when AMD only needs to distinguish a person from a machine; raise it for screeners, IVR menus, or hold queues.

voicemailIdleTimeout?: number

Silent, inactive time in voicemail, in ms. Starts after playback finishes, to allow a delayed post-message menu to arrive. Defaults to 10 s.

voicemailInstructions?: null | string

Instructions for one successfully played voicemail message. null completes AMD at the first voicemail prediction, without a message.

waitUntilAnswered?: boolean

Discard pre-answer audio from AMD and AgentSession when true. When false, listen to subscribed SIP early media. Defaults to true.