ComplianceGuard

AI-powered compliance drift detection agent with guided remediation and full OpenTelemetry observability. Watch a simulated scan against PCI-DSS v4.0 policies.

Interactive demo with mock data

1. Scan & Detect 2. Remediation 3. Observability

Phase 1-4 Scan & Detect

complianceguard — scan

$ python3 -m agent.main --policy pci-dss-v4.yaml

Press "Run Scan" to start...

Phase 5 Guided Remediation

The MCP server exposes remediation tools that Claude can call conversationally. Every action follows a dry-run → approve → apply → verify workflow.

complianceguard — mcp remediation

MCP Server ready. Press "Remediate Finding" to simulate a guided fix...

Remediation Workflow

1. preview_remediation()
2. User reviews diff
3. apply_remediation()
4. Re-scan to verify

OpenTelemetry AI Agent Observability

Every agent run emits distributed traces, metrics, and logs via OpenTelemetry. The trace waterfall shows exactly where time and tokens are spent across the pipeline.

Telemetry Architecture

ComplianceGuard Agent (OpenTelemetry SDK)

│ OTLP/gRPC

OTel Collector

├── traces → Grafana Tempo

├── metrics → Prometheus

└── viz → Grafana (dashboards + trace waterfall)

Trace Waterfall
trace_id: 7a3f8c1e9d4b2a06
Span
0ms 3s 6s 9s 12.4s
compliance.run
├─ compliance.scan
1.0s
├─ compliance.evaluate
0.8s
├─ compliance.classify
8.9s
├─ llm.classify_finding
1.5s
├─ llm.classify_finding
1.3s
├─ llm.classify_finding
1.4s
├─ llm.classify_finding
1.2s
├─ llm.classify_finding
1.6s
└─ llm.classify_finding
1.9s
└─ compliance.report
1.7s
Span Detail: llm.classify_finding (finding 1 of 6)
llm.model
claude-sonnet-4-20250514
llm.input_tokens
1,247
llm.output_tokens
834
llm.latency_ms
1,523
llm.cost_usd
$0.0062
finding.rule_id
no-root-user
finding.container
web-app
span.kind
CLIENT
status
OK

LLM Observability Metrics

7,482
Input Tokens
5,004
Output Tokens
$0.037
Total Cost
1.48s
Avg Latency (p50)

Metrics exported to Prometheus, tagged by model. Classification stage dominates runtime — sequential Claude API calls are the optimization target.