OpenClaw Daemon: Directory Watcher with Rule-Based Reactions
Advanced · 30 minutes · 5 tasks, checked automatically · 100 points
In this advanced lab you will install OpenClaw, start its gateway as a persistent background daemon, define a file-watching skill with an explicit rule filter, and verify that the agent reacts only to matching files dropped into a watched directory — ignoring everything else. This mirrors a real automation pattern: an always-on local agent that monitors a folder and triggers work only when the right files arrive.
What you’ll learn
- Install OpenClaw into the LearnXops managed npm prefix and confirm the CLI is reachable
- Bootstrap an OpenClaw project in the lab directory and start the gateway as a background daemon
- Define a watch skill with a rule that reacts only to files whose names match a specific pattern
- Drop both matching and non-matching files into the watched directory and confirm selective reaction
- Inspect the daemon log to prove only the matching file triggered the skill
How this lab works
- Start the lab: One click starts a sandbox with a local model and the agent’s toolbox: no API key and no token bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work inspects the agent, its config and its output, and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: Locally, against a model on your computer: no API key, no tokens
- Model: claude-sonnet-4-6
- Open source: github.com/openclaw/openclaw
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Node.js 18+ available on PATH
- ANTHROPIC_API_KEY set in the environment
- ~/LearnXops/agent-tools already on PATH (managed by LearnXops)
Topics: openclaw, daemon, file-watcher, automation, rule-based, skills, gateway, background-process
Create a free account to start this lab.
Keep going
- Autonomous File Triage & Daily Digest with OpenClaw
- Drive a Codebase with Hermes: ripgrep Search, Multi-File Edits, and Running the Test Suite from the Agent Loop
- Build a Research-and-Write Crew with Local Documents
- CrewAI Flows: Deterministic Control with Branching, Retries, and Shared State
- Cyclic Self-Correcting LangGraph: Generate, Critique, Revise with Loop Guard
- Self-Correcting LangGraph on Claude: Generate, Critique, Revise