360 Secure SkillHub
360 安全技能中心

Agent Safety Monitor

该 Skill 通过 python3 脚本读取代理日志流,依据 YAML 规则引擎执行速率上限、动作白名单、内容过滤、预算上限、范围限制与行为异常检测,违规时触发告警、自动暂停或终止。告警支持控制台、Webhook、文件日志与 HTTP 仪表板输出;清单中引用的仪表板脚本缺失。

evezart
evezart
热度 24.91
最近更新 2026-05-12 19:13:38
分类:安全依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / 数据处理 / DevOps / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add agent-safety-monitor
Metadata
name
agent-safety-monitor
description
Real-time AI agent safety monitoring, anomaly detection, and constraint enforcement. Use when building agent guardrails, detecting unsafe behaviors, enforcing action limits, or creating safety dashboards for autonomous AI systems. Covers behavior logging, rule engines, alert systems, and compliance tracking.

Agent Safety Monitor

Monitor AI agent behavior in real-time, detect anomalies, and enforce safety constraints.

Quick Start

Run the monitor against an agent log stream:

python3 scripts/monitor.py --config safety_rules.yaml --input agent_logs/

Architecture

Agent Actions → Event Stream → Rule Engine → Alerts → Dashboard
                                   ↓
                              Anomaly Detector
                                   ↓
                              Auto-Pause/Kill

Safety Rule Types

  1. Rate limits: Max N actions per minute/hour
  2. Action allowlists: Only permit specific tool calls
  3. Content filters: Block PII exfiltration, harmful outputs
  4. Budget caps: Stop when cost exceeds threshold
  5. Scope limits: Restrict file/API/network access
  6. Behavioral anomalies: Flag unusual patterns (tool call frequency spikes, repetitive loops)

Rule Configuration

See references/rules-reference.md for the YAML schema.

Alert Channels

  • Console (default)
  • Webhook (Slack, Discord)
  • File log
  • Dashboard (HTTP server)

Dashboard

Launch the monitoring dashboard:

python3 scripts/dashboard.py --port 8080