services/openclaw.md

OpenClaw / Clawdbot Usage Guide

Personal AI assistant (Max) running on OpenClaw framework. This document covers setup, configuration, and usage patterns.

๐ŸŒ Web Interface

Access the webchat interface at: http://localhost:3490

๐Ÿ”Œ Connected Channels

  • Telegram: Connected to Dominick Pham (id:1662354361)
  • WhatsApp: Connected to +13374260737
  • Webchat: Available at localhost:3490

Current Status

  • Version: 2026.5.7
  • Default Model: DeepSeek V4 Flash (deepseek/deepseek-v4-flash)
  • Context window: 1,000,000 tokens
  • Previous default: Anthropic Claude Sonnet 4.5 โ†’ DeepSeek Chat

๐Ÿค– Model Providers

DeepSeek (current default)

  • Added May 2026 via OpenAI-compatible completions API
  • Base URL: https://api.deepseek.com
  • Models:
    • deepseek/deepseek-v4-flash โ€” default, 1M ctx, w/ reasoning ($0.14/M in, $0.28/M out)
    • deepseek/deepseek-v4-pro โ€” 1M ctx, w/ reasoning ($1.74/M in, $3.48/M out)
    • deepseek/deepseek-chat โ€” 128k ctx, legacy ($0.28/M in, $0.42/M out)
    • deepseek/deepseek-reasoner โ€” 128k ctx, legacy R1 ($0.28/M in, $0.42/M out)
  • API key: sk-d5cโ€ฆd24f

Local Ollama

  • Configured with Ollama as model provider pointing to http://localhost:11434
  • Registered Qwen 3.5 35B Coding model (qwen3.5:35b-a3b-coding-nvfp4)
  • OpenAI-compatible API mode

To use it:

  1. Switch model: /model ollama/qwen3.5:35b-a3b-coding-nvfp4
  2. Or try once: /model? ollama/qwen3.5:35b-a3b-coding-nvfp4 <your question>

โš™๏ธ OpenClaw CLI

Main command-line interface for managing the gateway daemon.

Gateway Management

openclaw gateway status
openclaw gateway start
openclaw gateway stop
openclaw gateway restart

Skills Management

openclaw skills list
openclaw skill install <skill-name>
openclaw skill remove <skill-name>

Diagnostics

openclaw doctor
openclaw status

๐Ÿ“ฆ ClawdHub CLI

Skill marketplace and package manager. Browse skills at https://clawdhub.com

Installation

npm install -g clawdhub
npm install -g undici  # Required dependency

Common Commands

# Search for skills
clawdhub search "keyword"

# Install a skill
clawdhub install skill-name
clawdhub install skill-name --version 1.2.3

# List installed skills from ClawdHub
clawdhub list

# Update skills
clawdhub update skill-name
clawdhub update --all

# Publish (requires login)
clawdhub login
clawdhub publish ./my-skill --slug my-skill --name "My Skill" --version 1.0.0

๐Ÿ“ Skill Storage Locations

Skills live in three places:

1. Bundled skills (installed with OpenClaw, read-only)

/opt/homebrew/lib/node_modules/openclaw/skills/

2. User custom skills (add new ones here)

~/.openclaw/workspace/skills/

Drop a directory with a SKILL.md file inside and OpenClaw picks it up on the next session.

3. Plugin-managed skills (symlinks, don't touch)

~/.openclaw/plugin-skills/

๐Ÿ˜ˆ Skillfish โ€” cross-tool skill installation

Skillfish installs skills across multiple AI coding tools. Each tool keeps skills in its own directory:

Tool Skills directory
Claude Code ~/.claude/skills/
Cursor ~/.cursor/skills/
Codex ~/.codex/skills/
GitHub Copilot ~/.github/skills/
Gemini CLI ~/.gemini/skills/
OpenClaw ~/skills/ (not under .openclaw)

To add a custom skill manually:

mkdir -p ~/.openclaw/workspace/skills/my-skill/

Then create a SKILL.md in that directory with YAML frontmatter (name, description) and markdown body. Format follows the brave-search skill pattern. The skill-creator skill can also scaffold these.

For loading skills from another location, configure skills.load.extraDirs in openclaw.json.

๐Ÿงฉ Skills (17 Ready)

Currently installed and ready skills:

  • ๐Ÿ” 1password - 1Password CLI integration
  • ๐Ÿ“ apple-notes - Apple Notes read/write via memo CLI
  • ๐Ÿ“ฆ bluebubbles - BlueBubbles plugin for iMessage
  • ๐Ÿงฉ coding-agent - Codex CLI, Claude Code, etc.
  • ๐Ÿ™ github - GitHub CLI (gh) integration
  • ๐ŸŽฎ gog - Google Workspace (Gmail, Calendar, Drive, etc.)
  • ๐ŸŒ nano-banana-pro - Gemini 3 Pro Image generation
  • ๐Ÿ“ notion - Notion API integration
  • ๐ŸŽ™๏ธ openai-whisper - Local speech-to-text
  • ๐Ÿ‘€ peekaboo - macOS UI capture/automation
  • ๐Ÿ“œ session-logs - Search session history
  • ๐Ÿ“ฆ skill-creator - Create/update skills
  • ๐Ÿงพ summarize - Extract/summarize URLs, podcasts, videos
  • ๐Ÿงต tmux - Remote-control tmux sessions
  • ๐ŸŽž๏ธ video-frames - Extract frames/clips from videos
  • ๐ŸŒค๏ธ weather - Weather forecasts
  • ๐Ÿ“ฆ clawdhub - ClawdHub marketplace CLI

Apple Notes (memo CLI)

Uses memo CLI to read/write Apple Notes via the apple-notes skill.

Setup: brew install antoniorodr/memo/memo Full docs: See documents/dev/memo.md in personal notes.

๐Ÿ“ Notion Integration

Set up to read/write pages, databases, and blocks.

Configuration

# API key stored at:
~/.config/notion/api_key

# Integration secret:
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

Pages must be shared with the integration to be accessible.

๐Ÿ“‚ File Structure

~/.openclaw/
โ”œโ”€โ”€ openclaw.json          # Main config
โ”œโ”€โ”€ workspace/             # Working directory
โ”‚   โ”œโ”€โ”€ AGENTS.md          # Agent behavior guide
โ”‚   โ”œโ”€โ”€ SOUL.md            # Personality/vibe
โ”‚   โ”œโ”€โ”€ USER.md            # User info
โ”‚   โ”œโ”€โ”€ IDENTITY.md        # Agent identity
โ”‚   โ”œโ”€โ”€ TOOLS.md           # Local tool notes
โ”‚   โ”œโ”€โ”€ MEMORY.md          # Long-term memory
โ”‚   โ”œโ”€โ”€ HEARTBEAT.md       # Periodic task checklist
โ”‚   โ””โ”€โ”€ memory/            # Daily logs (YYYY-MM-DD.md)
โ””โ”€โ”€ skills/                # Custom skills (if any)

๐Ÿ”ง Troubleshooting

ClawdHub CLI Error (undici)

If you see ERR_MODULE_NOT_FOUND for "undici":

npm install -g undici

Gateway Not Responding

openclaw gateway restart
openclaw doctor

Frequent Compaction / Context Overflows

If you're hitting compaction every few turns (especially with heavy tool use):

Config settings (applied May 2026):

  • Default model switched to DeepSeek V4 Flash (1M context window vs old 64k)
  • Compaction mode: default with 200k reserve tokens
  • These together should give ~10-20x more time between compactions

API Key Leaked in Notes

If you accidentally commit or paste API keys in notes, rotate the key in the provider's console and update the notes file. The DeepSeek key was previously exposed here โ€” rotate it if needed.

โฐ Cron Jobs

Morning Briefing

Single cron job, runs daily at 6:30 AM ET:

Daily Briefing (Every day):

  • Weather forecast for North Potomac, MD
  • Top 5 BBC news headlines
  • Open GitHub PRs requesting review
  • Delivered to Telegram

๐Ÿ”ง Maintenance

Update OpenClaw

npm update -g openclaw
openclaw gateway restart

Check for updates periodically โ€” new versions ship frequently. Breaking changes are noted on GitHub releases.

Update Skills

Skills installed via clawdhub need manual updates:

clawdhub update --all

Skills bundled with OpenClaw (in ~/.openclaw/plugin-skills/) update with OpenClaw itself.

Check Current Version

openclaw status

When to Update

  • OpenClaw itself: When a new feature or fix is relevant, or every few weeks
  • Skills: When they break or you need new capabilities
  • ClawdHub: npm update -g clawdhub if marketplace commands act up

Backup

Your config and data lives in ~/.openclaw/. Manual backup:

tar czf ~/Desktop/openclaw-backup-$(date +%Y%m%d).tar.gz ~/.openclaw

๐Ÿงฉ MCP Servers

MCP server config lives in the main config at ~/.openclaw/openclaw.json under the mcp.servers key.

Currently configured:

  • asana โ€” Asana task/project management via mcp-remote
  • granola-local โ€” Local Granola meeting notes (reads from Granola app credentials, provides list/get/search)
    • Location: /Users/dominick/Work/llm/granola-local-mcp/dist/index.js
  • personal-notes โ€” Personal markdown notes at ~/Work/personal-notes/
    • Location: /Users/dominick/Work/llm/local-notes/dist/mcp/index.js

All three managed through OpenClaw's MCP config. Format is standard stdio-based (same as Claude Desktop):

"mcp": {
  "servers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "package-name", ...]
    }
  }
}

Edit with openclaw mcp set <name> <json> or directly in the JSON file.

๐Ÿ–ฅ๏ธ Browser Control (Built-in Tool)

The browser tool is a built-in OpenClaw first-class tool (not a skill). It bundles Chromium via Playwright and connects over CDP (Chrome DevTools Protocol).

Stack: Agent โ†’ OpenClaw browser tool โ†’ Playwright โ†’ Chrome โ†’ web

