Need the strict launch-ready path? See 5-Minute Quickstart.
Install Attesta
- Python
- TypeScript
pip install attesta (without extras) installs the core library only. Without the terminal extra, Attesta auto-approves all actions in non-interactive environments. Use attesta[terminal] to see approval prompts.Call the function
When you call a gated function, Attesta intercepts the call, scores the risk, and presents the appropriate challenge.For
delete_user, the risk scorer will detect the destructive verb “delete” and score it as HIGH risk, presenting a comprehension quiz before allowing execution.Initialize a config file (optional)
For production use, create a configuration file to customize policies:This generates an
attesta.yaml with sensible defaults for challenge mappings, review times, trust settings, and risk overrides.What Happens When You Call a Gated Function
- Risk scoring — The
DefaultRiskScoreranalyzes the function name, arguments, docstring, hints, and novelty - Challenge selection — The risk level determines the challenge: LOW -> auto-approve, MEDIUM -> confirm, HIGH -> quiz, CRITICAL -> multi-party
- Verification — The human operator completes the challenge (or the action is auto-approved for low risk)
- Audit — The decision is recorded in a SHA-256 hash-chained audit log
If the operator denies the action or fails the challenge, Attesta raises an
AttestaDenied exception. The protected function is never executed.