Skip to main content
Every risk score produced by the scoring engine is classified into one of four discrete levels using the RiskLevel enum. Each level determines the challenge type presented to the human operator.

Risk Level Thresholds

Boundary values are inclusive on the lower bound. A score of exactly 0.3 is MEDIUM, a score of exactly 0.6 is HIGH, and a score of exactly 0.8 is CRITICAL.

The RiskLevel Enum

from_score() Classification Logic


Visual Risk Bar

When using the TerminalRenderer, Attesta displays a colored risk bar in the terminal showing the score and level:
The bar color transitions from green through yellow and orange to red as the score increases.

Default Challenge Map

The default mapping from risk levels to challenges is:
You can override the default challenge map in your attesta.yaml configuration. For example, you might map HIGH-risk actions to TeachBackChallenge instead of QuizChallenge.

Overriding the Challenge Map


Trust-Adjusted Risk

The Trust Engine can shift the effective risk level for agents with a proven track record. A trusted agent’s MEDIUM action might be treated as LOW, reducing friction. However, a critical safety invariant applies:
CRITICAL actions are never downgraded. Regardless of an agent’s trust score, actions scoring 0.8 or above always require multi-party approval. This invariant is enforced in the Trust Engine and cannot be overridden.

Comparison Table

Risk Scoring

How the 5-factor scorer produces a numeric score

Challenges

The challenge system and how levels map to challenges