Where it lives
The config file is the single source of truth for how your agent behaves. On most installs it sits in the OpenClaw data directory — on Linux and macOS that's usually ~/.openclaw/config.json, on Windows under your user profile. If that path is wrong for your version, openclaw config list will show you the current values and where they're stored.
Model provider
This is the setting that matters most to your wallet. It defines which model the agent talks to, and the choice changes both quality and cost. The usual options are an Anthropic or OpenAI key for the strong hosted models, or a local endpoint like Ollama if you want zero per-token cost.
{
"model": {
"provider": "anthropic",
"model": "claude-sonnet-4-5"
}
}
Spend five minutes here before committing. A more expensive model doesn't always mean a better agent for your use case — for simple scheduling and summaries, a mid-tier model is often indistinguishable from the top one and costs a fraction.
Channels
Channels are how you talk to the agent — Telegram, Discord, WhatsApp, the CLI, and so on. Each one needs its own token or auth and an enabled flag. This is also where people leave an integration half-wired: they set the token and forget the flag, then wonder why the bot is silent.
{
"channels": {
"telegram": { "botToken": "...", "enabled": true },
"cli": { "enabled": true }
}
}
Permissions
This is the section I'd read twice. It controls how much the agent is allowed to do on your machine — whether it can write files, run shell commands, or touch the network. The safe default is sandboxed, and I'd keep it that way until you have a concrete reason to widen it. A full-access agent that also has a public chat channel is how people get burned.
{
"permissions": {
"sandbox": true
}
}
For more on keeping the boundary sane, see the gateway security guide.
Editing safely
Two rules that have saved me repeatedly. First, back up the file before you touch it — it's one copy command, and a bad JSON edit will stop the agent from starting. Second, validate your JSON. A trailing comma is the classic killer. If the agent won't start after an edit, run the config through any JSON linter and the mistake is usually obvious. Restart after every change; the config is read at startup, not live.