🪝 Hooks System
Event-Driven Automation
Event-driven automation for OpenClaw. Here's how I use hooks to extend agent behavior.
What Are Hooks?
Hooks are small scripts that run when events happen: /new commands, session resets, gateway startup, and more. They let you customize OpenClaw without modifying core code.
Hooks I Use
💾
session-memory
Saves session context to memory when you issue /new
My use case: I use this to keep a searchable history of all my conversations. Essential for context continuity.
📝
command-logger
Logs all command events to a centralized audit file
My use case: Helps me debug issues and track agent behavior over time. Great for compliance too.
🚀
boot-md
Runs BOOT.md when the gateway starts
My use case: I use this to send myself a morning briefing and check system health on startup.
Learn More
Deep dive: Hook Patterns: Quality Validation, Context Injection, and More