OpenClaw Full Tutorial for Beginners – How to Set Up and Use OpenClaw (ClawdBot / MoltBot)
Watch on YouTube →
Overview
Kian presents OpenClaw, a self-hosted messaging gateway for connecting platforms like WhatsApp, Telegram, and Discord to coding agents. The course covers installation, workspace configuration, Pinchboard integration for social media, personal assistant setup, skill customization, multi-agent management, security considerations, and sandboxing techniques for isolating agent execution.
Key takeaways
- OpenClaw's gateway acts as a long-running process that routes messages to agents for execution or manipulation.
- Running OpenClaw on a VPS (Virtual Private Server) is recommended for security, as it isolates the agent from sensitive local files.
- OpenClaw skills are markdown files with YAML front matter that provide instructions to the agent on how to use specific tools or APIs.
- OpenClaw's multi-agent feature allows users to create separate agents for different purposes (e.g., work and personal), each with its own configuration and permissions.
- Sandboxing in OpenClaw isolates agent execution within Docker containers, mitigating the risk of malicious code execution on the host system.
- OpenClaw integrates with Pinchboard, a social media platform for AI agents, allowing agents to post and interact with each other.
Chapters
0:00
Introduction to OpenClaw
- OpenClaw, formerly Claudebot/Maltbot, is a self-hosted messaging gateway connecting platforms to coding agents.
- It enables real-world task automation like calendar management and smart home control via messaging apps.
- The course covers connecting AI models, managing memory, and expanding agent capabilities with skills.
- Prerequisites include CLI experience and exposure to LLMs and prompt engineering.
2:05
OpenClaw Overview and Installation
- OpenClaw connects messaging platforms like WhatsApp, Telegram, and Discord to coding agents.
- It's fully self-hosted, offering more integrations and configurability than Claude Code.
- Installation requires Node version 22 or greater.
- Kian emphasizes the security risks of running OpenClaw locally due to potential root access.
4:42
Installation and Onboarding
- The 'install demon' flag installs the gateway as a background service.
- Kian walks through the onboarding wizard, resetting configurations for demonstration.
- Users can choose between local or remote gateway setup.
- The onboarding process includes selecting a model (Anthropic recommended) and configuring a token.
8:59
Gateway Configuration and Security Warnings
- Kian uses Claude Code to determine that 'loopback' is the recommended gateway bind option for single-machine setups.
- The onboarding process includes options for token configuration, chat channels, and skills.
- A security warning emphasizes the possibility of bad outcomes if users are not careful.
- Using a more powerful model is more secure because they are more resistant to prompt injection schemes.
12:13
Completing Onboarding and Launching the TUI
- The onboarding process includes options for skills configuration, Google Places API key, and Notion integration.
- Hooks automate actions when agent commands are issued, such as running boot.md on gateway startup.
- The gateway service is installed, and the TUI (terminal user interface) is launched.
- The TUI prompts the user to define the agent's identity.
15:09
Agent Initialization and Security Audits
- Kian names the agent Nova and defines its role as an ambassador for OpenClaw.
- The open claw security audit deep command identifies security vulnerabilities.
- The open claw doctor command performs health checks and quick fixes for the gateway.
- The terminal user interface provides access to 46 default commands.
17:50
Workspace and Memory Key Concepts
- All configurations, credentials, and sessions live under the home directory .openclaw/repos directory by default.
- This directory can be backed up as a Git repository.
- Key markdown files in the workspace define the agent, including identity, memory, and agent.md.
- The agent.md file tells the agent everything it needs to know in order to work properly.
21:15
Pinchboard Integration
- Pinchboard is a social media platform for AI agents.
- Kian integrates Nova with Pinchboard by providing the website URL to the agent.
- Nova is registered on Pinchboard and requires verification via a tweet.
- After verification, Nova sends a tweet to celebrate its presence on Pinchboard.
25:10
Setting Up a Personal Assistant
- Kian sets up a personal assistant through WhatsApp, emphasizing the need for caution due to security risks.
- It's recommended to set channels, WhatsApp allow from such that you can only send to certain channels.
- Pairing WhatsApp web is done through the openclaw channels login command.
- The WhatsApp channel is enabled, and the gateway is restarted.
29:30
Configuring WhatsApp and Testing Communication
- Kian adds his phone number to the open claw JSON configuration file.
- A message is sent to the configured phone number to test the WhatsApp integration.
- The agent responds to messages and executes commands, such as checking for outstanding pull requests.
- Kian sets up a Discord bot to interact with the agent.
33:41
Discord Bot Integration and Security Considerations
- Kian creates a Discord bot and provides the bot token and guild/channel information to OpenClaw.
- The agent joins the Discord channel and responds to messages.
- Kian emphasizes the security risks of allowing the bot access to the computer, as anyone on the Discord server could potentially execute malicious code.
- The agent can access the entire root directory, even through Discord.
36:44
Skills Overview and Customization
- Agent skills are stored in a specific folder directory, with each skill having a skill.md file.
- Skills contain YAML front matter and instructions teaching the agent how to use tools.
- Skills can be user invocable via the slash command.
- Kian writes a custom email skill using Python to send emails via Gmail SMTP.
43:11
Multi-Agent Configuration, Security, and Sandboxing
- Multi-agent setups allow for different personas, permissions, and workspaces.
- Kian adds a 'work' agent and configures it with Anthropic.
- The agents command in the TUI allows switching between agents.
- Security considerations include prompt injection and using Docker-based isolation to protect the host system.
49:04
Sandboxing Modes and Tool Policies
- Sandboxing modes include non-main (sandbox everyone except your main session) and all (sandbox everything).
- Sandbox scope can be session, agent, or shared, affecting container lifecycle management.
- Tool policies, such as tool.deny, can block access to tools like exec process or browser.
- Elevated exec runs on the host and bypasses the sandbox, requiring caution.
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, freeCodeCamp.org.