Skip to main content
Attesta’s domain profile framework lets you build custom profiles for any industry — healthcare, finance, education, government, defense, energy, telecommunications, and more. Each profile encodes your specific compliance requirements and risk patterns.

Building a Custom Profile

A custom domain profile is an instance of the DomainProfile 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, use replace():
Using replace() completely overwrites the existing profile. Make sure to preserve all existing patterns, actions, and rules unless you intentionally want to remove them.

Merging Multiple Profiles

You can combine multiple profiles using the merge functionality:
attesta.yaml
The merge follows the conservative merge strategy — lists are unioned, scalars take the higher (stricter) value.

Design Guidelines

Risk 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 setting risk_contribution values:

Critical Actions

Only designate actions as critical when they meet at least one of these criteria:
  1. Irreversible — the action cannot be undone (e.g., delete_student_record)
  2. Regulatory mandate — compliance requires multi-party approval (e.g., bulk_student_export)
  3. 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:
Write integration tests that verify your custom profile produces the expected risk levels for representative actions. This catches regressions when you update patterns or risk contributions.

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