Interface KeytermDetectionOptions

Configuration for automatic keyterm detection.

Lives under the keytermDetection key of KeytermsOptions. Absent or { enabled: false } keeps detection off.

interface KeytermDetectionOptions {
    enabled?: boolean;
    instructions?: string;
    llm?: string | llm.LLM;
    maxKeyterms?: number;
    timeout?: number;
    turnInterval?: number;
}

Properties

enabled?: boolean

Whether to run the background detector. Defaults to false.

instructions?: string

Override the built-in extraction prompt.

llm?: string | llm.LLM

LLM used for extraction. An LLM instance, or a model string (e.g. "google/gemini-3.5-flash") resolved via the inference gateway. Defaults to a built-in detection model; the agent's own LLM is not used.

maxKeyterms?: number

Cap on the confirmed (applied) detected keyterms if provided. Defaults to undefined.

timeout?: number

Milliseconds a single detection pass may run before it is dropped (no keyterm change). Defaults to 10_000. Raise it if a slow detection llm needs longer.

turnInterval?: number

Run a pass once per N user turns. Defaults to 1.