OpenClaw Hooks Crash Course - Gemma 4 Ollama 100% Local

Mervin Praison · Beginner ·🧠 Large Language Models ·8h ago
Create unlimited custom hooks in OpenClaw — running fully local with Ollama + Gemma 3n E2B In this video I show how to build a Telegram audit hook from scratch so OpenClaw sends a message to your Telegram every time someone runs /new, /reset, or /stop in the chat. Same pattern works for Slack, WhatsApp, webhooks, or any custom function you want to trigger. Everything runs locally on a Beelink Pro mini PC (AMD Ryzen 7 H255, 24GB RAM, 1TB SSD) with OpenClaw pre-installed and Gemma 3n E2B served via Ollama — small model, surprisingly strong performance for an edge device. https://www.bee-link.com/products/beelink-ser9-pro-amd-ryzen-7-h-255-openclaw?variant=48874933846258 https://openclaw-ai.com/en/docs/automation/hooks/ https://mer.vin/2026/05/openclaw-hooks-setup-guide/ What you'll learn What hooks are in OpenClaw and when to use them Setting up Ollama + Gemma 3n E2B on a local box SSH into a pre-installed OpenClaw device from your main machine Folder structure for a custom hook (handler.ts, package.json, hook.md) Wiring into command events (new, reset, stop) Other event types you can hook into: agent events, gateway events, message events Enabling the hook and restarting the gateway Testing the hook end-to-end with Telegram Honest notes This example uses Telegram because the integration is already there, but the handler.ts is where you can call literally anything — your own API, a webhook, a guardrail check, whatever. You can also use hooks defensively, e.g. block or audit reset/clear actions for security. Commands used ollama run gemma3n:e2b openclaw hooks list openclaw hooks enable telegram-audit openclaw gateway restart Folder structure ~/openclaw/hooks/telegram-audit/ ├── handler.ts ├── package.json └── hook.md Resources Beelink Pro (OpenClaw pre-installed): [link] OpenClaw install one-liner: [link] Full hook source code (handler.ts, package.json, hook.md): [link] OpenClaw docs — hooks & events: [link] Related videos OpenClaw + Telegram integration (ful
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related AI Lessons

Revealing Interpretable Failure Modes of VLMs
Learn to identify and interpret failure modes in Vision-Language Models (VLMs) for safer applications
ArXiv cs.AI
Learning Transferable Latent User Preferences for Human-Aligned Decision Making
Learn how to align large language models with human preferences for better decision making
ArXiv cs.AI
CHAL: Council of Hierarchical Agentic Language
Learn how CHAL, a council of hierarchical agentic language, improves LLM reasoning on ground-truth tasks by addressing structural limitations of current multi-agent debate methodologies
ArXiv cs.AI
PROMETHEUS: Automating Deep Causal Research Integrating Text, Data and Models
Learn how PROMETHEUS automates deep causal research by integrating text, data, and models to create navigable world models
ArXiv cs.AI
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →