Learning Path Overview

Choose your starting point based on your experience level. Each path links directly to the relevant tutorials and documentation below.

Beginner

New to OpenClaw

No prior AI automation experience needed

Goal: Run your first automated task from the terminal.

Intermediate

Comfortable with the CLI

Ready to build real workflows

Goal: Automate a real daily workflow end-to-end.

Advanced

Power user & developer

Build production-grade systems

Goal: Build and ship a production AI automation system.

Tutorial 1: Your First Automation in 5 Minutes

Install OpenClaw, connect an LLM, and run your first automated task.

# Step 1: Install
pip install openclaw

# Step 2: Set API key
export OPENCLAW_API_KEY="sk-..."

# Step 3: Run first task
openclaw run "Summarise the README of this project" --file README.md

That is all. OpenClaw reads the file, sends it through the LLM, and prints the summary.

Tutorial 2: Automate a Daily Report

Create a script that reads your project folder every morning and emails a status update.

#!/usr/bin/env bash
# daily-report.sh

REPORT=$(openclaw run \
  "Summarise progress for this project, highlight blockers, and list next steps." \
  --file /workspace/project/ \
  --format markdown)

# Send via sendmail, mailgun, or any SMTP tool
echo "$REPORT" | mail -s "Daily Project Report - $(date +%F)" team@example.com

echo "Report sent."

Add to cron:

0 8 * * 1-5 /home/user/scripts/daily-report.sh

Tutorial 3: Code Review Bot

Review every pull request automatically in GitHub Actions.

# .github/workflows/code-review.yml
name: AI Code Review
on: [pull_request]
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - run: pip install openclaw
      - name: Review diff
        env:
          OPENCLAW_API_KEY: ${{ secrets.OPENCLAW_API_KEY }}
        run: |
          git diff origin/${{ github.base_ref }}...HEAD > diff.patch
          openclaw run "Review this diff for bugs, security issues, and style problems. Be concise." \
            --file diff.patch --format markdown > review.md
          cat review.md

Tutorial 4: Local LLM with Ollama

Run completely offline with no API costs.

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Pull a model
ollama pull llama3.2

# Point OpenClaw at it
openclaw config set provider ollama
openclaw config set model llama3.2
openclaw config set base_url http://localhost:11434

# Test
openclaw run "hello world"

Tutorial 2: Build a Daily Assistant Script

Goal: Create a script that runs every morning and delivers a personalized briefing via Telegram.

Step 1: Write the script

cat > ~/scripts/morning-assistant.sh <<'EOF'
#!/usr/bin/env bash
# morning-assistant.sh

# Gather context
WEATHER=$(curl -s "wttr.in/?format=3")
NEWS=$(curl -s "https://feeds.bbci.co.uk/news/technology/rss.xml" | grep -o '<title>[^<]*</title>' | head -10 | sed 's/<\/?title>//g')
PENDING_TASKS=$(cat ~/todo.txt 2>/dev/null | head -10)

# Ask AI to create a briefing
BRIEFING=$(printf "Weather: %s\n\nTop tech news:\n%s\n\nPending tasks:\n%s" \
  "$WEATHER" "$NEWS" "$PENDING_TASKS" | \
  openclaw run "Write a concise morning briefing (under 200 words). Be direct and actionable. Start with weather, then news highlights, then my top 3 tasks for today.")

# Deliver
openclaw telegram send "Good morning!\n\n$BRIEFING"
EOF
chmod +x ~/scripts/morning-assistant.sh

Step 2: Schedule it

# Add to crontab
(crontab -l 2>/dev/null; echo "0 8 * * 1-5 ~/scripts/morning-assistant.sh") | crontab -

Tutorial 3: GitHub Auto Code Review Bot

Goal: Automatically review every pull request and post an AI review as a comment.

Step 1: Create the workflow

# .github/workflows/ai-code-review.yml
name: AI Code Review
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - run: pip install openclaw
      - name: Generate review
        env:
          OPENCLAW_API_KEY: ${{ secrets.OPENCLAW_API_KEY }}
        run: |
          git diff origin/${{ github.base_ref }}...HEAD > diff.patch
          openclaw run "Review this diff as a senior engineer. Flag: bugs, security issues, missing tests. Format as a GitHub-flavoured Markdown checklist." \
            --file diff.patch > review.md
      - name: Post comment
        uses: actions/github-script@v7
        with:
          script: |
            const review = require('fs').readFileSync('review.md', 'utf8');
            github.rest.issues.createComment({
              ...context.repo,
              issue_number: context.issue.number,
              body: review
            });
More Resources

See Automation Examples for a complete script library and Use Cases for real-world scenarios.

Tutorial 4: Automated Data Analysis Pipeline

Goal: Build a weekly pipeline that pulls a CSV from your data source, analyses it with OpenClaw, and emails the summary.

Step 1: Create the analysis script

cat > ~/scripts/weekly-analysis.sh <<'EOF'
#!/usr/bin/env bash
set -euo pipefail
DATE=$(date +%Y-%m-%d)

# Pull data (adapt to your source)
curl -s "https://your-app.com/api/export/week.csv" \
  -H "Authorization: Bearer $API_TOKEN" \
  -o "/tmp/data-$DATE.csv"

# Analyse with OpenClaw
openclaw run \
  "Analyse this weekly CSV data. Identify the top 3 trends, \
   any anomalies or drops, and write a 3-paragraph executive summary." \
  --file "/tmp/data-$DATE.csv" \
  --model gpt-4o \
  --output "/tmp/summary-$DATE.md"

# Convert and send
pandoc "/tmp/summary-$DATE.md" -o "/tmp/summary-$DATE.html"
python3 ~/scripts/send_email.py \
  --to "team@company.com" \
  --subject "Weekly Analysis — $DATE" \
  --body "/tmp/summary-$DATE.html"

echo "Weekly analysis done for $DATE"
EOF
chmod +x ~/scripts/weekly-analysis.sh

Step 2: Schedule weekly

# Every Monday at 07:30
(crontab -l 2>/dev/null; echo "30 7 * * 1 ~/scripts/weekly-analysis.sh >> ~/logs/analysis.log 2>&1") | crontab -

Tutorial 5: Build a Custom Tool for OpenClaw

Goal: Register a custom Python function as an OpenClaw tool so the agent can call it autonomously during task execution.

Use case: Query your internal database

# tools/internal_db.py
from openclaw.tools import register_tool
import sqlite3, json

@register_tool(
    name="query_sales_db",
    description="Query the sales database. Returns JSON rows. "
                "Only accepts read-only SELECT statements."
)
def query_sales_db(sql: str) -> str:
    conn = sqlite3.connect("/data/sales.db")
    try:
        rows = conn.execute(sql).fetchall()
        cols = [d[0] for d in conn.execute(sql).description]
        return json.dumps([dict(zip(cols, r)) for r in rows])
    finally:
        conn.close()

Register and use

# Load your custom tool
openclaw run "What were the top 5 products by revenue last month?" \
  --tools tools/internal_db.py \
  --model gpt-4o

# The agent will call query_sales_db() with an appropriate SELECT query,
# receive the JSON rows, and produce a natural-language answer.

Tool safety guidelines

  • Always validate and sanitize SQL — use parameterized queries for user-provided values
  • Restrict to read-only for database tools (SELECT only)
  • Log all tool calls for auditing: check ~/.local/share/openclaw/logs/
  • Set allow_command_exec: false in config when using custom tools that substitute for shell access

What to Learn Next

You have completed the core tutorial series. Here is where to go from here:

Your GoalGo To
Write better, more reliable promptsBest Practices →
See real production deploymentsCase Studies →
Multi-agent and event-driven workflowsAdvanced Automation →
Choose the right AI agent toolOpenClaw vs AutoGPT →
Explore automation patternsAutomation Guides →