Configuration Reference

Every option you can pass to new AIXA({...}). All options are optional — the defaults are designed for immediate productivity with strong security defaults.

Full Configuration Options

Option Type Default Description
autoInfer boolean true Auto-scan the DOM for semantic elements and register them as tools automatically
developerOverrides boolean true Enable manual registerSearch and registerAction calls for custom tools
hitlEnabled boolean true Enable Human-in-the-Loop approval for HIGH_RISK tools
hitlTimeout number 30000 HITL modal timeout in milliseconds before auto-deny
hitlRiskLevels RiskLevel[] [HIGH_RISK] Which risk levels trigger the HITL modal
sanitizePayloads boolean true Enable prompt injection sanitization on all tool payloads
uiMirroring boolean true Show agent activity in the UI with visual indicators
debug boolean false Enable verbose console logging for development
cssPrefix string "aixa" CSS class prefix for all injected elements (e.g., .aixa-mirror-focus)
inferenceRoot string "body" CSS selector for the DOM subtree to scan during auto-inference
inferenceTagAllowlist string[] [] Limit auto-inference to specific HTML tags (empty array = all tags allowed)

Common Configurations

1. Everything On (Default)

The default configuration. All features enabled with secure defaults:

const aixa = new AIXA({
  autoInfer: true,
  developerOverrides: true,
  hitlEnabled: true,
  hitlTimeout: 30000,
  hitlRiskLevels: ['HIGH_RISK'],
  sanitizePayloads: true,
  uiMirroring: true,
  debug: false,
  cssPrefix: 'aixa',
  inferenceRoot: 'body',
  inferenceTagAllowlist: []
});

2. Auto-Inference Only, No HITL

A minimal configuration for rapid prototyping. The agent can freely interact with the page, but there is no human oversight on risky actions:

const aixa = new AIXA({
  autoInfer: true,
  hitlEnabled: false,
  uiMirroring: false
});

3. Production E-Commerce with Strict Security

Locked-down configuration for production e-commerce sites. Fast timeout, HITL enabled, and all sanitization active:

const aixa = new AIXA({
  autoInfer: true,
  hitlEnabled: true,
  hitlTimeout: 15000,
  sanitizePayloads: true,
  debug: false
});