services/openclaw.md
Table of Contents
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:
- Switch model:
/model ollama/qwen3.5:35b-a3b-coding-nvfp4 - 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:
defaultwith 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 clawdhubif 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 viamcp-remotegranola-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
- Location:
personal-notesโ Personal markdown notes at~/Work/personal-notes/- Location:
/Users/dominick/Work/llm/local-notes/dist/mcp/index.js
- Location:
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
labelon 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 interfaces0.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-proxymode 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
tokenauth mode
Nginx proxy (192.168.1.185): stamps X-Forwarded-User header from auth_request.
๐ Resources
- Docs: https://docs.openclaw.ai
- Skills: https://clawdhub.com
- GitHub: https://github.com/openclaw/openclaw
- Discord: https://discord.com/invite/clawd
๐ง 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
_newslabel (internal ID:Label_56) and removes INBOX (archives) - Gmail modifies need
Label_56not_newsin the--addflag - Gmail search API is unreliable for old messages โ direct
users.messages.listAPI 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=INBOXvia OAuth directly (seefile-inbox-news.py) gog gmail messages modifyneeds the internal label ID (Label_56) not the display name (_news)- ^ The name
_newsworks forgog gmail labels create _newsand search queries, but not formodify --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/