https://docs.openclaw.ai/

Deploying OpenClaw

Server and system setup

Tencent Cloud Lighthouse instance: 4 CPU cores, 4GB RAM, 70GB system disk

Ubuntu 22.04.5 LTS 64-bit — ChatGPT recommended this as the most compatible option.

Installing OpenClaw

Update the system and install dependencies

# Update the system
sudo apt update && sudo apt upgrade -y
# Install base dependencies
sudo apt install -y git curl wget unzip build-essential
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
# Install Node.js
nvm install --lts
nvm use --lts
# Verify the install and check versions
node -v
npm -v

Install OpenClaw

npm install -g openclaw@latest

Start OpenClaw

# Initialise config and install
openclaw onboard --install-daemon
# install-daemon registers the OpenClaw Gateway as a background daemon: it runs
# silently, starts on boot, and restarts itself if it crashes

From ChatGPT:

SettingWhat it meansWhat it doesRecommendationHow to configure it if you skip it
model / auth providerChoose your model provider and how you authenticateDetermines which models are available, how they’re called, cost, and latencyPick the strongest model you have access to, or the most reliable provider — OpenAI / Anthropic / OllamaFill it in later via openclaw configure or by editing models.providers directly
filter models by providerFilter models down to one providerKeeps the model list manageable and avoids picking something unsupportedBeginners: stick to one provider. Advanced users: filter preciselyUse openclaw models list + openclaw models set <model>, or edit the config file
default modelThe model used by defaultDetermines which model the agent calls as its primarySet a strong model as primary and a cheaper one as fallbackSet manually: openclaw models set <model>, or edit agents.defaults.model.primary
model checkChecks that the model is reachableVerifies the API key is valid and the provider is upDo this — it’s the only way to be sure the agent will actually workRun manually: openclaw models status
select channelChoose the bot’s entry channelDetermines how users interact with the agentTelegram/Discord/Web/UI — use Web/CLI for local testing, Telegram or Docker + channel for productionConfigure later via openclaw configure or the channels config
web searchWhether to enable web searchLets the agent look up current information instead of relying only on training dataTurn it on for an assistant or anything that needs current info; turn it off in an air-gapped environmentAdd a search tool later via the tools config
search providerChoose a search engineAffects search quality, result structure, and costPrefer a stable API, e.g. SerpAPIAdd it later via tool config or openclaw configure
hooksLifecycle hooksLets you inject custom logic — safety checks, logging, tool permissionsBeginners can skip this; required for security/enterprise setupsAdd later by writing a plugin or editing the gateway config
How do you want to hatch your bot?Determines how the agent gets initializedControls the creation flow and configuration complexityPick TUI — the two don’t conflict, the web UI is still reachable, but the TUI won’t be interactive until an LLM API is configuredRe-run openclaw onboard later, or edit the config manually

Accessing the web UI remotely

Run this on your local machine’s command line, then open 127.0.0.1:18789 in your browser.

My first impression of the web UI for configuration wasn’t great — it’s clearly built for developers, not for casual users. The settings aren’t self-explanatory and there’s no inline help — for example, to configure the LLM API you have to type raw JSON into a text box, with no documentation on the expected format anywhere in sight. The TUI is honestly much easier to use.

# Open an SSH local port-forwarding tunnel, so a service running on the remote
# server is reachable from your own machine over the encrypted SSH channel.
ssh -N -L 18789:127.0.0.1:18789 your-username@your-server-ip

Configuring the LLM API

# Configuration command
openclaw configure

https://bailian.console.aliyun.com/cn-beijing/?spm=5176.45613825.0.0.46735b4cFCNR9w&tab=doc#/doc/?type=model&url=3020785

image.png

Setting up the QQ bot — chatting with “the lobster” over QQ

Sessions are isolated by entry point and session instance — the TUI and QQ chat are two separate main sessions, and they don’t share context or memory.

https://q.qq.com/qqbot/openclaw/

Setting up the agent

First contact: bootstrapping

