πŸ“¦ LeoYeAI / openclaw-guardian

πŸ›‘οΈ Guardian watchdog for OpenClaw Gateway β€” auto-monitor, self-repair via doctor --fix, git-based rollback, daily snapshots, and Discord alerts. Powered by MyClaw.ai

β˜… 859 stars β‘‚ 390 forks πŸ‘ 859 watching βš–οΈ MIT License
ai-agentbashdevopsguardianopenclawself-healingwatchdog
πŸ“₯ Clone https://github.com/LeoYeAI/openclaw-guardian.git
HTTPS git clone https://github.com/LeoYeAI/openclaw-guardian.git
SSH git clone git@github.com:LeoYeAI/openclaw-guardian.git
CLI gh repo clone LeoYeAI/openclaw-guardian
Loading files...
πŸ“„ README.md

πŸ›‘οΈ OpenClaw Guardian

Powered by MyClaw.ai

Languages: English Β· δΈ­ζ–‡ Β· FranΓ§ais Β· Deutsch Β· Русский Β· ζ—₯本θͺž Β· Italiano Β· EspaΓ±ol


πŸ€– Powered by MyClaw.ai

MyClaw.ai is an AI personal assistant platform that gives every user a fully-featured AI agent running on a dedicated server β€” with complete code control, internet access, and tool integrations. Think of it as your own private AI that can actually do things, not just answer questions.

OpenClaw Guardian is an open-source project born from MyClaw.ai's production infrastructure. We run thousands of AI agent instances 24/7, and Guardian is the hardening layer that keeps them alive. We're open-sourcing it so everyone can benefit.

🌐 Try MyClaw.ai: https://myclaw.ai

Features

  • Auto-monitor β€” checks Gateway health every 30 seconds
  • Auto-repair β€” runs openclaw doctor --fix on failure (up to 3 attempts)
  • Auto-rollback β€” resets workspace to last stable git commit if repair fails
  • Daily snapshots β€” automatic daily git commit of your workspace
  • Discord alerts β€” optional webhook notifications on failures and recovery

How It Works

Gateway down detected
        β”‚
        β–Ό
  doctor --fix  ──→ success? ──→ βœ… Done
  (up to 3x)
        β”‚ all failed
        β–Ό
  git rollback  ──→ success? ──→ βœ… Done
        β”‚ failed
        β–Ό
  cooldown 300s β†’ resume monitoring

⚑ One-Line Deploy (OpenClaw Users)

Already using OpenClaw? Just tell your AI agent:

"Help me install openclaw-guardian to harden my gateway"

Your agent will handle everything automatically β€” git init, script install, and auto-start. No terminal needed.


Quick Start

# 1. Initialize git in workspace
cd ~/.openclaw/workspace
git init && git add -A && git commit -m "initial"

# 2. Install
cp scripts/guardian.sh ~/.openclaw/guardian.sh
chmod +x ~/.openclaw/guardian.sh

# 3. Start
nohup ~/.openclaw/guardian.sh >> /tmp/openclaw-guardian.log 2>&1 &

Configuration

VariableDefaultDescription
GUARDIAN_WORKSPACE$HOME/.openclaw/workspaceWorkspace git repo path
GUARDIAN_CHECK_INTERVAL30Health check interval (seconds)
GUARDIAN_MAX_REPAIR3Max repair attempts before rollback
GUARDIAN_COOLDOWN300Cooldown after all repairs fail (seconds)
DISCORD_WEBHOOK_URL(unset)Discord webhook for alerts (optional)

Works Alongside gw-watchdog

gw-watchdogGuardian
Check interval15s30s
ActionFast restartdoctor --fix β†’ rollback
Git rollbackβŒβœ…
Discord alertsβŒβœ…
Daily backupβŒβœ…

Install as OpenClaw Skill

clawhub install myclaw-guardian

License

MIT Β© MyClaw.ai