Skip to main content

Version: 2026.04 | Last Updated: April 2026| Status: Draft

Threshold Tuning

Fine-tune risk thresholds, rate limits, budget controls, and autonomous agent governance for optimal security and operational efficiency.

Overview​

Threshold configuration allows organizations to balance security requirements with operational efficiency by adjusting when actions require approval, when to auto-approve, and when to block.

Source: ow-ai-backend/models_agent_registry.py (SEC-068)

Compliance: SOC 2 CC6.1/CC6.2/CC7.1, NIST AC-3/SI-4, PCI-DSS 7.1

warning

Threshold changes affect all agents in your organization immediately. Lowering the auto-approve threshold allows more actions to bypass human review -- verify this aligns with your risk tolerance before applying.

Risk Thresholds​

Core Threshold Settings​

SettingDefaultRangeDescription
default_risk_score500-100Base risk for new actions
auto_approve_below300-100Auto-approve threshold
max_risk_threshold800-100Maximum allowed risk
requires_mfa_above700-100MFA requirement trigger

Threshold Flow​

┌───────────────────────────────────────────────────────────────┐
│ Risk Score Evaluation │
├───────────────────────────────────────────────────────────────┤
│ │
│ Risk Score < auto_approve_below (30) │
│ └── AUTO-APPROVE │
│ │
│ Risk Score >= auto_approve_below AND < requires_mfa_above │
│ └── REQUIRE APPROVAL │
│ │
│ Risk Score >= requires_mfa_above (70) │
│ └── REQUIRE MFA + APPROVAL │
│ │
│ Risk Score > max_risk_threshold (80) │
│ └── BLOCK │
│ │
└───────────────────────────────────────────────────────────────┘

Autonomous Agent Thresholds (SEC-068)​

Stricter Defaults for Autonomous Agents​

SettingSupervisedAutonomous
auto_approve_below3040
max_risk_threshold8060
require_dual_approvalfalseconfigurable

Autonomous-Specific Settings​

SettingDefaultDescription
autonomous_auto_approve_below40Lower auto-approve threshold
autonomous_max_risk_threshold60Lower maximum risk
autonomous_require_dual_approvalfalseTwo approvers required

Rate Limiting (SEC-068)​

Rate Limit Configuration​

SettingDefaultDescription
max_actions_per_minutenullPer-minute limit (null = unlimited)
max_actions_per_hournullPer-hour limit
max_actions_per_daynullPer-day limit

Example Configuration​

{
"agent_id": "customer-service-agent",
"max_actions_per_minute": 10,
"max_actions_per_hour": 100,
"max_actions_per_day": 500
}

Rate Limit Tracking​

ColumnDescription
current_minute_countActions in current minute
current_hour_countActions in current hour
current_day_countActions in current day
rate_limit_window_startWindow tracking timestamp

Budget Controls (SEC-068)​

Budget Configuration​

SettingDefaultDescription
max_daily_budget_usdnullDaily spending limit
budget_alert_threshold_percent80Alert at percentage
auto_suspend_on_budget_exceededtrueAuto-suspend toggle

Budget Tracking​

ColumnDescription
current_daily_spend_usdToday's spend
budget_reset_atNext reset timestamp
budget_alert_sentAlert status flag

Budget Flow​

Daily Budget: $1,000

├── Spend < $800 (80%)
│ └── Normal operation
│
├── Spend >= $800
│ └── Alert sent to admin
│
└── Spend >= $1,000
└── Auto-suspend agent (if enabled)

Time Window Restrictions (SEC-068)​

Time-Based Configuration​

SettingDefaultDescription
time_window_enabledfalseEnable restrictions
time_window_startnullStart time (HH:MM)
time_window_endnullEnd time (HH:MM)
time_window_timezoneUTCTimezone
time_window_days[]Allowed days (0=Sun, 1=Mon...)

Example: Business Hours Only​

{
"time_window_enabled": true,
"time_window_start": "09:00",
"time_window_end": "17:00",
"time_window_timezone": "America/New_York",
"time_window_days": [1, 2, 3, 4, 5]
}

