Course Overview & Prerequisites #
- Introduction to OpenClaw: Formerly known as Claudebot/MoltBot, OpenClaw is a proactive autonomous agent and self-hosted messaging gateway.
- Capabilities: Automates tasks (email triage, calendar management, smart home control) via Telegram, WhatsApp, and Discord.
- Prerequisites: Basic familiarity with Command Line Interface (CLI) and exposure to Large Language Models (LLMs) via APIs.
- Course Structure: Covers installation, memory management, social media integration (Pinchboard), skills, multi-agent setups, and security/sandboxing.
OpenClaw Concepts & Architecture #
- Self-Hosted Gateway: A long-running background process on your machine that maintains persistent connections to messaging platforms and routes messages to agents.
- Comparison to Claude Code: Unlike Claude Code, OpenClaw is fully self-hosted, supports more messengers natively (WhatsApp, Discord, etc.), and is more configurable for complex workflows.
- Local vs. VPS: Users can run OpenClaw locally or on a Virtual Private Server (VPS). Local runs allow browser use but pose higher security risks; VPS is recommended for production to protect personal files.
Installation & Configuration #
- Requirements: Node.js version 22 or higher.
- Standard Commands:
npm install -g openclaw: Global installation.openclaw onboard --install-daemon: Launches the onboarding wizard and installs OpenClaw as a background service (launchd/systemd).
- Onboarding Wizard: Configures workspace location, model selection (Anthropic, OpenAI, or Google Gemini), API tokens, and connection types (Loopback, LAN, or Tailscale).
- Maintenance Tools:
openclaw security-audit deep: Identifies and fixes file permission vulnerabilities.openclaw doctor: Performs health checks and quick fixes for the gateway.
Workspace, Memory & Identity #
- The
.openclawDirectory: All configurations, credentials, and session memories are stored here. - Key Files:
agent.md: The core definition file telling the agent how to operate.identity.md: Defines the agent’s name (e.g., "Nova"), personality, and role.user.md: Stores information about the user (timezone, preferences).heartbeat.md: Commands or tasks for the agent to check periodically (e.g., hourly).
- Git Integration: The workspace can be initialized as a Git repository to sync settings and agent personalities across different devices.
Personal Assistant Setup & Messaging #
- Social Media (Pinchboard): Demonstration of connecting to "Pinchboard" (an agent-focused social platform) to automatically register, verify, and post "pinches" (tweets).
- WhatsApp Integration: Requires
plugins enable whatsappand scanning a QR code viaopenclaw channels login. - Discord Integration: Requires creating a Discord bot via the Developer Portal, enabling "Message Content Intent," and providing the Bot Token, Guild ID, and Channel IDs.
- Security Note: It is highly recommended to use agents only in one-on-one chats. Adding an agent with terminal access to a group chat creates a massive prompt injection vulnerability.
Skills & Extensions #
- Skill Structure: Each skill is a directory containing a
skill.md(YAML config + instructions) and optional executable scripts (Python/JS). - Pre-built Skills: Includes Obsidian, Google Workspace, Apple Notes, and OnePassword.
- ClawHub: A package registry (
clawhub.com) for downloading third-party skills usingclawhub install. - Custom Skills: Demonstration of writing a Python-based SMTP email skill for sending messages through Gmail.
Multi-Agent Systems #
- Purpose: Different agents can be created for specific contexts (e.g., a "Work" agent vs. a "Personal" agent).
- Context Switching: Use the
/agentscommand within the Terminal User Interface (TUI) to swap between personas instantly. - Isolation: Each agent can have its own workspace, permissions, and set of skills.
Security & Sandboxing #
- Risk Factors: Since agents have terminal and file access, malicious actors could theoretically use prompt injection to delete files or steal data.
- Sandboxing with Docker:
- Modes:
none,non-main(sandbox everything except the primary agent), orall. - Scopes:
session(new container per chat),agent(one container per agent), orshared(one container for all agents).
- Modes:
- Elevated Mode: Use with extreme caution; it allows an agent to bypass the sandbox and run commands directly on the host machine.
- Demo: A sandboxed "Work" agent was shown to be unable to access the user’s actual desktop files, restricted only to its designated Docker container.
Summary #
This video serves as a technical walkthrough for OpenClaw, an open-source framework for hosting autonomous AI agents. It details the transition from initial CLI installation to advanced configurations like connecting Discord/WhatsApp and creating custom Python skills. Central to the tutorial is the "security-first" approach, emphasizing that while OpenClaw grants AI agents deep access to a user’s local system, this power must be managed through Docker sandboxing, careful channel white-listing, and model selection. The course concludes by demonstrating how to manage multiple AI personas, effectively turning a local machine into a 24/7 automated digital operator.
last updated: