Smart Risk Guardian(智能风控卫士)是一个基于多Agent架构的自动化风控与合规管理系统。系统采用先进的AI Agent技术,实现风险的智能识别、评估、处置和审计的全流程自动化。
| Agent | 名称 | 核心能力 |
|---|---|---|
| 🛡️ Sentinel | 哨兵Agent | 态势感知、威胁情报、策略调度 |
| 🔍 Scanner | 扫描Agent | 规则引擎、模式匹配、合规检查 |
| 📊 Evaluator | 评估Agent | 风险评分、影响分析、关联挖掘 |
| ⚡ Mitigator | 处置Agent | 自动响应、处置执行、效果验证 |
| 📋 Auditor | 审计Agent | 审计日志、合规报告、追溯链 |
实时监控 (Realtime)
定期巡检 (Periodic)
深度审计 (Deep Audit)
# 克隆或下载项目
cd smart-risk-guardian
# 一键启动
chmod +x start.sh
./start.sh
| 方法 | 路径 | 描述 |
|---|---|---|
| GET | /api/risks | 获取风险列表 |
| GET | /api/risks/{id} | 获取单个风险 |
| POST | /api/risks | 创建风险事件 |
| 方法 | 路径 | 描述 |
|---|---|---|
| POST | /api/agents/sentinel/assess | 态势评估 |
| POST | /api/agents/scanner/scan | 事件扫描 |
| POST | /api/agents/evaluator/assess/{id} | 风险评估 |
| POST | /api/agents/mitigator/mitigate/{id} | 风险处置 |
| POST | /api/agents/auditor/trace/{id} | 追溯链构建 |
| 方法 | 路径 | 描述 |
|---|---|---|
| GET | /api/metrics | 系统指标 |
| GET | /api/dashboard | 仪表盘数据 |
| GET | /api/audit-logs | 审计日志 |
| POST | /api/notifications/slack | Slack通知 |
smart-risk-guardian/
├── backend/
│ ├── main.py # FastAPI入口
│ ├── models.py # 数据模型
│ ├── database.py # SQLite数据库
│ ├── task_queue.py # 异步任务队列
│ ├── agents/
│ │ ├── __init__.py
│ │ ├── sentinel.py # 哨兵Agent
│ │ ├── scanner.py # 扫描Agent
│ │ ├── evaluator.py # 评估Agent
│ │ ├── mitigator.py # 处置Agent
│ │ └── auditor.py # 审计Agent
│ └── requirements.txt
├── frontend/
│ └── index.html # Svelte + TailwindCSS
├── start.sh # 启动脚本
└── README.md
RiskEvent {
id: str # 唯一标识
title: str # 标题
category: str # 类别(security/compliance/fraud/...)
level: str # 等级(critical/high/medium/low)
source: str # 来源
status: str # 状态
created_at: datetime # 创建时间
}
RiskRule {
id: str # 唯一标识
name: str # 规则名称
pattern: dict # 匹配模式
conditions: list # 触发条件
actions: list # 执行动作
severity: str # 严重程度
enabled: bool # 是否启用
}
curl -X POST http://localhost:8000/api/agents/sentinel/assess
curl -X POST http://localhost:8000/api/agents/evaluator/assess/{risk_id}
curl -X POST http://localhost:8000/api/agents/mitigator/mitigate/{risk_id}
curl -X POST http://localhost:8000/api/agents/auditor/compliance-report \
-H "Content-Type: application/json" \
-d '{"framework":"GDPR","period_start":"2024-01-01","period_end":"2024-12-31"}'
系统支持Slack Webhook通知,需要配置真实的Webhook URL:
/api/notifications/slack 接口发送通知{
"webhook_url": "https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
"channel": "#risk-alerts",
"text": "风险告警: 检测到可疑活动",
"severity": "high"
}
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ 风险 │───▶│ 态势 │───▶│ 规则 │───▶│ 风险 │───▶│ 风险 │
│ 事件 │ │ 感知 │ │ 扫描 │ │ 评估 │ │ 处置 │
└─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘
│
▼
┌─────────┐
│ 审计 │
│ 追溯 │
└─────────┘
MIT License - 详见LICENSE文件