Plugins
Confidence Score Plugin
The Confidence Score plugin computes a dynamic trust score for each AI agent based on its history of approved, denied, and escalated actions. Scores drive policy routing — low-confidence agents are automatically sent for human review.
How It Works
0.9 – 1.0
High
Auto-allow
0.5 – 0.9
Medium
Human review
0 – 0.5
Low
Auto-deny by default
Scores are computed as a rolling exponential moving average over the last 100 actions. The decay factor is configurable.
Rego Integration
The Engine injects the current agent confidence score into every Rego evaluation as input.confidence.
policy/auth.rego
package lelu.authz
import future.keywords
# Require human approval for low-confidence agents
default allow := false
default require_review := false
allow {
input.confidence >= 0.9
}
require_review {
input.confidence >= 0.5
input.confidence < 0.9
}Configuration Options
Environment variables
# Minimum confidence to auto-allow (default: 0.9) CONFIDENCE_AUTO_ALLOW_THRESHOLD=0.9 # Minimum confidence to require review (default: 0.5) CONFIDENCE_REVIEW_THRESHOLD=0.5 # EMA decay factor (default: 0.1 = ~10 action window) CONFIDENCE_EMA_DECAY=0.1 # Starting score for new agents (default: 0.7) CONFIDENCE_INITIAL_SCORE=0.7