Configuration Hierarchy
Dome organizes protection in three levels: Each level has its own configuration options.Choose a Configuration Format
Dome accepts a Python dictionary, a path to a TOML file, or a prebuiltDomeConfig object. Install Dome first if you have not already, following Install Dome.
Every name in the input and output Guard lists must match a Guard table in the same configuration. You can also inline a Guard definition as a dictionary inside the list instead of naming it.
Guardrail Options
A Guardrail is the input or output pipeline that holds your Guards. Its keys are prefixed withinput- or output-:
You can also record identity metadata in the configuration. Dome attaches these values to scans and telemetry:
Execution Modes
- Early exit DEFAULT: stops processing when the first Guard flags content. Faster for rejecting clearly malicious input.
- Complete execution: set
early-exittofalseto run every Guard regardless of flags. Useful for comprehensive logging. - Parallel execution: set
run-paralleltotrueto run Guards concurrently and reduce scan latency. Combined with early exit, Dome cancels pending checks once one flags.
Guard Options
A Guard-level
on-error overrides the value inherited from its Guardrail.
Guard Types
A Guard can only use Detectors registered under its own category:Detector Options
See Detection Methods for every built-in Detector, its parameters, and its routing behavior.
Enforcement and Failure Behavior
Dome(enforce=True) is the default. Set enforce=False for shadow mode, where Dome reports flagged content without marking it for enforcement:
on-error:
An explicit
on-error value in the configuration always wins over the mode default. Failed Detectors remain listed in ScanResult.errored_methods.
Load a Configuration From Another Source
To inspect or modify the defaults before use, build the configuration explicitly:
Work in Progress
The programmatic protection capabilities and Dome integrations are currently in private preview and subject to change.
Next Steps
Use Guardrails
Runtime integration patterns
Detection Methods
Every built-in Detector and its parameters
Custom Detectors
Build your own Detectors
Observability
Monitoring and tracing