按命令族和 profile 选择合适的 OpenClaw CLI 命令,并校验执行结果。
记忆
Lingxi · Agent Health Monitor
试用Monitor OpenClaw Agent health, uptime, task status, and system metrics. Automatic alerts on failures, performance degradation, or unusual behavior. Includes...
它能做什么
Monitor OpenClaw Agent health, uptime, task status, and system metrics. Automatic alerts on failures, performance degradation, or unusual behavior. Includes memory management, session cleanup, and proactive self-healing.
技能文档
lingxi-agent-monitor
Proactive health monitoring and self-healing for AI Agent systems built on OpenClaw.
What It Monitors
| Metric | Check | Alert Threshold |
|---|---|---|
| Agent Uptime | Is agent alive? | Any downtime |
| Session Count | Active sessions | > 20 or < 1 |
| Memory Usage | Agent memory consumption | > 80% |
| Task Queue | Pending/failed tasks | > 5 failed |
| MCP Connections | External tool connectivity | Any failure |
| API Latency | Tool response time | > 5 seconds |
| Error Rate | Tool call failure % | > 10% |
Usage
Trigger Commands
"System health check" → Full health scan + report
"Agent status" → Quick status summary
"Memory check" → Focus on memory metrics
"Task queue check" → Focus on pending/failed tasks
"Alert me if..." → Configure custom alert rules
Health Report Format
# Agent Health Report — YYYY-MM-DD HH:MM
## System Status
| Component | Status | Latency | Notes |
|-----------|--------|---------|-------|
| OpenClaw Gateway | ✅ Healthy | 45ms | |
| MCP Server | ✅ Connected | 120ms | |
| GitHub Integration | ✅ OK | 200ms | |
| ZeroGPU | ✅ OK | 80ms | |
## Session Overview
- Active sessions: 3
- Avg session duration: 23m
- Memory: 1.2GB / 4GB (30%)
## Recent Activity
- Tasks completed: 47
- Tasks failed: 2 (4.3%)
- Avg task duration: 1m 12s
## Alerts (if any)
- [ ] No critical alerts
- ⚠️ Warning: ZeroGPU latency > 500ms (3 occurrences)
Alert Levels
| Level | Trigger | Action |
|---|---|---|
| 🔴 Critical | Agent down, all tools failing | Immediate notification + restart attempt |
| 🟡 Warning | Degraded performance, > 10% error rate | Scheduled notification |
| 🔵 Info | New session, task milestone | Log only |
Self-Healing Actions
When issues are detected, the agent can automatically:
- Restart failed MCP connections
- Clean up stale sessions (sessions idle > 2 hours)
- Flush memory cache when usage > 80%
- Retry failed tool calls (up to 3 attempts)
- Switch to backup providers (e.g., GitHub API fallback)
Configuration
{
"alert_channels": ["log", "notification"],
"memory_threshold_pct": 80,
"session_idle_timeout_min": 120,
"max_sessions": 20,
"error_rate_threshold_pct": 10,
"latency_threshold_ms": 5000,
"self_heal_enabled": true,
"health_check_interval_min": 15
}
Cron Schedule
*/15 * * * * → Health check every 15 minutes
0 */2 * * * → Deep memory cleanup every 2 hours
Installation
clawhub install lingxi-agent-monitor
Integration with External Alerting
For external alerts (Slack, Discord, PagerDuty):
# In your notification workflow
curl -X POST $SLACK_WEBHOOK \
-H "Content-Type: application/json" \
-d '{"text": "🔴 Agent Alert: $ALERT_MESSAGE"}'
Memory Management
When memory usage is high:
- Archive completed session summaries to memory files
- Clear intermediate computation cache
- Merge small memory files into consolidated ones
- Prune session history beyond retention limit
Dashboard Endpoint
If running with n8n bridge:
GET /agent-monitor/dashboard → HTML dashboard with real-time status
GET /agent-monitor/metrics → JSON metrics endpoint
GET /agent-monitor/alerts → JSON alert history
相关技能
Keep OpenClaw gateway alive: heartbeat monitoring, auto-restart, crash alerts, memory warning, uptime report.
Build, bootstrap, and maintain a stable OpenClaw default agent identity by interviewing the user, updating IDENTITY.md, and seeding core context files (AGENT...
Install and configure the security-related plugins required by OpenClaw, including the `agent-sentry` plugins. Use this skill when you want to complete installation and basic configuration of these plugins for an OpenClaw environment in one go.
Standalone advanced network diagnostics for OpenClaw to continuously test end-to-end connectivity from OpenClaw agent to Telegram Bot API and approximate del...
Connect two OpenClaw agents on the same LAN as peer collaborators. No VPN, no port forwarding over the internet, no third-party relay. Direct sessions_send b...