What you'll learn: By the end of this tutorial, you'll have OpenClaw installed, configured with your API key, and ready to run your first AI automation. No coding experience required.
Prerequisites
Before you start, make sure you have:
- Python 3.10 or higher - Check with
python3 --version - pip (Python package manager) - Usually comes with Python
- git (optional, for advanced features)
- Anthropic API key - Get one free at console.anthropic.com (£5 free credit)
Step 1: Check Your System
Open Terminal (Cmd+Space, type "Terminal") and run:
python3 --version pip3 --version
You should see Python 3.10+ and pip version numbers. If not, install Python from python.org.
Open Command Prompt (Win+R, type "cmd") and run:
python --version pip --version
You should see Python 3.10+ and pip version numbers. If not, install Python from python.org and check "Add Python to PATH" during installation.
Open your terminal and run:
python3 --version pip3 --version
Most Linux distributions come with Python pre-installed. If not, install via your package manager:
# Ubuntu/Debian sudo apt update && sudo apt install python3 python3-pip # Fedora/RHEL sudo dnf install python3 python3-pip # Arch sudo pacman -S python python-pip
Step 2: Install OpenClaw
Run the Installation Command
In your terminal, run:
pip install openclaw
This downloads and installs OpenClaw and all its dependencies. Takes 1-2 minutes.
openclaw --version. You should see the version number.
Step 3: Initialize Your Workspace
Create Your .openclaw Folder
OpenClaw stores everything in a .openclaw folder in your home directory. Create it:
openclaw init
This creates:
~/.openclaw/config.yaml- Main configuration file~/.openclaw/SOUL.md- Your AI agent's personality and goals~/.openclaw/AGENTS.md- Agent definitions~/.openclaw/MEMORY.md- Agent memory storage~/.openclaw/skills/- Custom skills folder
Step 4: Configure Your API Key
Add Anthropic API Key
Open ~/.openclaw/config.yaml in any text editor and add your API key:
anthropic: api_key: "sk-ant-api03-your-key-here" model: "claude-sonnet-4.5" # Cost-optimized model
Where to get your API key:
- Go to console.anthropic.com
- Sign up (free £5 credit included)
- Navigate to API Keys section
- Create a new key and copy it
config.yaml only. See the free Security First chapter for full security guide.
Step 5: Test Your Installation
Run Your First Command
Test that everything works:
openclaw doctor
This runs a health check and shows:
- ✅ Python version OK
- ✅ Dependencies installed
- ✅ API key configured
- ✅ .openclaw folder structure correct
Step 6: Create Your First Agent
Quick Start: Email Triage Agent
Let's create a simple agent that summarizes your emails. Run:
openclaw agent create email-triage
This creates a new agent definition in AGENTS.md. Edit it to customize the agent's task:
# Email Triage Agent **Purpose:** Read my inbox and summarize important emails **Schedule:** Daily at 8am **Actions:** - Read unread emails from the last 24 hours - Categorize by urgency (high/medium/low) - Generate summary with action items - Send summary via Telegram
Step 7: Run Your Agent Manually
Test Your Email Triage Agent
Before scheduling, run manually to test:
openclaw run email-triage
The agent will execute and show you the results. Check the output to verify it's doing what you want.
Step 8: Schedule with Cron (Optional)
Automate Daily Runs
To run your agent automatically every day at 8am, add to crontab:
crontab -e
Add this line:
0 8 * * * /usr/local/bin/openclaw run email-triage
Save and exit. Your agent now runs daily without any manual work.
What's Next?
You now have OpenClaw installed and running! Here's what to do next:
- Read the free Security First chapter - Learn how to lock down your API keys, prevent prompt injection, and keep your automations secure.
- Build your First 3 Projects - Meeting notes, email triage, weekly reports (covered in Module 3)
- Set up Gateway control - Control OpenClaw from Telegram/Slack on your phone (Module 5)
- Add Heartbeat Monitoring - Get alerted if your agents fail (Module 8)
Master OpenClaw in 10 Modules
This tutorial covers basic installation. The complete course teaches you security, token optimization, multi-agent orchestration, and scaling to £500k+ in revenue.
10 modules • 95,000 words • £97
Read Free Chapter Join WaitlistTroubleshooting
Python version too old
Problem: openclaw requires Python 3.10+ but you have 3.8 or 3.9.
Solution: Install Python 3.11 from python.org. Use python3.11 and pip3.11 commands instead of python3.
pip: command not found
Problem: pip is not installed or not in PATH.
Solution: Install pip: python3 -m ensurepip --upgrade. If that fails, reinstall Python from python.org and check "Add to PATH".
API key not working
Problem: "Invalid API key" error when running openclaw doctor.
Solution: Double-check your API key in ~/.openclaw/config.yaml. Make sure there are no extra spaces or quotes. Key should start with sk-ant-api03-.
Permission denied on macOS
Problem: "Permission denied" when running pip install openclaw.
Solution: Use pip install --user openclaw to install for your user only (no sudo needed).
Still stuck?
Join the OpenClaw Discord community at discord.gg/openclaw for help. Or book a £1,500 private setup session via Dan's LinkedIn.
Skip the Setup Hassle
Want OpenClaw installed and configured perfectly in 1 hour? Book a private setup session with Dan.
£1,500 • 1 hour • Full setup + customization
Contact Dan on LinkedIn