feat: ZeroClaw compliance agent — document analysis + role assignment + email

Add autonomous compliance agent that fetches web documents (cookie banners,
privacy policies), classifies them via Qwen/Ollama, assesses DSGVO compliance,
assigns to the responsible role, and sends notification emails.

Components:
- ZeroClaw SOP (6-step workflow: fetch, classify, assess, summarize, assign, notify)
- Backend: /api/compliance/agent/analyze (combined endpoint)
- Backend: /api/compliance/agent/notify (standalone email)
- Frontend: /sdk/agent page (Manager UI with URL input + results)
- Helper scripts + E2E test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-27 23:27:25 +02:00
parent f528b8e7a9
commit 0c0dd4e3a6
16 changed files with 1095 additions and 0 deletions

56
zeroclaw/README.md Normal file
View File

@@ -0,0 +1,56 @@
# ZeroClaw Compliance Agent Demo
Autonomer Compliance-Agent der Web-Dokumente (Cookie-Banner, Datenschutzerklaerungen) analysiert und die Ergebnisse an die zustaendige Rolle weiterleitet.
## Architektur
```
ZeroClaw Agent (Rust, Mac Mini)
├── LLM: Qwen 3.5:35b-a3b (Ollama, localhost:11434)
├── Compliance SDK (Go/Gin, localhost:8093)
│ ├── /sdk/v1/llm/chat → Dokumentklassifizierung
│ ├── /sdk/v1/ucca/assess → Risikobewertung
│ └── /sdk/v1/ucca/escalations → Eskalation + Rollenzuweisung
├── Backend (Python/FastAPI, localhost:8002)
│ └── /api/compliance/agent/notify → Email-Benachrichtigung
└── Mailpit (SMTP localhost:1025, Web localhost:8025)
└── Fiktive Email-Zustellung
```
## Voraussetzungen
- ZeroClaw v0.7.3+ (`brew install zeroclaw`)
- Ollama mit `qwen3.5:35b-a3b` Modell
- Alle Compliance-Services laufen (SDK, Backend, Mailpit)
## Demo ausfuehren
```bash
# 1. ZeroClaw mit Ollama verbinden (einmalig)
zeroclaw onboard --quick --provider ollama --model qwen3.5:35b-a3b
# 2. SOP ausfuehren
zeroclaw agent -m "Analysiere die Datenschutzerklaerung von https://www.google.com/intl/de/policies/privacy/"
# 3. Ergebnis pruefen
open http://localhost:8025 # Mailpit Web-UI
```
## E2E Test
```bash
bash zeroclaw/tests/test_sop_workflow.sh
```
## SOP-Workflow (6 Schritte)
1. **Fetch** — URL holen, HTML strippen
2. **Classify** — Dokumenttyp bestimmen (privacy_policy, cookie_banner, etc.)
3. **Assess** — DSGVO-Risikobewertung via UCCA
4. **Summarize** — Manager-Report auf Deutsch
5. **Assign** — Zustaendige Rolle bestimmen (E0-E3 Mapping)
6. **Notify** — Email an DSB/Teamleitung senden