
# OpenClaw

[OpenClaw](https://openclaw.ai/) is an open-source personal agent that
runs on your machine and answers from chat apps, a terminal or a
schedule. It takes custom model providers in its config file.

Verified against OpenClaw **2026.9.6**. The config below is re-run
against that release every week, including a tool call round trip.

## Install

OpenClaw needs Node.js 24.16 or later; the install fails on older
versions.

```bash
npm install -g openclaw@2026.9.6
```

## Configure

Add LowRouter as a provider in `~/.openclaw/openclaw.json` and make
one of its models the default:

<!-- verify: openclaw-config -->
```json
{
  "models": {
    "mode": "merge",
    "providers": {
      "lowrouter": {
        "baseUrl": "https://api.lowrouter.ai/v1",
        "apiKey": "${LOWROUTER_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "auto/mistralai/mistral-large-2512",
            "name": "Mistral Large (LowRouter)",
            "contextWindow": 256000,
            "maxTokens": 8192
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "lowrouter/auto/mistralai/mistral-large-2512" }
    }
  }
}
```

`${LOWROUTER_API_KEY}` is read from the environment when OpenClaw
starts, so the key stays out of the file:

```bash
export LOWROUTER_API_KEY=sk-lr-...
openclaw config validate
openclaw agent --local --message "What is in my workspace?"
```

`--local` runs one agent turn in the terminal without the OpenClaw
gateway service; the same config serves the gateway and chat apps.

Details of this config:

- OpenClaw checks the file against a strict schema and refuses to
  start on a key it does not know. Run `openclaw config validate`
  after editing; it names the offending key.
- The default model is `lowrouter/` followed by the LowRouter model
  ID. OpenClaw splits on the first slash only, so the slashes inside
  the ID are fine.
- `baseUrl` ends in `/v1`. OpenClaw appends only `/chat/completions`.
- `maxTokens` caps the answer length OpenClaw asks for (sent as
  `max_completion_tokens`). Without it OpenClaw asks for 8,192.
  `contextWindow` is what it plans compaction around; set it to the
  model's real context window from the model browser.
- `mode: "merge"` keeps OpenClaw's built-in providers next to
  LowRouter. Each additional LowRouter model is another entry in
  `models`.
- The agent's file tools work inside its workspace,
  `~/.openclaw/workspace`, not the directory you run it from.

## Picking a model

OpenClaw's agent acts through function calling, so pick a model with
the *function-calling* tag. [The model browser filtered to
them](/models?function_calling=yes) lists every one.

The example uses `auto/mistralai/mistral-large-2512`, served from
the EU (256k context). Models we have run through OpenClaw's tool
loop:

- `auto/qwen/qwen3-coder-30b-a3b-instruct`, a coding model served
  from the EU (128k context).
- `auto/anthropic/claude-haiku-4.5`, a cheaper Anthropic model
  (200k context).

## Recommended setup

- Use a dedicated key. OpenClaw can wake itself on a schedule and act
  on incoming messages, so it can spend while you are away; a key of
  its own shows that spend separately and can be revoked on its own.
- Give each LowRouter model its real `contextWindow` and a
  `maxTokens` within the model's output limit.

## Troubleshooting

- "The selected model was not found by the provider" with a `404`:
  `baseUrl` is missing `/v1`. The request went to a path LowRouter
  does not serve, and OpenClaw reports that as an unknown model.
- OpenClaw will not start after an edit: run `openclaw config
  validate`. A misspelled key is rejected outright.
- A `400` about output tokens: the model's output limit is lower than
  `maxTokens` (or the 8,192 default). Lower `maxTokens` for that
  model entry.
- The agent cannot find a file you mention: put it in
  `~/.openclaw/workspace`.
