Compliance Packs
Compliance packs are managed regulatory rule sets that run in-process on every LLM span — no proxy, no traffic leaving your stack. Turn them on by name and Peekr enforces the rules locally as your agent calls the model.
Enable a pack
Pass an HTTPExporter connected to Peekr Cloud, then list the packs you want under compliance=[...]. That's the whole setup.
import peekr
peekr.instrument(
tenant_id="acme",
exporter=peekr.HTTPExporter(
endpoint="https://peekr.starkspherelabs.com",
api_key="pk_live_…",
),
compliance=["HIPAA", "FDCPA"],
)Note
HTTPExporter and the Pro plan — the rule sets are managed and updated server-side. Need only local, in-process checks? Use guardrails instead, which work on every plan including the free tier.How enforcement works
Compliance runs as part of the in-process guardrail pipeline, so the ordering is the same: PIIRedact → Eval → Storage → HallucinationBlock. For each span:
Input is checked before the model call
Prohibited input patterns are matched before the request reaches the LLM. A match raises a GuardrailError and the model is never called.
Output is checked after the model responds
Prohibited output patterns and required disclosures are matched against the response. The violation is recorded on the span, then a GuardrailError is raised.
Catch the error around your LLM call
GuardrailError carries .guardrail_name and .span so you can log the violation and return a safe fallback.
from peekr.guard import GuardrailError
try:
resp = client.chat.completions.create(model="gpt-4o", messages=msgs)
except GuardrailError as e:
print(f"blocked by {e.guardrail_name}", e.span.span_id)
resp = safe_fallback()Note
Available packs
Reference each pack by the exact name below, grouped by jurisdiction.
United States
Health data — HIPAA Privacy Rule
Debt collection — Fair Debt Collection Practices Act
Securities — FINRA conduct rules
Real estate — Fair Housing Act
Employment — EEOC / Americans with Disabilities Act
Legal — Unauthorized Practice of Law
Messaging — Telephone Consumer Protection Act
Lending — Truth in Lending / Equal Credit Opportunity Act
European Union
Data protection — General Data Protection Regulation
AI systems — EU Artificial Intelligence Act
United Arab Emirates
Data protection — UAE Personal Data Protection Law
DIFC Data Protection Law
ADGM Data Protection Regulations
Central Bank of the UAE conduct rules
Dubai Health Authority health data rules
Real Estate Regulatory Agency rules
Saudi Arabia
Data protection — KSA Personal Data Protection Law
For the marketing overview of what each pack covers, see the Guardrails page. For the local, in-process guards you can run on any plan, see the Guardrails docs.