Inside .openclaw/workspace there’s a BOOTSTRAP.md file. The first time you talk to the agent through the TUI, the LLM reads this file first, follows its instructions to work out who it’s supposed to be through the conversation, then rewrites files like agent.md and deletes BOOTSTRAP.md.

Worth noting: talking to the agent directly through the QQ bot does NOT trigger bootstrapping — you need to go through the TUI or the web UI for that.

image-1.png

Key configuration areas

Control layer — how it thinks
├── SOUL.md
├── model config
Memory layer — what it remembers
├── session   (short-term)
├── memory    (long-term)
├── RAG       (external)
Execution layer — how it gets things done
├── workspace
├── tools
├── skills
├── sub-agents
SettingWhat it doesSession-isolated?Persistent?Affects tokens?Typical use
workspaceThe agent’s working directory — files, code, run artifactsYesYesNo (indirectly)File handling, code execution, task output
SOUL.md / AGENT.mdThe agent’s core behavior rules (system prompt)No (injected globally)YesYes (heavy)Controls the agent’s strategy, persona, and how it executes
memoryLong-term storage (structured or unstructured)Depends on configYesYes (moderate)Remembering user preferences, historical info
session (main conversation)The current conversation contextYesNo (short-lived)Yes (heavy)Multi-turn dialogue, contextual reasoning
sub-agent sessionA sub-agent’s own independent execution contextYes (fully isolated)NoYes (light)Running complex or long-running tasks
compactionSummarizing/compressing a long contextYesNoYes (reduces usage)Keeping context length under control, saving tokens
toolsThe set of tools the agent can callNo (global config)YesNoDoing things externally — API calls, running code
skillsPre-packaged higher-level capabilities (tool combos)NoYesNoReusable capabilities, e.g. a task workflow
model configModel parameters (maxTokens, temperature, etc.)NoYesYes (heavy)Controls generation behavior and cost
RAG / embeddingsExternal knowledge retrievalNo (usually global)YesYes (moderate)Supplying long-term knowledge
MechanismTriggerTime-dependent?Runs in the main session?Has context?Creates a task record?Key traitTypical use
cron jobTime-based (exact time / cron expression)Yes (exact)Optional (main / isolated)Optional (none if isolated)YesPrecise scheduling, can run isolatedScheduled reports, reminders, batch jobs
heartbeatFixed interval (default 30 minutes)Yes (approximate)Yes (main session)Yes (full context)NoPeriodic “check-in / think”Inbox checks, notifications, status monitoring
hookEvent-triggered (lifecycle events, tool calls, etc.)NoDepends on the eventDependsNoEvent-driven, immediateAutomation, intercepting/enhancing behavior
  • If there’s nothing that needs the agent to periodically check on its own, turn off heartbeat to save tokens. cron = I tell it when to act heartbeat = it periodically checks in on its own hook = something happens, it reacts automatically

Sub-agents and multi-agent setups

You can set up the main agent to spin off a sub-agent for complex, time-consuming tasks, and have it report the result back — which saves both tokens and time.

  • Sub-agents are non-blocking: the main agent doesn’t wait for them and can keep talking to the user, and once the sub-agent finishes, it reports its result back and the loop closes.
  • A sub-agent runs in its own session and doesn’t inherit the main agent’s context or SOUL.md, which is what saves tokens.
  • Think of a sub-agent as a temp worker: it runs its task in the background and hands the result back once it’s done.
  • Good fit for long tasks, parallel tasks, and specialized work.

You configure SOUL.md to tell the main agent when to spin up a sub-agent, and give the sub-agent its own prompt to define its identity and rules so it can do its specific job well.

You can also run multiple long-lived agents in parallel, each with its own workspace, memory, SOUL.md, and session.

  • Useful for setting up multiple long-term “personas” — one that only writes code, one that only does research — each with its own memory and identity.
  • Each can have different permissions, different models, and different messaging channels (WeChat vs. QQ).

Context window settings

