This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the OpenClaw configuration directory (~/.openclaw). The main configuration file is openclaw.json.
The openclaw.json file controls:
- Agents: Defined in
agents.list- each agent has its own workspace and skills - Channels: Telegram, iMessage, Feishu - with multi-account support
- Bindings: Route agents to specific channel accounts
- Models: Zai (GLM-5, GLM-4.7) provider configuration
- Gateway: Port, auth, control UI settings
Important: Always validate JSON syntax after editing. OpenClaw creates backups automatically (.bak files).
openclaw.json- Main configuration fileagents/- Agent-specific directories (main, coding)workspace/- SKIP - Default agent workspace (contains skills, memory, identity docs)workspace-coding/- SKIP - Coding agent workspacelogs/- Gateway and agent logstelegram/- Telegram runtime data (sticker cache, etc.)
# Start the gateway (runs all configured channels)
openclaw gateway
# Check channel status
openclaw channels status
# View logs
openclaw logs --follow
# Edit configuration (opens in $EDITOR)
openclaw config edit
# Validate configuration
openclaw doctorEach agent has its own workspace with isolated sessions:
- main →
$HOME/.openclaw/workspace/
Most configuration changes require gateway restart:
- Stop the gateway (Ctrl+C or kill process)
- Edit
openclaw.json - Restart with
openclaw gateway
Some channel settings support hot-reload via openclaw channels reload.
Always validate configuration changes before starting the gateway:
# Check configuration syntax and validate settings
openclaw doctor
# Check specific channel status
openclaw channels status
# View logs for validation errors
openclaw logs --followRun openclaw doctor after editing openclaw.json to catch schema errors, invalid bindings, or misconfigured channels before restart.
Uses Zai provider with GLM models:
- Primary:
zai/glm-5(alias: "GLM") - Fallback:
zai/glm-4.7,zai/glm-4.7-flash
Model configuration is in models.providers.zai.
OpenClaw documentation is installed with the package. Use these general paths to find authoritative information:
- Channel Documentation:
/opt/homebrew/lib/node_modules/openclaw/docs/channels/- Individual channel guides (telegram.md, imessage.md, feishu.md, etc.)
- Channel-specific configuration examples and troubleshooting
- Configuration Reference:
/opt/homebrew/lib/node_modules/openclaw/docs/gateway/- Full schema reference for gateway and channel settings
- Multi-agent routing and binding patterns
- Type Definitions:
/opt/homebrew/lib/node_modules/openclaw/dist/plugin-sdk/config/- TypeScript definitions for all configuration schemas
When updating configuration patterns, search these directories for current examples and syntax.