实时仪表板,用于任务状态和 polo 分数的跟踪。使用此技能的时机:1. 需要跨多个代理监控活跃任务;2.想要实时...
Real-time monitoring dashboard for task execution and polo score tracking.
bash
pilotctl --json task list --type submitted | jq -r '.[] | "\(.task_id) -> \(.target) [\(.status)]"'
bash
pilotctl --json task queue | jq -r '.[] | "\(.task_id) from \(.requester) [\(.type)]"'
bash
watch -n 5 "pilotctl --json info | jq -r '.polo_score'"
bash
pilotctl --json task list --type submitted | jq '{
total: length,
pending: [.[] | select(.status == "pending")] | length,
completed: [.[] | select(.status == "completed")] | length,
failed: [.[] | select(.status == "failed")] | length
}'
Continuous task monitoring dashboard:
bash
#!/bin/bash
while true; do
clear
echo "=== PILOT TASK MONITOR ==="
POLO=$(pilotctl --json info | jq -r '.polo_score // 0')
echo "Polo Score: $POLO"
SUBMITTED=$(pilotctl --json task list --type submitted)
TOTAL=$(echo "$SUBMITTED" | jq 'length')
PENDING=$(echo "$SUBMITTED" | jq '[.[] | select(.status == "pending")] | length')
COMPLETED=$(echo "$SUBMITTED" | jq '[.[] | select(.status == "completed")] | length')
echo "Total: $TOTAL | Pending: $PENDING | Completed: $COMPLETED"
sleep 3
done
Requires pilot-protocol skill, jq, and watch.