Agent Armor API Reference
    Preparing search index...

    Class AgentArmor

    Index
    • get patternVersion(): string

      Get the current pattern database version.

      Returns string

    • Pre-execution action gate (#57). Check a proposed agent action against the configured allowedActions allowlist and return a deterministic verdict.

      This is the positive-allowlist complement to the deny-list detector pipeline: it admits only explicitly permitted actions and fails closed on everything else, independent of any detector confidence threshold. With no allowedActions configured, every action is denied.

      Parameters

      Returns ActionVerdict

      const armor = AgentArmor.regexOnly({
      allowedActions: [{ tool: 'http.get', hosts: ['api.internal.example.com'] }],
      });
      const verdict = armor.checkAction({ tool: 'http.post', args: { url: '...' } });
      if (!verdict.admissible) throw new ActionBlockedError(verdict.reason);
    • Scan a multi-turn conversation for agent traps (sync).

      Each turn is scanned independently (turns), and the recent turns are also scanned for cross-turn split payloads (crossTurnThreats). Cross-turn semantic accumulation is reserved for the ML classifier (see session.accumulation) and is inactive here.

      Parameters

      Returns SessionScanResult