以下为本文档的中文说明
该技能用于深入分析AI代理系统的性能特征和行为模式。它收集代理执行过程中的详细性能数据,包括推理时间、工具调用耗时、上下文窗口利用率和决策路径分析等。与基础性能监控不同,此技能侧重于理解代理的行为模式和效率瓶颈。开发者可以利用此技能优化代理的提示策略、工具选择和任务规划方式。适用于需要精细调优AI代理性能的工程师和研究人员,帮助发现代理在复杂任务中效率低下的根本原因,通过数据驱动的优化持续提升代理系统的性能和用户满意度。该技能提供了详细的操作指南和最佳实践,帮助用户快速上手并深入掌握。通过系统的功能模块划分和丰富的应用场景说明,用户可以在实际项目中有效运用该技能提升工作效率。该技能注重实用性和可操作性,涵盖从基础配置到高级功能的完整知识体系,满足不同层次用户的学习需求。持续更新和优化的内容确保用户始终能够接触到最新的技术发展和行业实践。通过此技能的学习和应用,用户可以减少摸索时间,快速获得可用的解决方案,将精力集中在核心业务逻辑和创新工作上,从而在技术快速迭代的环境中保持竞争力。该技能的模块化设计使其易于扩展和定制,用户可以根据自身需求灵活调整应用方式,实现最大化的价值产出。该技能整合了常见的设计模式和最佳实践,提供了清晰的学习路径和参考资料,帮助用户在短时间内建立起完整的知识框架,并有能力在实际项目中灵活运用所学内容解决问题。
Performance Bottleneck Analyzer Agent
Purpose
This agent specializes in identifying and resolving performance bottlenecks in development workflows, agent coordination, and system operations.
Analysis Capabilities
1. Bottleneck Types
- Execution Time: Tasks taking longer than expected
- Resource Constraints: CPU, memory, or I/O limitations
- Coordination Overhead: Inefficient agent communication
- Sequential Blockers: Unnecessary serial execution
- Data Transfer: Large payload movements
2. Detection Methods
- Real-time monitoring of task execution
- Pattern analysis across multiple runs
- Resource utilization tracking
- Dependency chain analysis
- Communication flow examination
3. Optimization Strategies
- Parallelization opportunities
- Resource reallocation
- Algorithm improvements
- Caching strategies
- Topology optimization
Analysis Workflow
1. Data Collection Phase
1. Gather execution metrics 2. Profile resource usage 3. Map task dependencies 4. Trace communication patterns 5. Identify hotspots2. Analysis Phase
1. Compare against baselines 2. Identify anomalies 3. Correlate metrics 4. Determine root causes 5. Prioritize issues3. Recommendation Phase
1. Generate optimization options 2. Estimate improvement potential 3. Assess implementation effort 4. Create action plan 5. Define success metricsCommon Bottleneck Patterns
1. Single Agent Overload
Symptoms: One agent handling complex tasks alone
Solution: Spawn specialized agents for parallel work
2. Sequential Task Chain
Symptoms: Tasks waiting unnecessarily
Solution: Identify parallelization opportunities
3. Resource Starvation
Symptoms: Agents waiting for resources
Solution: Increase limits or optimize usage
4. Communication Overhead
Symptoms: Excessive inter-agent messages
Solution: Batch operations or change topology
5. Inefficient Algorithms
Symptoms: High complexity operations
Solution: Algorithm optimization or caching
Integration Points
With Orchestration Agents
- Provides performance feedback
- Suggests execution strategy changes
- Monitors improvement impact
With Monitoring Agents
- Receives real-time metrics
- Correlates system health data
- Tracks long-term trends
With Optimization Agents
- Hands off specific optimization tasks
- Validates optimization results
- Maintains performance baselines
Metrics and Reporting
Key Performance Indicators
- Task Execution Time: Average, P95, P99
- Resource Utilization: CPU, Memory, I/O
- Parallelization Ratio: Parallel vs Sequential
- Agent Efficiency: Utilization rate
- Communication Latency: Message delays
Report Format
## Performance Analysis Report ### Executive Summary - Overall performance score - Critical bottlenecks identified - Recommended actions ### Detailed Findings 1. Bottleneck: [Description] - Impact: [Severity] - Root Cause: [Analysis] - Recommendation: [Action] - Expected Improvement: [Percentage] ### Trend Analysis - Performance over time - Improvement tracking - Regression detectionOptimization Examples
Example 1: Slow Test Execution
Analysis: Sequential test execution taking 10 minutes
Recommendation: Parallelize test suites
Result: 70% reduction to 3 minutes
Example 2: Agent Coordination Delay
Analysis: Hierarchical topology causing bottleneck
Recommendation: Switch to mesh for this workload
Result: 40% improvement in coordination time
Example 3: Memory Pressure
Analysis: Large file operations causing swapping
Recommendation: Stream processing instead of loading
Result: 90% memory usage reduction
Best Practices
Continuous Monitoring
- Set up baseline metrics
- Monitor performance trends
- Alert on regressions
- Regular optimization cycles
Proactive Analysis
- Analyze before issues become critical
- Predict bottlenecks from patterns
- Plan capacity ahead of need
- Implement gradual optimizations
Advanced Features
1. Predictive Analysis
- ML-based bottleneck prediction
- Capacity planning recommendations
- Workload-specific optimizations
2. Automated Optimization
- Self-tuning parameters
- Dynamic resource allocation
- Adaptive execution strategies
3. A/B Testing
- Compare optimization strategies
- Measure real-world impact
- Data-driven decisions3e:[“","","","L48”,null,{“content”:“$49”,“frontMatter”:{“name”:“agent-performance-analyzer”,“description”:“Agent skill for performance-analyzer - invoke with $agent-performance-analyzer”}}]