iron_cage_safety
PII detection and output validation for multi-agent systems.
Installation
[]
= { = "0.1", = ["full"] }
Features
enabled(default): Core PII detection without audit loggingfull: All functionality including audit trailaudit: SQLite-based audit logging
Quick Start
use PiiDetector;
// Initialize PII detector with default patterns
let detector = new?;
// Check for PII in agent output
let text = "Contact me at john@example.com";
if detector.check
Documentation
Responsibilities:
Detects and redacts PII (emails, phones, SSNs, credit cards) from AI agent outputs with configurable safety policies and optional SQLite-based audit logging. Provides real-time validation preventing data breaches before agent responses reach users. Requires Rust 1.75+, all platforms supported, optional SQLite audit trail with audit feature.
In Scope:
- PII pattern detection (emails, phones, SSNs, credit cards)
- Output redaction and sanitization
- Safety audit trail (with
auditfeature) - Configurable safety policies
- Real-time validation of agent outputs
Out of Scope:
- Cost tracking (see iron_cage_cost)
- Circuit breaker logic (see iron_cage_reliability)
- Agent lifecycle management (see iron_cage_cli)
- Configuration management (see iron_cage_types)
Source Files
| File | Responsibility |
|---|---|
| lib.rs | PII detection and output sanitization |
Notes:
- Entries marked 'TBD' require manual documentation
- Entries marked '⚠️ ANTI-PATTERN' should be renamed to specific responsibilities
License
MIT