Compliance is strictly opt-in. With no policy set, routing is byte-for-byte
unchanged and every model is eligible. A policy only ever removes models from
consideration — it never changes how the survivors are ranked.
The four pieces
Regulatory Compliance Matrix
A baseline map of each provider → jurisdiction, data regions, supported frameworks,
certifications, and retention posture.
Policy-as-Code
Your declarative rules: approved providers, jurisdictions, required frameworks &
certifications, data residency, blocked data classes, zero-retention.
Content classification
A fast, local scan that flags PII / PHI / FINANCIAL / SECRETS in the prompt — by
pattern only, never by calling a model.
Hard exclusion filter
Non-compliant models are removed from the candidate pool before scoring, so the
engine cannot pick one — and each decision is attested.
The policy
A policy is a small set of constraints. Every field is optional; set only what you need.| Field | Meaning |
|---|---|
provider_allowlist | If set, only these providers are eligible. |
provider_denylist | These providers are always excluded. |
jurisdiction | The provider’s governing jurisdiction must be one of these (e.g. US, EU). |
data_residency | The provider’s data regions must be a subset of these — no leakage outside the region. |
frameworks | The provider must support all of these (e.g. GDPR, CCPA, LGPD). |
certifications | The provider must hold all of these (e.g. SOC2, ISO27001, HIPAA). |
block_data_classes | Data classes that may not reach a non-cleared provider: PII, PHI, FINANCIAL, SECRETS. |
require_zero_retention | The provider must offer a zero-retention / no-train mode. |
Content classification (the prompt never leaves to be classified)
Before routing, PRYSM scans the request text locally for sensitive data classes using regex / keyword / checksum heuristics only. The text is never sent to a model to be classified, and the scan does nothing but match patterns:- PII — emails, phone numbers, national IDs.
- PHI — medical-record and health identifiers (clears only via a
HIPAAcertification). - FINANCIAL — card numbers (Luhn-checked), IBANs, account numbers.
- SECRETS — API keys, access tokens, private keys.
block_data_classes and no approved provider is
cleared for it, the candidate pool collapses to empty and the request is refused
(fail-closed) rather than routed somewhere it shouldn’t go.
Hard exclusion before scoring
This is the core guarantee. PRYSM applies the policy as a filter on the candidate pool, then routes among only what survives. A non-compliant model is never scored, never a fallback, and never reachable — not by a routing rule, not by a hardmodel lock.
/v1/chat/completions,
/v2/orchestrate, and /v2/code.
Preview before you spend
/v2/compliance/preview is a pure dry-run — no
model is called, so it costs nothing and needs no provider keys. It shows exactly what a
policy would do for a given prompt:
- the data classes the text triggers, and what matched;
- which models are allowed vs excluded, with a reason per exclusion;
- the Compliance Cost Premium — what staying compliant costs versus the cheapest unrestricted model;
- a sample attestation hash for your audit trail.
Set it where it belongs
In BRAIN.md (version-controlled)
Add a
compliance: block so the policy is reviewed in pull requests and applied to
every request automatically.Inline per request
Pass
compliance= to orchestrate() / complete() (or the compliance field in the
REST body) to confine a single call.BRAIN.md
Auditable by design
Every confined run carries a compliance attestation — a SHA-256 receipt binding the policy, the detected data classes, the exclusion decisions, and the chosen model. Paired with PrysmProof, it proves not just that a response was produced, but that it was produced within policy — and what it cost relative to the unrestricted reference.Preview endpoint
Dry-run a policy against any prompt — allowed/excluded models, classes, CCP, attestation.
BRAIN.md
Declare the
compliance: block alongside your routing rules and cost guardrails.AgentGuard
Compliance pairs with cost caps and model blocks — both run after selection and win.
PrysmProof
The verifiable receipt the compliance attestation attaches to.