@jambonz/sdk
    Preparing search index...

    Interface AgentVerb

    interface AgentVerb {
        verb: "agent";
        id?: string;
        stt?: Recognizer;
        tts?: Synthesizer;
        turnDetection?:
            | "krisp"
            | { mode: "krisp"; threshold?: number; model?: string }
            | "stt";
        bargeIn?: {
            enable?: boolean;
            strategy?: "vad" | "interruptPrediction";
            vendor?: string;
            threshold?: number;
            minSpeechDuration?: number;
            sticky?: boolean;
        };
        llm?: AgentLlm;
        actionHook?: ActionHook;
        eventHook?: ActionHook;
        toolHook?: ActionHook;
        handoff?: Handoff;
        hangup?: { reason?: string };
        toolFiller?:
            | false
            | {
                type: "audio"
                | "backchannel";
                startDelaySecs?: number;
                url?: string;
                style?: string;
                escalationSecs?: number;
            };
        greeting?: boolean;
        earlyGeneration?: boolean;
        noiseIsolation?: | "krisp"
        | {
            mode: string;
            level?: number;
            direction?: "read"
            | "write";
            model?: string;
        }
        | "rnnoise";
        mcpServers?: McpServerConfig[];
        noResponseTimeout?: number;
        autoLockLanguage?: boolean
        | "always";
        languageConfig?: Record<string, { tts?: Synthesizer }>;
    }
    Index

    Properties

    verb: "agent"
    id?: string

    STT configuration. Optional — can be set at the application level.

    TTS configuration. Optional — can be set at the application level.

    turnDetection?:
        | "krisp"
        | { mode: "krisp"; threshold?: number; model?: string }
        | "stt"

    Turn detection strategy. String shorthand ('stt' or 'krisp') or object with tunable params.

    bargeIn?: {
        enable?: boolean;
        strategy?: "vad" | "interruptPrediction";
        vendor?: string;
        threshold?: number;
        minSpeechDuration?: number;
        sticky?: boolean;
    }

    Barge-in configuration — controls user interruption of assistant speech.

    Type Declaration

    • Optionalenable?: boolean
    • Optionalstrategy?: "vad" | "interruptPrediction"

      How interruptions are detected. 'vad' (default): speech onset tentatively interrupts the assistant and is confirmed after minSpeechDuration of sustained speech, otherwise the assistant resumes. 'interruptPrediction': an ML model scores whether caller speech is a genuine interruption attempt vs backchannel (e.g. 'uh-huh'), so the assistant is never tentatively paused and backchannel does not cut it off; requires a provisioned vendor API key.

    • Optionalvendor?: string

      Detection vendor for strategy 'interruptPrediction'; defaults to 'krisp' (currently the only option). Not used with strategy 'vad'.

    • Optionalthreshold?: number

      Probability threshold for interruptPrediction (0-1). Higher values require stronger evidence before interrupting the assistant. Default: 0.5.

    • OptionalminSpeechDuration?: number
    • Optionalsticky?: boolean
    llm?: AgentLlm

    LLM configuration. Optional: when omitted, the agent uses the application's default LLM (like stt/tts).

    actionHook?: ActionHook

    Webhook when agent ends.

    eventHook?: ActionHook

    Webhook for agent events.

    toolHook?: ActionHook

    Webhook when the LLM requests a tool/function call.

    handoff?: Handoff

    Declarative transfer-to-human: injects a transfer tool and runs the packaged transfer when the model calls it.

    hangup?: { reason?: string }

    Enable the built-in hangup tool. When present, the runtime injects a 'hangup' tool; when the model calls it the call ends with the reason placed in an X-Reason SIP header (LLM-supplied reason wins, falling back to hangup.reason).

    toolFiller?:
        | false
        | {
            type: "audio"
            | "backchannel";
            startDelaySecs?: number;
            url?: string;
            style?: string;
            escalationSecs?: number;
        }

    Configuration for playing filler audio while tool calls are in progress. Prevents silence during long-running tool executions.

    Type Declaration

    • false
    • {
          type: "audio" | "backchannel";
          startDelaySecs?: number;
          url?: string;
          style?: string;
          escalationSecs?: number;
      }
      • type: "audio" | "backchannel"

        Filler mode. 'audio' plays a looping audio file. 'backchannel' uses TTS to speak short phrases.

      • OptionalstartDelaySecs?: number

        Seconds to wait after tool invocation before playing filler. Default: 2.

      • Optionalurl?: string

        Audio file URL (for type='audio'). Should be loopable.

      • Optionalstyle?: string

        Free-form style hint for LLM-generated phrases (for type='backchannel').

      • OptionalescalationSecs?: number

        Seconds from tool invocation before generating a longer explanatory response (for type='backchannel'). Default: 10.

    greeting?: boolean

    Whether the LLM generates an initial greeting before the user speaks. Default: true.

    earlyGeneration?: boolean

    Speculatively prompt the LLM on final transcript before Krisp end-of-turn. Default: false.

    noiseIsolation?:
        | "krisp"
        | {
            mode: string;
            level?: number;
            direction?: "read"
            | "write";
            model?: string;
        }
        | "rnnoise"

    Enable server-side noise isolation to reduce background noise on call audio. Defaults to inbound (caller) audio; set direction to 'write' for outbound.

    mcpServers?: McpServerConfig[]

    External MCP servers that provide tools to the LLM.

    noResponseTimeout?: number

    Seconds to wait after assistant finishes speaking before prompting user to respond. 0 disables. Default: 0.

    autoLockLanguage?: boolean | "always"

    Auto-adjust STT/TTS based on detected language. true=lock on first, 'always'=adapt every turn.

    languageConfig?: Record<string, { tts?: Synthesizer }>

    Per-language TTS overrides. Keys are BCP-47 codes (e.g., 'es', 'fr').