OpenClaw Module 1: Setup & First Agent

Goal: go from a clean machine to a working OpenClaw workspace with one agent that you can send a test message to.

Run everything in a non-production environment first. If you already have OpenClaw installed, you can still use this page as a smoke-test checklist.

Hands-on Steps (Directly Runnable)

Execute each command, capture output, then note issues and fixes.

Step 1: Initialize OpenClaw config and workspace

Run:
openclaw setup
openclaw setup --workspace ~/.openclaw/workspace

Expected:

  • ~/.openclaw/openclaw.json is created or updated.
  • A default agent workspace exists under ~/.openclaw/workspace (or the path you specified).
Copyable commands
openclaw setup
openclaw setup --workspace ~/.openclaw/workspace
~/.openclaw/openclaw.json
~/.openclaw/workspace

Step 2: Run the onboarding wizard (local gateway)

Run the interactive wizard:
openclaw onboard --flow quickstart

If you already know you want a remote gateway, use:
openclaw onboard --flow manual --mode remote --remote-url wss://gateway-host:18789

During the wizard:

  • Pick a provider/model (for example, OpenAI or a custom endpoint).
  • Accept the suggested defaults unless your org requires custom ports or auth.

If you need a fully non-interactive run (for CI or automation), adapt one of the examples in the official docs, e.g.:
openclaw onboard --non-interactive --auth-choice custom-api-key \
--custom-base-url "https://llm.example.com/v1" \
--custom-model-id "foo-large" \
--custom-api-key "$CUSTOM_API_KEY" \
--secret-input-mode plaintext --custom-compatibility openai

Copyable commands
openclaw onboard --flow quickstart
openclaw onboard --flow manual --mode remote --remote-url wss://gateway-host:18789
openclaw onboard --non-interactive --auth-choice custom-api-key \ --custom-base-url "https://llm.example.com/v1" \ --custom-model-id "foo-large" \ --custom-api-key "$CUSTOM_API_KEY" \ --secret-input-mode plaintext --custom-compatibility openai

Step 3: Run health checks with `openclaw doctor`

Run:
openclaw doctor

If issues are reported, let the CLI apply safe fixes:
openclaw doctor --repair

When you want a deeper scan (sandbox, channels, cron, secrets):
openclaw doctor --deep

You should continue only when doctor reports healthy status or warns only about items you understand and accept.

Copyable commands
openclaw doctor
openclaw doctor --repair
openclaw doctor --deep

Step 4: Create and inspect your first agent

List existing agents:
openclaw agents list

Create a new agent workspace:
openclaw agents add work --workspace ~/.openclaw/workspace-work

Inspect bindings (how channels map to agents):
openclaw agents bindings

If you already have a main workspace and just want to set identity:
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity

Copyable commands
openclaw agents list
openclaw agents add work --workspace ~/.openclaw/workspace-work
openclaw agents bindings
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity

Continue to the next module

Turn the commands on this page into your team runbook.

OpenClaw Module 1: Setup & First Agent | BestClaw