Overview
Bifrost Enterprise supports Microsoft Presidio as a guardrail provider for PII detection. Bifrost sends selected request or response text to a Presidio Analyzer service, then applies the configured action: detect, block, or redact. Use Presidio when you want a self-hosted or privately deployed PII analyzer with configurable entity filters and score thresholds.How It Works
- You deploy or provide a Presidio Analyzer endpoint.
- You create a guardrail provider with
provider_name: "presidio". - You optionally choose Presidio entity types and a score threshold.
- You attach the provider to one or more guardrail rules.
- Bifrost sends text blocks to Presidio’s
/analyzeendpoint. - Bifrost applies the configured
action.
Capabilities
- PII detection through Presidio Analyzer
- Optional entity filtering with
entities - Optional score threshold with
score_threshold detect_only,block, andredactactions- Bifrost-managed redaction strategies and modes
- Supported-entities lookup through the configured Analyzer service
Configuration Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
analyzer_url | string | Yes | - | Base URL for the Presidio Analyzer service. Bifrost appends /analyze. |
api_key | string | No | - | Optional API key. Supports env.PRESIDIO_API_KEY. |
language | string | No | en | Language sent to Presidio Analyzer. |
score_threshold | number | No | 0.5 | Minimum Presidio score to keep, from 0 to 1. |
entities | array | No | all supported entities | Presidio entity types to detect. |
action | enum | No | detect_only | detect_only, block, or redact. |
redaction_strategy | enum | No | replace | replace, mask, or hash. Used when action is redact. |
redaction_mode | enum | No | runtime | runtime, logs_only, or runtime_reversible. Used when action is redact. |
timeout | integer | No | provider default | Provider execution timeout in seconds. |
Configuration
- Web UI
- API
- config.json
- Helm
- Go to Guardrails > Providers.
- Select Microsoft Presidio.
- Click Add Configuration.
- Enter your Analyzer URL.
- Optionally set an API key, language, score threshold, and entity filters.
- Choose an action. Select Redact to enable Bifrost-managed redaction.
- If redacting, choose the redaction strategy and mode.
- Save the configuration and attach it to a guardrail rule.
Entity Filters
Leaveentities empty to let Presidio return all entities supported by your Analyzer configuration. Set entities when you want a narrower policy, for example only EMAIL_ADDRESS and PHONE_NUMBER.
Bifrost can fetch supported entities from:
Operational Notes
- Presidio offsets are converted into Go byte ranges before redaction.
score_threshold: 0is valid and is sent explicitly to Presidio.- The default action is
detect_only, so setaction: "redact"oraction: "block"when you want enforcement. - Redaction modes affect Bifrost runtime payloads, Bifrost logs, and trace-export connectors as described in Guardrail Redaction.

