Agent Armor API Reference
    Preparing search index...

    Interface PatternEntry

    A single detection pattern in the database. Patterns are regex strings (not RegExp objects) so they can be serialized to/from JSON for remote updates.

    interface PatternEntry {
        boostOnInstructions?: boolean;
        category: TrapCategory;
        confidence: number;
        extractGroup?: number;
        flags: string;
        id: string;
        label: string;
        minLength?: number;
        regex: string;
        requireInstructions?: boolean;
        severity: Severity;
        type: TrapType;
    }
    Index
    boostOnInstructions?: boolean

    Whether to boost confidence when instruction signals are found

    category: TrapCategory

    Which trap category this pattern detects

    confidence: number

    Base confidence score (0-1) before instruction-signal boosting

    extractGroup?: number

    Which capture group to extract text from (0 = full match)

    flags: string

    Regex flags (e.g. "gi")

    id: string

    Unique ID for this pattern

    label: string

    Human-readable label for this pattern

    minLength?: number

    Minimum extracted text length to trigger (avoids false positives)

    regex: string

    Regex source string (without flags)

    requireInstructions?: boolean

    If true, pattern ONLY fires when instruction signals are detected. Use for patterns that match legitimate content too often (e.g. "create agent").

    severity: Severity

    Base severity if matched

    type: TrapType

    Specific trap type