Agent Armor API Reference
    Preparing search index...

    Interface AgentArmorConfig

    Configuration passed to AgentArmor.regexOnly or AgentArmor.create.

    interface AgentArmorConfig {
        allowedActions?: ActionRule[];
        behaviouralControl?: {
            exfiltrationURLs?: boolean;
            jailbreakPatterns?: boolean;
            privilegeEscalation?: boolean;
        };
        cognitiveState?: {
            contextualLearning?: boolean;
            memoryPoisoning?: boolean;
            ragPoisoning?: boolean;
        };
        contentInjection?: {
            dynamicCloaking?: boolean;
            hiddenHTML?: boolean;
            metadataInjection?: boolean;
            syntacticMasking?: boolean;
        };
        customDetectors?: Detector[];
        ml?: MLConfig;
        normalizeUnicode?: boolean;
        on?: DiagnosticsConfig;
        semanticManipulation?: {
            biasedFraming?: boolean;
            oversightEvasion?: boolean;
            personaHyperstition?: boolean;
        };
        session?: SessionConfig;
        strictness?: Strictness;
        transportIntegrity?: {
            credentialExposure?: boolean;
            dependencySubstitution?: boolean;
            responseAnomaly?: boolean;
            toolCallTampering?: boolean;
        };
    }
    Index
    allowedActions?: ActionRule[]

    Positive allowlist for the pre-execution action gate (#57). When set, AgentArmor.checkAction admits only requests matching one of these rules; everything else fails closed. An empty array denies all actions.

    behaviouralControl?: {
        exfiltrationURLs?: boolean;
        jailbreakPatterns?: boolean;
        privilegeEscalation?: boolean;
    }

    Per-detector toggles within the Behavioural Control category. All default true.

    cognitiveState?: {
        contextualLearning?: boolean;
        memoryPoisoning?: boolean;
        ragPoisoning?: boolean;
    }

    Per-detector toggles within the Cognitive State category. All default true.

    contentInjection?: {
        dynamicCloaking?: boolean;
        hiddenHTML?: boolean;
        metadataInjection?: boolean;
        syntacticMasking?: boolean;
    }

    Per-detector toggles within the Content Injection category. All default true.

    customDetectors?: Detector[]

    Custom detectors to add to the pipeline

    ML classifier configuration (requires @stylusnexus/agentarmor-ml)

    normalizeUnicode?: boolean

    Apply Unicode normalization (NFKC + confusable folding + invisible-char stripping) before semantic detectors run, so homoglyph-obfuscated payloads are matched. Evidence and offsets still report against the original text. Structural detectors (content-injection) always scan the raw input. Default: true.

    Diagnostics callbacks — route internal warnings/errors to your own logging (#24).

    semanticManipulation?: {
        biasedFraming?: boolean;
        oversightEvasion?: boolean;
        personaHyperstition?: boolean;
    }

    Per-detector toggles within the Semantic Manipulation category. All default true.

    session?: SessionConfig

    Multi-turn / session scanning configuration (#35)

    strictness?: Strictness

    Confidence-threshold preset. Default: 'balanced'.

    transportIntegrity?: {
        credentialExposure?: boolean;
        dependencySubstitution?: boolean;
        responseAnomaly?: boolean;
        toolCallTampering?: boolean;
    }

    Per-detector toggles within the Transport Integrity category. All default true.