Skip to main content
After the risk scorer produces a score and the risk level is determined, Attesta selects a challenge — a verification step the human operator must complete before the action proceeds. Challenges scale in difficulty with risk: low-risk actions pass through automatically, while critical actions require multiple independent approvers.

Default Challenge Map

The minimum review time prevents “rubber-stamping” — approvals that happen too fast to indicate genuine review. If an operator responds before the minimum time elapses, the challenge is flagged in the audit trail.

The Four Challenge Types

Confirm

Simple Y/N prompt with a mandatory pause. Suitable for state-changing but well-understood actions.

Quiz

Auto-generated comprehension questions from the action context. Forces the operator to read before approving.

Teach-Back

Free-text explanation of what the action will do. Validates understanding through keyword matching and pluggable validators.

Multi-Party

Requires 2+ independent approvers, each completing a different sub-challenge. The strongest verification for irreversible operations.

How Challenge Selection Works

The challenge pipeline follows this sequence:

Challenge Flow Diagram

1

Gated function called

The decorated function is intercepted before execution.
2

Risk scoring (5 factors)

The risk scorer evaluates function name, arguments, hints, domain patterns, and amplifiers to produce a score from 0.0 to 1.0.
3

Trust adjustment (if enabled)

The trust engine may lower the effective risk for agents with a proven track record.
4

Challenge selection by risk level

5

Audit trail (hash chain)

The result — approved, denied, or timed out — is recorded in a tamper-proof, hash-chained audit log.

Minimum Review Times

Every challenge type enforces a minimum review time. If the operator responds faster than this threshold, the approval is still accepted, but it is flagged as a potential “rubber stamp” in the audit trail.

Customizing Review Times


Challenge Outcomes

Every challenge produces one of three outcomes:
When a challenge fails or is denied, the protected function is never executed. Attesta raises an AttestaDenied exception that the calling code must handle.

Configuration via YAML

The challenge map and review times can be configured declaratively:
attesta.yaml

ConfirmChallenge

Simple approval with mandatory pause

QuizChallenge

Auto-generated comprehension questions