部署与云(DevOps)81k · #1487
agent-performance-monitor
它能做什么
这项技能让智能体跟踪实时指标、发现异常行为,并在未达到目标时发出标记。适合运行服务或智能体团队、并希望提前获得预警的人。
适用场景
- ✓当你希望在服务变慢或故障之前收到警报的时候。
- ✓当你需要实时查看智能体和任务表现的时候。
- ✓当你想检查某个服务是否达到目标速度的时候。
技能链接
https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-performance-monitor/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-performance-monitor/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add ruvnet/ruflo --skill agent-performance-monitor
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/ruvnet/ruflo/main/.agents/skills/agent-performance-monitor/SKILL.md -o SKILL.md
可以这样问 AI
“请监控我们的智能体,如果响应时间超过两秒,就提醒我。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会收集系统、任务和网络的数据,与你设定的警报阈值进行比较,并报告任何异常情况。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
name: Performance Monitor type: agent category: optimization description: Real-time metrics collection, bottleneck analysis, SLA monitoring and anomaly detection
Performance Monitor Agent
Agent Profile
- Name: Performance Monitor
- Type: Performance Optimization Agent
- Specialization: Real-time metrics collection and bottleneck analysis
- Performance Focus: SLA monitoring, resource tracking, and anomaly detection
Core Capabilities
1. Real-Time Metrics Collection
// Advanced metrics collection system
class MetricsCollector {
constructor() {
this.collectors = new Map();
this.aggregators = new Map();
this.streams = new Map();
this.alertThresholds = new Map();
}
// Multi-dimensional metrics collection
async collectMetrics() {
const metrics = {
// System metrics
system: await this.collectSystemMetrics(),
// Agent-specific metrics
agents: await this.collectAgentMetrics(),
// Swarm coordination metrics
coordination: await this.collectCoordinationMetrics(),
// Task execution metrics
tasks: await this.collectTaskMetrics(),
// Resource utilization metrics
resources: await this.collectResourceMetrics(),
// Network and communication metrics
network: await this.collectNetworkMetrics()
};
// Real-time processing and analysis
await this.processMetrics(metrics);
return metrics;
}
// System-level metrics
async collectSystemMetrics() {
return {
cpu: {
usage: await this.getCPUUsage(),
loadAverage: await this.getLoadAverage(),
coreUtilization: await this.getCoreUtilization()
},
memory: {
usage: await this.getMemoryUsage(),
available: await this.getAvailableMemory(),
pressure: await this.getMemoryPressure()
},
io: {
diskUsage: await this.getDiskUsage(),
diskIO: await this.getDiskIOStats(),
networkIO: await this.getNetworkIOStats()
},
processes: {
count: await this.getProcessCount(),
threads: await this.getThreadCount(),
handles: await this.getHandleCount()
}
};
}
// Agent performance metrics
async collectAgentMetrics() {
const agents = await mcp.agent_list({});
const agentMetrics = new Map();
for (const agent of agents) {
const metrics = await mcp.agent_metrics({ agentId: agent.id });
agentMetrics.set(agent.id, {
...metrics,
efficiency: this.calculateEfficiency(metrics),
responsiveness: this.calculateResponsiveness(metrics),
reliability: this.calculateReliability(metrics)
});
}
return agentMetrics;
}
}
2. Bottleneck Detection & Analysis
// Intelligent bottleneck detection
class BottleneckAnalyzer {
constructor() {
this.detectors = [
new CPUBottleneckDetector(),
new MemoryBottleneckDetector(),
new IOBottleneckDetector(),
new NetworkBottleneckDetector(),
new CoordinationBottleneckDetector(),
new TaskQueueBottleneckDetector()
];
this.patterns = new Map();
this.history = new CircularBuffer(1000);
}
// Multi-layer bottleneck analysis
async analyzeBottlenecks(metrics) {
const bottlenecks = [];
// Parallel detection across all layers
const detectionPromises = this.detectors.map(detector =>
detector.detect(metrics)
);
const results = await Promise.all(detectionPromises);
// Correlate and prioritize bottlenecks
for (const result of results) {
if (result.detected) {
bottlenecks.push({
type: result.type,
severity: result.severity,
component: result.component,
rootCause: result.rootCause,
impact: result.impact,
recommendations: result.recommendations,
timestamp: Date.now()
});
}
}
// Pattern recognition for recurring bottlenecks
await this.updatePatterns(bottlenecks);
return this.prioritizeBottlenecks(bottlenecks);
}
// Advanced pattern recognition
async updatePatterns(bottlenecks) {
for (const bottleneck of bottlenecks) {
const signature = this.createBottleneckSignature(bottleneck);
if (this.patterns.has(signature)) {
const pattern = this.patterns.get(signature);
pattern.frequency++;
常见问题
它监控什么?
这项技能涵盖系统、智能体、任务、资源和网络指标。
什么是 SLA?
它是一项服务目标,例如服务方承诺达到的响应时间。
它会自动修复问题吗?
这项技能侧重于收集指标和发现异常行为,所以修复由你决定。
详情
作者的原始描述
Agent skill for performance-monitor - invoke with $agent-performance-monitor
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1487
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
AI 与智能体智能体
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
AI 与智能体智能体
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
AI 与智能体智能体
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。
编程通用编程