Key notes:

  • Uses Chromium launched/managed by Playwright under OpenClaw
  • Separate profile from the user's personal browser (profile="user" attaches to user's running Chrome)
  • Supports snapshot, click, type, navigate, screenshot, and more
  • Stale element refs can happen after page changes โ€” snapshot again, then act
  • refs="aria" gives durable Playwright aria-ref ids
  • Use label on tabs for stable handles across calls

๐Ÿฆ€ Allowed Origins

Control UI accessible from:

๐Ÿ”‘ Gateway Auth

Auth mode: trusted-proxy โ€” delegates auth to nginx reverse proxy

  • bind: "lan" (listens on all interfaces 0.0.0.0:18789)
  • Only trusts headers from proxy at 192.168.1.185
  • nginx stamps X-Forwarded-User: dominick โ€” gateway trusts it

Token (fallback for direct LAN access):

2e7b62da9967d3cec56b037fe6f55f7280e41883239d7c214d4956312483ea12

Usage:

  • Web UI via nginx (https://max.dph.am): Seamless โ€” nginx auth + header = auto-authed
  • Direct web UI (http://192.168.1.189:18789): Paste token into login prompt
  • Local CLI (openclaw cron list): โŒ Does NOT work.
    • trusted-proxy mode rejects loopback connections before considering password fallback
    • Cron jobs (Daily Briefing) run via OpenClaw's internal scheduler, not the CLI โ€” they are unaffected
    • To run CLI commands, use nix shell with the token or switch to token auth mode

Nginx proxy (192.168.1.185): stamps X-Forwarded-User header from auth_request.

๐Ÿ”— Resources

๐Ÿ“ง Gog โ€” Google Workspace CLI

CLI for Gmail, Calendar, Drive, Contacts, Docs, Sheets via gogcli.

Setup: brew install gogcli/tap/gogcli Full docs: See documents/dev/gog.md in personal notes.

Credentials: ~/.config/gog/client_secret_598032504491-...json GCP Project: general-ai-testing (general-ai-testing-451915)

Email Auto-Filing Rules

Cron-based email filing using gog + Gmail API. Scripts in ~/Work/llm_tools/.

Rule 1: News/Articles โ†’ _news label (Label_56)

Files incoming newsletters and articles from known senders. Runs every 10 min via crontab.

Script: ~/Work/llm_tools/file-news-emails.sh

Matched senders:

Source Domains
WIRED wired.com, newsletters.wired.com
Washington Post washingtonpost.com, nl.mail.washingtonpost.com
Benedict Evans ben-evans.com
Medium medium.com
Product Hunt producthunt.com, digest.producthunt.com
NYT nytimes.com

How it works:

  • Searches unread inbox mail from these senders (is:unread -label:_news (from:...)
  • Adds _news label (internal ID: Label_56) and removes INBOX (archives)
  • Gmail modifies need Label_56 not _news in the --add flag
  • Gmail search API is unreliable for old messages โ€” direct users.messages.list API calls work better for historical backfill

Important quirks:

  • Gmail search API only returns ~10% of actual inbox messages. For full-backfill scripts, use users.messages.list?labelIds=INBOX via OAuth directly (see file-inbox-news.py)
  • gog gmail messages modify needs the internal label ID (Label_56) not the display name (_news)
  • ^ The name _news works for gog gmail labels create _news and search queries, but not for modify --add

Log: /tmp/file-news-emails.log

๐Ÿ” Brave Search Integration

Web search capability via Brave Search API. Two methods available:

API Key

BSAcw_h1oRyXEYiSrfDjGehMCf72Oi7

Stored in config at: ~/.openclaw/openclaw.json under tools.web.search.braveApiKey

Method 1: Built-in web_search Tool

Max can use web_search() directly in conversations. Configured in openclaw.json:

"tools": {
  "web": {
    "search": {
      "enabled": true,
      "braveApiKey": "BSAcw_h1oRyXEYiSrfDjGehMCf72Oi7"
    },
    "fetch": {
      "enabled": true
    }
  }
}

Method 2: ClawdHub brave-search Skill

Installed via ClawdHub CLI to ~/.openclaw/workspace/skills/brave-search

Installation

cd ~/.openclaw/workspace
clawdhub install brave-search
cd skills/brave-search
npm ci

Usage

cd ~/.openclaw/workspace/skills/brave-search

# Basic search
BRAVE_API_KEY="BSAcw_h1oRyXEYiSrfDjGehMCf72Oi7" node search.js "query"

# More results
BRAVE_API_KEY="BSAcw_h1oRyXEYiSrfDjGehMCf72Oi7" node search.js "query" -n 10

# Include page content
BRAVE_API_KEY="BSAcw_h1oRyXEYiSrfDjGehMCf72Oi7" node search.js "query" --content

# Extract content from URL
BRAVE_API_KEY="BSAcw_h1oRyXEYiSrfDjGehMCf72Oi7" node content.js https://example.com

Get API key at: https://api.search.brave.com/