Building a Custom Profile
A custom domain profile is an instance of theDomainProfile dataclass with your domain-specific configuration.
Minimal Example
Full Example: Education (FERPA)
Registering Custom Profiles
Runtime Registration
Register your profile at application startup:Replacing Existing Profiles
If you need to update a previously registered profile, usereplace():
Merging Multiple Profiles
You can combine multiple profiles using the merge functionality:attesta.yaml
Design Guidelines
Risk Patterns
- Good Patterns
- Bad Patterns
- Target a specific action context (
args,function_name) - Include compliance references
- Use descriptive names
- Set proportional risk contributions
Risk Contribution Scale
Use this scale as a guideline for settingrisk_contribution values:
Critical Actions
Only designate actions as critical when they meet at least one of these criteria:- Irreversible — the action cannot be undone (e.g.,
delete_student_record) - Regulatory mandate — compliance requires multi-party approval (e.g.,
bulk_student_export) - Safety bypass — the action circumvents a safety control (e.g.,
override_consent_requirement)
Challenge Templates
Write challenge templates that test comprehension, not just knowledge:Testing Custom Profiles
Validate your custom profile before deploying:Next Steps
Domain Overview
Architecture and merge strategy for domain profiles
Domain Activation
Activate custom domains via attesta.yaml
Custom Risk Scorer
Build a fully custom risk scorer beyond domain profiles
Testing Guide
Test your Attesta configuration end-to-end