🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Multi-Agent Status

by @agenthyjack

Cross-agent health monitoring for multi-host OpenClaw deployments. Each agent pushes structured status reports (JSON) to a central location. A PM/monitoring...

Versionv1.0.1
Comments1
βš™οΈ Configuration

Scripts available in the Collective Skills repo

1. Create shared status directory

On your central/shared host:

mkdir -p /path/to/agent-status
chmod 777 /path/to/agent-status

Scripts are in references/

2. Configure each agent

Copy the script from references/agent-status-report.sh to your preferred location and make it executable:

#!/bin/bash

agent-status-report.sh

AGENT_NAME="my-agent" STATUS_DIR="/path/to/agent-status" REPORT="$STATUS_DIR/$AGENT_NAME.json"

Get gateway status

GW_STATUS=$(openclaw gateway status 2>&1) if echo "$GW_STATUS" | grep -q "RPC probe: ok"; then GATEWAY="healthy" elif echo "$GW_STATUS" | grep -q "RPC probe: failed"; then GATEWAY="failed" else GATEWAY="unknown" fi

Count cron errors

CRON_LIST=$(openclaw cron list 2>&1) TOTAL=$(echo "$CRON_LIST" | grep -c "ok\|error" || echo 0) ERRORS=$(echo "$CRON_LIST" | grep -c "error" || echo 0)

Write report

cat > "$REPORT" << EOF { "agent": "$AGENT_NAME", "timestamp": "$(date -Iseconds)", "gateway": "$GATEWAY", "crons": { "total": $TOTAL, "errors": $ERRORS } } EOF

echo "Status report pushed at $(date)"

For remote agents (different hosts), use SCP to push:

# Add to the end of the script:
scp "$REPORT" user@central-host:/path/to/agent-status/

3. Add cron job (every 4 hours recommended)

openclaw cron add \
  --name "agent-status-report" \
  --every "4h" \
  --message "Run the agent status report script" \
  --no-deliver

4. Configure the monitor agent

The monitoring agent's HEARTBEAT.md should include:

```markdown

πŸ“‹ Tips & Best Practices

  • SSH key auth required for cross-host pushes. Set up passwordless SSH first.
  • The monitor agent should be on the same host as the status directory for local reads.
  • Reports are intentionally small (<1KB) to minimize storage and transfer overhead.
  • Stale detection (>8h) assumes 4h push interval. Adjust threshold if you change interval.
  • View on ClawHub
    TERMINAL
    clawhub install multi-agent-status

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’