Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agent37.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Runtime hooks let your OpenClaw instance run small setup scripts automatically during startup. Use them when you want to:
  • reinstall packages after a runtime update
  • restart background services
  • recreate temporary runtime state
  • restore tools or files your app depends on
Hook files live in:
/home/node/.agent37/hooks/

Available hooks

Post-image-update hook

Run setup after the runtime image changes.

Post-restart hook

Run setup every time the container starts.

Which hook should you use

  • Use post-image-update.sh for things that should run only after a runtime update
  • Use post-restart.sh for things that should run on every start

Tips

  • Keep each hook focused on one job
  • Test the commands manually in Terminal first
  • Keep the script short enough to finish within its timeout