My first impression: this thing burns through tokens fast. Even a simple exchange can cost tens of thousands of tokens, and if you’re using a weaker LLM that gets stuck in a reasoning loop, token usage can spike into the millions for a single hard task.

Set the context window size based on what the model can actually handle — for example, MiniMax 2.5 natively supports a 200k context window. A bigger context window makes the conversation flow better and cuts down on how often the system needs to compress information.

Trying out skills

Time management with a Notion database

https://clawhub.ai/xiangtaoxiao/notion-time-management-matrix

I built this on top of a Notion database template I’d already made (a four-quadrant time management matrix) as the data source, with OpenClaw hitting it through the Notion API. You add or close to-dos over WeChat chat, get automatic reminders as deadlines approach, and can pull related files/info and update progress on a task. See the Notion skill docs for the actual API calls.

  • What’s better about this than the traditional way of doing it? Chatting over WeChat feels a lot more natural, and an AI assistant can add a bit of emotional warmth to it too 🐶
  • Honestly, just keeping everything inside OpenClaw itself works the best functionally — the trade-off is you lose a nice-looking interface, and you need to guard against the LLM being flaky and corrupting your data.
  • You can use OpenClaw’s own cron jobs to periodically check to-dos and send reminders. Under the hood, cron is just firing off an instruction to the AI through a specific session at a specific time.

Problems I ran into

  1. TRAE doesn’t follow OpenClaw’s conventions: fixed it by giving the agent a link to the OpenClaw skill docs and having it read them.
  2. After installing the skill, the agent didn’t pick it up: added a prompt in TOOL.md telling the AI explicitly to use this skill, and also explicitly asked for it on the first message of a conversation. As for why the agent doesn’t automatically trigger the skill by semantic matching once it’s installed — my guess is OpenClaw’s system prompt or the agent’s own prompt already has a default way of handling to-dos baked in, and that takes priority.
  3. Skill status shows “not ready”: run the command below to see which requirement isn’t met, then fix it. openclaw skills check
  4. Hard to debug — no visibility into the agent’s reasoning or tool calls: installed Clawmetry to fix this.
  5. The system mangled a path — extra spaces, wrong characters — so the command wouldn’t run. I asked GPT and made two fixes: renamed the skill’s folder to swap - for _, and added ./script/ to the path in the prompt. After that it worked cleanly — the AI didn’t need to retry, it just ran successfully.
  6. The AI’s task logic isn’t always very rigorous — I ran into a case where it acted purely from memory instead of reading the actual status file. In theory that’s the “smart” move, but if the prompt doesn’t require it, the AI won’t reliably notice when things have changed. (This was with MiniMax 2.5.)
  7. OpenClaw’s built-in memory isn’t great — right now the memory file has picked up a lot of unimportant, even outright wrong, content, and it’s badly polluting the context. Sometimes even when I explicitly point out an error and ask it to remember the correction, it still doesn’t get written to the memory file.
  8. Maybe worth trying calling the Notion API directly (i.e. the Notion skill) and customizing it so the AI understands what each database is for and how it’s structured — could that get me synced to-do and knowledge-base management?

Lessons learned

Prompt tricks that worked:

  1. Stop the AI from improvising: point it at the official docs and have it read them first, then explicitly forbid it from deviating from what the docs specify.
  2. Stop the AI from only fixing things locally instead of thinking about the whole picture.
  3. Work around some models being bad at handling tokens like - and at concatenating instructions correctly: different models — and different temperature settings — vary a lot in how reliably they build paths and system commands. When that’s unstable, it’s better to hard-code the command as a tool and have the AI just call the tool with its output. This will probably get better as LLMs improve.
  4. Stop the AI from always acting on memory: OpenClaw does have a memory structure, but if some key piece of data changes and the AI still acts on what it remembers instead of the current state, that leads to failures or corrupted updates. For anything that’s a critical setting, it’s better to require the AI to read the actual config file rather than pull it from context or memory — especially while debugging.