OpenClaw
A self-hosted assistant: one Gateway links your chat apps to agents with their own files, memory, skills and schedules. Interviewers ask how you run it safely on your own hardware.
part ofAI coding toolsread it →on this pageshowhide
explore
- Core Runtime21 questions
- Gateway Control Plane5 questions
- Agent Runs & Queueing5 questions
- Sessions & Chat Commands6 questions
- Multi-Agent Routing5 questions
- Installation & Upkeep18 questions
- Hosting Choices6 questions
- Onboarding & Daemon6 questions
- Model Providers & Failover6 questions
- Messaging Apps11 questions
- Linking Chat Accounts6 questions
- DM & Group Access5 questions
- Persistent Context11 questions
- Workspace Bootstrap Files6 questions
- Memory Files & Search5 questions
- Proactive Runs17 questions
- Heartbeats6 questions
- Cron Jobs & Webhooks6 questions
- Internal Hooks5 questions
- Extension Layer17 questions
- Skills & ClawHub5 questions
- Gateway Plugins6 questions
- Connecting MCP Servers6 questions
- Securing the Agent12 questions
- Gateway Exposure & Audit6 questions
- Sandboxing & Tool Policy6 questions
questions
107 · 7 sectionsWhat is the OpenClaw Gateway, and why does a host normally run only one of it?
basics
~20 sThe Gateway is OpenClaw's single long-lived process: it holds every chat-channel connection, owns all session state and runs agent turns. The CLI, Control UI, apps and paired devices are only clients of its WebSocket API, by default at 127.0.0.1:18789.
In OpenClaw, what do the chat commands `/new`, `/reset`, `/compact` and `/stop` each do to the current session?
basics
~20 sOpenClaw's /new and /reset start the conversation over, /compact summarizes older turns so the same conversation continues in a smaller context, and /stop aborts the current run without touching history. None of them erases the stored transcript.
In OpenClaw, what happens between an inbound chat message reaching the Gateway and the agent's reply going back out?
basics
~20 sOpenClaw turns each inbound message into a serialized agent run: it resolves the session, waits for that session's lane, builds the prompt from its base prompt, skills and workspace files, calls the model and tools, then shapes and delivers the reply.
In OpenClaw, how do the queue modes steer, followup, collect and interrupt handle messages that arrive while an agent run is active?
basics
~20 sThe default steer mode injects a mid-run message into the active run; followup queues each message for its own later turn; collect merges queued messages into one later turn; interrupt aborts the active run and answers the newest message.
In OpenClaw, how do you route a work Slack account to one agent and a family WhatsApp number to another?
basics
~10 sDefine both agents under agents.entries, log in a Slack account and a WhatsApp account, then add bindings whose match names the channel and accountId for each. Verify with openclaw agents list --bindings.
Why is a personal laptop a weak always-on host for an OpenClaw Gateway, and what setup do the docs suggest instead?
basics
~20 sAn OpenClaw Gateway works only while its host is awake and online. A laptop sleeps, changes networks and reboots for updates, so chats and scheduled jobs stall; run the Gateway on an always-on host and pair the laptop as a node.
When OpenClaw's primary model provider fails overnight during a scheduled run, what does failover try, in what order, and does the fallback stick?
basics
~20 sOpenClaw first retries the same model briefly, then rotates to another auth profile of the same provider, then walks agents.defaults.model.fallbacks in order. The winning fallback answers only that turn; the next turn starts from the selected primary again.
Why is an OpenClaw Gateway set up with Quick start gone after a reboot, and how do you keep it running?
basics
~20 sQuick start runs the OpenClaw Gateway in the foreground of your terminal, so nothing restarts it after Ctrl+C, a closed terminal or a reboot. Install it as a managed service with openclaw gateway install, or openclaw onboard --install-daemon, then check openclaw gateway status.
In OpenClaw, which `openclaw models` commands set the default model and check that its credentials work, and what does each one prove?
basics
~20 sopenclaw models set writes the default model; openclaw models list shows the catalog; openclaw models status reports the resolved default, fallbacks and auth health without calling a model. Of these, only openclaw models status --probe sends real requests.
On a fresh machine, what do OpenClaw's installer script and the `openclaw onboard` wizard it launches actually set up?
basics
~20 sThe installer provisions a supported Node if it is missing, installs the OpenClaw package and starts onboarding. Onboarding verifies one model route with a real completion, then writes ~/.openclaw/openclaw.json, seeds the ~/.openclaw/workspace folder and starts a local Gateway.
In OpenClaw, what happens by default when an unknown person direct-messages your bot, and how do you let them in?
basics
~20 sThe default dmPolicy is pairing: an unknown sender receives an 8-character pairing code and the agent ignores the message. The operator admits them with openclaw pairing approve <channel> <code> or the Control UI, within one hour.
In OpenClaw, why does linking WhatsApp need a QR scan from a phone while Telegram needs only a bot token?
basics
~20 sOpenClaw reaches WhatsApp through WhatsApp Web as a linked device of a real phone account, so channels login shows a QR the phone must scan; Telegram has a native bot API, so a BotFather token in config is enough.
What do OpenClaw's four `dmPolicy` values do, and why does `open` need `"*"` in `allowFrom`?
basics
~20 spairing (default) sends unknown senders a code to approve, allowlist blocks anyone not in allowFrom, open admits everyone, and disabled ignores all DMs. open is public only when allowFrom includes "*", so opening a bot is an explicit opt-in.
In an OpenClaw group chat, what does `requireMention` change about when the agent answers, and what counts as a mention?
basics
~20 srequireMention, on by default, makes an allowed group message trigger the agent only when it mentions the bot; other messages are kept as context. Native mentions, configured or name-derived mentionPatterns, and channel-specific replies or quotes of the bot count.
In OpenClaw, what does `openclaw channels status --probe` check that plain `channels status` does not, and when does it fall back?
basics
~20 sWith --probe, the Gateway runs each account's live provider probe and optional audit, reporting results such as works or probe failed; plain status reports runtime state only, and an unreachable Gateway falls back to config-only summaries.
In an OpenClaw workspace, what belongs in AGENTS.md, SOUL.md, USER.md and IDENTITY.md, and how do they differ?
basics
~20 sAGENTS.md holds the agent's operating rules and memory habits, SOUL.md its persona and tone, USER.md stable directives about the owner, and IDENTITY.md its name, vibe, emoji and avatar. All four are injected prompt guidance, not enforcement.
In OpenClaw, how does the curated MEMORY.md differ from the daily memory/YYYY-MM-DD.md files, and when does each reach the model?
basics
~20 sMEMORY.md is the short curated file of durable facts and decisions, injected when a private session starts. Daily memory/YYYY-MM-DD.md files hold detailed running notes that are indexed and fetched with memory_search and memory_get, not injected every turn.
In OpenClaw, how does BOOTSTRAP.md differ from BOOT.md, and when does each one run?
basics
~20 sBOOTSTRAP.md is a one-time first-run ritual for a brand-new workspace, deleted once the workspace looks configured. BOOT.md is an optional startup checklist that the disabled-by-default boot-md hook runs as an agent turn on every Gateway start.
How do you back up an OpenClaw workspace in a private git repository, and what must stay out of it?
basics
~20 sCommit the workspace (default ~/.openclaw/workspace: AGENTS.md, SOUL.md, IDENTITY.md, USER.md, memory/) to a private remote. Keep ~/.openclaw/ out of it, including openclaw.json, credentials/ and the SQLite databases, and put no API keys or tokens in workspace files.
In OpenClaw, what do the memory_search and memory_get tools each do, and why does an agent usually call them in that order?
basics
~20 smemory_search ranks indexed memory chunks by meaning and exact terms and returns snippets with their paths; memory_get reads a named memory file or line range. The agent searches to locate a note, then reads only the lines it needs.
In OpenClaw, how do `--at`, `--every` and `--cron` schedules differ when you add a job with `openclaw cron add`, and where does `--tz` apply?
basics
~20 s--at fires once, at a timestamp or after a delay like 20m; --every repeats at a fixed interval; --cron follows a 5- or 6-field expression. --tz gives cron expressions and offset-less --at times an IANA zone, and --every rejects it.
In OpenClaw, what is a heartbeat, how often does it run by default, and how does it stay silent when nothing needs attention?
basics
~20 sAn OpenClaw heartbeat is a system-owned automation that runs a periodic agent turn in the main session, every 30m by default (1h with Anthropic OAuth/token auth). When nothing needs attention the agent replies NO_REPLY and nothing is sent.
An OpenClaw owner wants each `/new` to save the old conversation and every command logged: which bundled hooks do this, and what do they record?
basics
~10 sEnable the bundled session-memory and command-logger hooks with openclaw hooks enable. session-memory saves the last 15 user and assistant messages to memory/YYYY-MM-DD-HHMM.md; command-logger appends one JSON line per /new, /reset or /stop to logs/commands.log.
An OpenClaw heartbeat burns tokens all day checking an inbox; which heartbeat settings cut its per-run cost, and what does each trade away?
basics
~20 sEach OpenClaw heartbeat is a full agent turn. Cut cost with isolatedSession: true (no chat history), lightContext: true (no workspace bootstrap files), a cheaper model, a longer every and activeHours; each trades away context or judgment.
Why does OpenClaw treat internal hooks as fully trusted code, and what should you check before enabling a workspace hook or a downloaded hook pack?
basics
~20 sOpenClaw internal hooks run inside the Gateway process with its filesystem, network and environment access, and no sandbox wraps them. Before enabling one, read its handler and HOOK.md, see what it stores or sends, and pin where it came from.
In OpenClaw, what is the difference between a skill and a plugin, and when is a skill enough?
basics
~20 sAn OpenClaw skill is SKILL.md instructions for tools the agent already has; a plugin is code the Gateway loads in-process to add tools, channels, providers or hooks. A skill is enough when existing tools can do the work.
What is an OpenClaw skill, and where does `openclaw skills install @owner/<slug>` put the skill it fetches from ClawHub?
basics
~20 sAn OpenClaw skill is a folder holding a SKILL.md: YAML frontmatter with a name and description, then Markdown instructions that teach the agent a task. openclaw skills install @owner/<slug> copies it from ClawHub into the active workspace's skills folder; --global targets the shared directory.
In OpenClaw, how do you add a local stdio MCP server, such as a database tool server, and prove it actually works?
basics
~20 sRun openclaw mcp add <name> --command <exe> --arg <arg>, or write an mcp.servers entry with command, args, env and cwd, then run openclaw mcp doctor <name> --probe, which checks the definition and opens a live connection that lists the server's tools.
An OpenClaw assistant that also answers strangers gains a database MCP server; do its tools bypass tool policy, and how do you scope them?
basics
~20 sNo. MCP tools become OpenClaw tools under the bundle-mcp plugin id, named server__tool, and pass the same tool profile, allow and deny lists, per-sender limits and sandbox gate as built-in tools; filter the server's tools and deny them to strangers.
In OpenClaw, what is the difference between openclaw mcp serve and openclaw mcp add, and which side is the MCP server in each?
basics
~20 sopenclaw mcp add saves a third-party MCP server under mcp.servers so OpenClaw's agents can use its tools. openclaw mcp serve makes OpenClaw itself a stdio MCP server that another client spawns to read and reply to its channel conversations.
Why does an OpenClaw Gateway bind to loopback by default, and what changes when you widen `gateway.bind`?
basics
~20 sOpenClaw's gateway.bind defaults to loopback (127.0.0.1, port 18789), so only same-host processes can reach the Gateway's WebSocket and Control UI. Wider modes such as lan or tailnet admit other machines and require token or password auth.
Does OpenClaw run an agent's tools in a sandbox by default, and what moves into the sandbox once you turn it on?
basics
~20 sNo. OpenClaw sandboxing is off by default, so tools run on the Gateway host. When you enable it, only tool execution (shell, file tools, the optional browser) moves into a container; the Gateway process itself always stays on the host.
How do you reach an OpenClaw Gateway on a remote server from your laptop without opening its port to the internet?
basics
~20 sKeep the Gateway on loopback and bring the port to you: an SSH tunnel forwarding 127.0.0.1:18789, or OpenClaw-managed Tailscale Serve, which proxies tailnet-only HTTPS to the loopback Gateway. Funnel and wide binds widen exposure and lean harder on auth.
In OpenClaw, how do tools.allow and tools.deny decide which tools an agent can call, and what do they not control?
basics
~20 sOpenClaw tool policy filters tools by name: deny always wins, and a non-empty allow blocks everything not listed. It applies with or without the sandbox and is the hard stop, but it does not inspect what an allowed exec command does.
In OpenClaw, how do the `gateway.auth` token and password modes work, and how do you set and rotate the secret safely?
basics
~20 sOpenClaw's Gateway requires auth by default: token mode, the default, or password mode holds one shared secret every client presents. Generate a long random value, update each client's gateway.remote copy when rotating, and verify the old one fails.