Course 02: Going DeeperModule 9 of 9

MODULE 09 · COURSE 02: GOING DEEPER

Module 9: Monitoring and Maintenance

A running agent that you never check on will eventually break silently. This module is about making sure that doesn't happen — and catching it fast when it does.


The basic health check

Before you start any work session, a quick sanity check takes 10 seconds:

openclaw gateway status

You want to see: running, connected channels, no errors. If something looks off, check the logs:

openclaw logs

That's the whole routine for most days. Set up the automated monitoring below and you won't even need to do this manually.


Let your agent monitor itself

This is a real pattern that works. Set up a heartbeat that checks the agent's own health:

"Add to your heartbeat checklist: If the Gateway has been restarted in the last hour, or if any of my connected channels are showing errors, message me immediately."

Or more specifically:

"Every morning, before you send my briefing, run a quick self-check: confirm your connections to Gmail and Google Calendar are working, confirm your cron jobs are running. If anything is broken, tell me as part of the briefing."

Using openclaw doctor

OpenClaw has a built-in diagnostic tool:

openclaw doctor

This checks your entire setup — Node version, config validity, channel connections, API key validity, daemon status — and flags anything that looks wrong. Run this whenever something feels off and you're not sure where to start.


Keeping OpenClaw updated

Check for updates:

npm outdated -g openclaw

Update:

npm install -g openclaw@latest
openclaw gateway restart

Don't wait months between updates. OpenClaw ships regularly and older versions accumulate unfixed bugs. Check once a month at minimum.

Ask your agent to remind you:

"On the first Monday of every month, remind me to update OpenClaw and check for new skills."


Server maintenance (if you're on a VPS)

Your server needs occasional attention too.

OS updates:
apt update && apt upgrade -y

Once a week is fine. Monthly at minimum. Unpatched servers are how things go wrong.

Disk space: Logs and memory files accumulate. Check occasionally:
df -h
du -sh ~/.openclaw/

If logs are getting large, rotate them:

openclaw logs --rotate

Or configure log rotation in the OpenClaw config.

Backup your workspace:

Your agent's workspace — SOUL.md, MEMORY.md, daily logs, config — is valuable. Back it up.

Simple approach: copy it somewhere else periodically.

# Daily backup script (add to crontab)
tar -czf ~/backups/workspace-$(date +%Y%m%d).tar.gz ~/.openclaw/
find ~/backups/ -name "workspace-*.tar.gz" -mtime +30 -delete  # keep 30 days

Or use rsync to sync to another machine. Or set up Backblaze B2 for automated off-site backups. Whichever you prefer — just do something.


When things go wrong at 3am

Your agent should tell you before things get bad. But if something breaks unexpectedly:

Quick triage:
  1. openclaw gateway status — is it running?
  2. openclaw logs — what happened right before it broke?
  3. openclaw doctor — does the diagnostic tool find anything?
  4. Restart: openclaw gateway restart
90% of issues are resolved by those four steps.

If restarting doesn't fix it, check:

  • Did OpenClaw update itself? (occasionally updates need a clean restart)
  • Did your API key expire or run out of credits?
  • Did your server run out of disk space or memory?

Keeping the knowledge base current

Your agent is only as good as its context. Stale memory makes it less useful over time.

Monthly habit (takes 15 minutes):

  1. Review MEMORY.md — what's outdated? What's missing?
  2. Scan recent daily logs — anything important that didn't make it to MEMORY.md?
  3. Check your SOUL.md — does it still reflect how you want your agent to work?
  4. Review active crons — any scheduled tasks you no longer need?
Ask your agent:
"Let's do a monthly review. Read your MEMORY.md and HEARTBEAT.md and tell me what might be stale or missing."

You've completed Course 02 🎓

Here's where you are now:

  • ✅ Agent running 24/7 on a server
  • ✅ Gmail connected
  • ✅ Google Calendar connected
  • ✅ Real automations running on cron
  • ✅ Heartbeat monitoring watching for what matters
  • ✅ Skills installed and working
  • ✅ Memory set up properly
  • ✅ Security locked down
  • ✅ Monitoring and maintenance in place
This is a real setup now. Not a toy. An actual part of how you work.


What's next?

Course 03: Building Your AI Workforce (coming soon)
  • Running multiple agents for different jobs
  • How Jeremy's actual agent setup works across his businesses
  • Agent-to-agent communication and coordination
  • Building custom skills
  • Templates: SOUL.md starter packs for common agent types
  • The business case for paid automation (what's worth building vs. buying)