# Guardrail Violation Detector AI Agent Connect

> Analyzes AI agent outputs for safety and compliance violations.

## Overview
- **Category:** quality-assurance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_YNYgljFnARbyHucIWxHCvPzZQiRfCobNSYrS0ASd/ai-agent-connect
- **Tags:** guardrails, safety, compliance, pii, toxicity

## Description

This MCP server provides deterministic scoring for agent outputs to ensure safety and structural integrity. It evaluates responses against specific constraints like PII detection, toxicity, off-topic drift, length requirements, and format compliance. Using `analyze_output_violations`, agents can receive a composite violation score and severity level (Info, Warning, or Block) to decide whether to proceed with a response. It also provides access to the `get_guardrail_configuration` to retrieve active rules and `get_historical_false_positive_rate` to monitor system accuracy.

## Tools

### get_guardrail_configuration
Retrieves the current active rules and their definitions

### analyze_output_violations
Performs a full audit of an agent response against a set of rules

### get_historical_false_positive_rate
Retrieves the accuracy metric for a specific guardrail rule

## Prompt Examples

**Prompt:** 
```
Check if this response is safe: 'My phone number is 555-0199 and I am very angry!'
```

**Response:** 
```
The response is flagged as a Block due to PII detection and high toxicity scores.
```

**Prompt:** 
```
Analyze the compliance of a response that is 500 words long when the target was 100.
```

**Response:** 
```
The response has a high length violation score due to the significant deviation from the target length.
```

**Prompt:** 
```
What are the current active guardrail rules?
```

**Response:** 
```
The active rules include PII detection, toxicity monitoring, off-topic detection, length constraints, and format validation.
```

## Frequently Asked Questions

**How is the violation severity determined?**
Severity is based on the composite score: Info for scores below 0.2, Warning for 0.2 to 0.5, and Block for scores above 0.5. Additionally, any single rule exceeding 0.8 triggers a Block.

**Can I see which rules are currently active?**
Yes, you can use the `get_guardrail_configuration` tool to retrieve the current list of active rules and their thresholds.

**What happens if both PII and toxicity are detected?**
The system is designed to handle cascading violations; if both PII and toxicity are detected in the same output, the severity level is automatically escalated.
