Agent Armor API Reference
    Preparing search index...

    Interface MLConfig

    ML classifier configuration, passed as config.ml to AgentArmor.create.

    interface MLConfig {
        apiKey?: string;
        detector?: Detector;
        download?: MLDownloadConfig;
        enabled?: boolean;
        modelDir?: string;
        modelUrl?: string;
        onUnavailable?: "throw" | "warn-and-skip" | "silent-skip";
    }
    Index
    apiKey?: string

    API key for Pro tier pattern/model updates (future)

    detector?: Detector

    Inject a custom Detector (skips model download, useful for testing)

    download?: MLDownloadConfig

    Download configuration

    enabled?: boolean

    Enable ML classifier (downloads model on first use)

    modelDir?: string

    Local directory containing ONNX model + tokenizer files

    modelUrl?: string

    Custom model download URL (future)

    onUnavailable?: "throw" | "warn-and-skip" | "silent-skip"

    Behavior when ML model is unavailable