🔑 Key Features
- Real-time & Offline: Scans agent responses instantly without needing to send data to an external service, ensuring maximum performance and privacy.
- Banking-Specific Rules: Comes pre-configured with rulesets designed for the financial industry, including PII detection, Fair Lending, and BSA/AML keyword monitoring.
- Extensible: Easily add custom rules to enforce your organization’s specific policies, brand voice, or regional compliance requirements.
- Risk Scoring: Each potential violation contributes to a risk score, helping you prioritize which interactions require manual review.
⚙️ How It Works
The Compliance Engine integrates seamlessly with theAgentMonitor
. When enabled, it intercepts agent responses and evaluates them against all active rules before the data is batched for submission.
1
1. Enable Compliance
Set
enableComplianceChecks: true
in your AgentMonitor configuration. This activates the engine.2
2. Agent Registration
Define agent-specific compliance settings, such as
fair_lending_monitoring: true
, when you register your agent.3
3. Track Agent Response
When you track an agent’s response using
monitor.trackAgentResponse()
or an automated wrapper, the response content is passed to the engine.4
4. Rule Evaluation
The engine evaluates the response against all active rules (both built-in and custom).
5
5. Generate Compliance Result
The engine produces a
ComplianceResult
object, detailing any violations, a calculated risk score, and whether the interaction requires manual review. This result is attached to the event data sent to the governance dashboard.🧪 Basic Usage Example
Enabling the engine is straightforward. The results of the compliance check are automatically included in the event data sent to the Agent Governance platform.🛠 Creating a Custom Rule
You can extend the engine’s capabilities by adding your own rules. For example, here’s how to ensure a specific disclosure is made whenever a mortgage product is discussed:✅ Best Practices
Rule Development
Rule Development
- Keep Rules Focused: Each rule should check for one specific type of violation.
- Use Descriptive IDs: Follow a consistent naming convention (e.g.,
category-specific-check
). - Provide Actionable Recommendations: Help developers or reviewers take quick corrective action.
Performance
Performance
- Optimize Regex: Ensure your expressions are efficient since rules run frequently.
- Avoid Network Calls: Rules must be synchronous and fast to preserve agent response times.
Management
Management
- Version Control Rules: Keep rule definitions in your repo with the app code.
- Regularly Review: Update rules as compliance needs evolve.
- Test Thoroughly: See our Testing Guide for strategies.