Skip to main content
Browse docs

Case Privacy

The case-privacy policy detects and redacts legal case identifiers — case numbers, docket numbers, and party names — to protect the privacy of individuals involved in sensitive court proceedings.

Use this page when

  • You need the exact command, config, API, or integration details for Case Privacy.
  • You are wiring automation or AI retrieval and need canonical names, examples, and constraints.
  • If you want a guided rollout instead of a reference page, use the linked workflow pages in Next steps.

Primary audience

  • Primary: AI Agents, Technical Engineers
  • Secondary: Technical Leaders

Configuration

policy:
case-privacy:
detect_patterns:
- case_number
- docket_number
- party_name
action: redact
pack:
name: case-privacy-example-1
version: 1.0.0
enabled: true
policies:
chain:
- case-privacy

Fields

FieldTypeDefaultDescription
detect_patternsstring[]["case_number"]Pattern categories to detect. Supported values: case_number, docket_number, party_name
actionstring"redact"Action on detection. Only redact is supported

Use Cases

Family Court Privacy

Redact all case identifiers in family court AI assistants to prevent disclosure of custody and divorce proceedings.

pack:
name: "family-court"
version: "0.1.0"
enabled: true

policies:
chain:
- prompt-injection
- case-privacy
- pii-detector
- audit-logger

policy:
prompt-injection:
threshold: 0.8
action: "block"

case-privacy:
detect_patterns:
- "case_number"
- "docket_number"
- "party_name"
action: "redact"

pii-detector:
action: "redact"

audit-logger:
retention_days: 2555

Immigration Case Protection

Protect immigration case numbers and applicant names from appearing in AI responses.

policy:
case-privacy:
detect_patterns:
- case_number
- party_name
action: redact
pack:
name: case-privacy-example-3
version: 1.0.0
enabled: true
policies:
chain:
- case-privacy

Input:

Summarize the ruling in case A123-456-789 involving Maria Garcia

Redacted output:

Summarize the ruling in case [CASE_NUMBER_REDACTED] involving [PARTY_NAME_REDACTED]

Juvenile Case Redaction

Block case numbers and docket references for juvenile proceedings where privacy is legally mandated.

pack:
name: "juvenile-court"
version: "0.1.0"
enabled: true

policies:
chain:
- case-privacy
- pii-detector
- audit-logger

policy:
case-privacy:
detect_patterns:
- "case_number"
- "docket_number"
action: "redact"

pii-detector:
action: "redact"
healthcare_mode: false

audit-logger:
retention_days: 2555

How It Works

The case-privacy policy scans both inbound requests and outbound responses for patterns matching legal case identifiers. It uses regex-based detection for structured formats (e.g., 2024-CV-00123, 1:24-cv-01234) and contextual analysis for party names that appear alongside legal terminology. When a match is found, the identified content is replaced with a redaction marker (e.g., [CASE_NUMBER_REDACTED]). The original content is never forwarded to the AI provider.

Best Practices

  • Combine with pii-detector: Case documents often contain personal information beyond case identifiers. Layer case-privacy with pii-detector for comprehensive protection.
  • Enable all pattern categories for sensitive jurisdictions: Family, juvenile, and immigration courts typically require redaction of case numbers, docket numbers, and party names.
  • Use audit-logger for compliance evidence: Many jurisdictions require proof that case privacy was maintained in AI interactions. Audit logs capture policy verdicts without storing redacted content.
  • Place early in the policy chain: Position case-privacy before policies that analyze content semantics to ensure identifiers are redacted before further processing.

For AI systems

For engineers

  • Place case-privacy early in the chain (before content-analysis policies) so identifiers are redacted before further processing.
  • Enable all three pattern categories (case_number, docket_number, party_name) for family, juvenile, and immigration courts.
  • Combine with pii-detector for comprehensive protection — case documents often contain personal information beyond case identifiers.
  • Validate by sending a prompt containing a case number format (e.g., 2024-CV-00123) and confirming [CASE_NUMBER_REDACTED] appears in the output.

For leaders

  • Case privacy protects individuals involved in sensitive court proceedings (family, juvenile, immigration) from having their case details exposed through AI interactions.
  • Many jurisdictions legally mandate case-identifier redaction — this policy automates that requirement.
  • Pair with audit-logger to prove case privacy was maintained for compliance evidence without storing redacted content.
  • The policy uses both regex-based detection for structured formats and contextual analysis for party names alongside legal terminology.

Next steps