Data Classification Restrictions (SEC-068)​

Classification Levels​

ClassificationDescriptionRisk Level
publicPublicly availableLow
internalInternal use onlyLow
confidentialBusiness sensitiveMedium
piiPersonal dataHigh
phiHealth dataHigh
pciPayment dataCritical
financialFinancial dataHigh
secretTop secretCritical

Configuration​

{
"allowed_data_classifications": ["public", "internal"],
"blocked_data_classifications": ["pii", "financial", "secret"]
}

Auto-Suspension Triggers (SEC-068)​

Suspension Configuration​

SettingDefaultDescription
auto_suspend_enabledfalseEnable auto-suspend
auto_suspend_on_error_ratenullError rate trigger (0.10 = 10%)
auto_suspend_on_offline_minutesnullOffline duration trigger
auto_suspend_on_budget_exceededtrueBudget trigger
auto_suspend_on_rate_exceededfalseRate limit trigger

Suspension Tracking​

ColumnDescription
auto_suspended_atWhen suspended
auto_suspend_reasonWhy suspended

Anomaly Detection (SEC-068)​

Anomaly Configuration​

SettingDefaultDescription
anomaly_detection_enabledtrueEnable detection
anomaly_threshold_percent50.0Deviation threshold

Baseline Metrics​

MetricDescription
baseline_actions_per_hourNormal action rate
baseline_error_rateNormal error rate
baseline_avg_risk_scoreNormal risk score

Anomaly Tracking​

ColumnDescription
last_anomaly_checkLast check timestamp
last_anomaly_detectedLast anomaly timestamp
anomaly_count_24h24-hour anomaly count

Escalation Paths (CR-003)​

Autonomous Escalation​

SettingDescription
autonomous_escalation_webhook_urlWebhook for high-risk alerts
autonomous_escalation_emailFallback email
autonomous_allow_queued_approvalQueue for human review

Example Configuration​

{
"autonomous_escalation_webhook_url": "https://hooks.slack.com/...",
"autonomous_escalation_email": "security@company.com",
"autonomous_allow_queued_approval": true
}

Concurrent Action Limits (SEC-068)​

SettingDefaultDescription
max_concurrent_actionsnullConcurrent limit
current_concurrent_actions0Current count
max_session_duration_minutesnullSession timeout

Tuning Recommendations​

Conservative (High Security)​

{
"auto_approve_below": 15,
"max_risk_threshold": 60,
"requires_mfa_above": 50,
"auto_suspend_enabled": true,
"anomaly_detection_enabled": true,
"anomaly_threshold_percent": 30.0
}

Balanced (Standard Operations)​

{
"auto_approve_below": 30,
"max_risk_threshold": 80,
"requires_mfa_above": 70,
"auto_suspend_enabled": false,
"anomaly_detection_enabled": true,
"anomaly_threshold_percent": 50.0
}

Permissive (High Throughput)​

{
"auto_approve_below": 50,
"max_risk_threshold": 90,
"requires_mfa_above": 85,
"auto_suspend_enabled": false,
"anomaly_detection_enabled": false
}

Best Practices​

  1. Start conservative: Begin with strict thresholds, relax gradually
  2. Monitor false positives: High block rates indicate thresholds too strict
  3. Enable anomaly detection: Catch unusual patterns early
  4. Set budget limits: Always configure budget controls
  5. Document changes: Track threshold modifications in change log
  6. Review regularly: Audit thresholds quarterly

Troubleshooting​

Too many actions blocked​

Cause: max_risk_threshold too low.

Solution: Gradually increase threshold; monitor for legitimate blocks.

Too many approval requests​

Cause: auto_approve_below too low.

Solution: Analyze approved requests; increase threshold for low-risk patterns.

Agent frequently suspended​

Cause: Auto-suspend triggers too sensitive.

Solution: Increase auto_suspend_on_error_rate or disable non-critical triggers.


Source: models_agent_registry.py