Skip to content

Configuration

Config file: ~/.ringclaw/config.json

Config-only: All configuration is sourced exclusively from ~/.ringclaw/config.json. Previously supported environment variables (RC_*, RINGCLAW_*, OPENCLAW_GATEWAY_*) are silently ignored. Use ringclaw setup to generate the file interactively, or edit it by hand.

Full Configuration Example

json
{
  "default_agent": "claude",
  "agent_workspace": "/home/user/my-project",
  "agent_allow_workspace_list": ["/home/user/my-project", "/home/user/notes"],
  "api_addr": "127.0.0.1:18010",
  "log_level": "info",
  "log_format": "color",
  "full_access_ack": false,

  "ringcentral": {
    "server_url": "https://platform.ringcentral.com",
    "client_id": "",
    "client_secret": "",
    "jwt_token": "",
    "bot_token": "your_bot_token",
    "group_mention_only": true,
    "chat_ids": ["chat_id_1", "chat_id_2"],
    "source_user_ids": ["alice@example.com"],
    "group_summary_group_id": "1234567",
    "group_summary_message_limit": 200
  },

  "heartbeat": {
    "enabled": true,
    "interval": "30m",
    "active_hours": "09:00-18:00",
    "timezone": "Asia/Shanghai"
  },

  "cron": { "enabled": true },

  "openclaw_gateway": {
    "url": "wss://openclaw-gateway.example.com",
    "token": "openclaw-token",
    "password": ""
  },

  "persona": {
    "enabled": true,
    "soul_file": "~/.ringclaw/SOUL.md",
    "memory_dir": "~/.ringclaw/memory",
    "max_soul_chars": 2000,
    "max_chat_memory_chars": 4000,
    "max_user_memory_chars": 2000,
    "max_global_memory_chars": 2000
  },

  "agents": {
    "claude": {
      "type": "acp",
      "command": "/usr/local/bin/claude-agent-acp",
      "model": "sonnet",
      "aliases": ["ai"],
      "allow_write": true,
      "env": { "ANTHROPIC_API_KEY": "sk-xxx" }
    },
    "codex": {
      "type": "acp",
      "command": "/usr/local/bin/codex-acp",
      "full_access": true
    },
    "gpt": {
      "type": "http",
      "endpoint": "https://api.openai.com/v1/chat/completions",
      "api_key": "sk-xxx",
      "model": "gpt-4o-mini",
      "format": "openai",
      "max_history": 20,
      "timeout": 120,
      "aliases": ["4o", "openai"]
    }
  }
}

Top-level Fields

FieldTypeDefaultAllowed values / Notes
default_agentstringauto-detectedName of any key in agents. When empty or missing, auto-detection picks by priority: claude, codex, cursor, kimi, gemini, opencode, openclaw, pi, copilot, droid, iflow, kiro, qwen, augment.
agent_workspacestringAbsolute path. Default cwd for agents, implicitly added to the cwd allowlist.
agent_allow_workspace_liststring[][]Absolute paths. /cwd and Agent.SetCwd may only target directories inside this list. ~/.ringclaw/workspace and agent_workspace are always implicitly merged in.
api_addrstring127.0.0.1:18010host:port. Do NOT bind to 0.0.0.0; see Security.
log_levelstringinfoOne of debug, info, warn (alias warning), error.
log_formatstringtextOne of text, json, color.
full_access_ackbool (nullable)omittedtrue to allow ACP agents with full_access: true; false to explicitly refuse even if full_access: true is set. When omitted, treated as false.
agentsobjectSee Agents. At least one agent is required to start.
ringcentralobjectSee ringcentral.
heartbeatobjectSee heartbeat.
cronobjectSee cron.
openclaw_gatewayobjectSee openclaw_gateway.
personaobjectOptional SOUL + layered MEMORY banner injected before every user message. See persona.

ringcentral

FieldTypeDefaultAllowed values / Notes
bot_tokenstringRequired. RingCentral Public Bot access token.
chat_idsstring[][]Required. Chat IDs the bot is allowed to receive messages from.
source_user_idsstring[][]Trusted senders. Accepts numeric extension IDs, emails, or E.164 phone numbers. Empty + Private App configured → owner-only. Empty + no Private App → deny all.
group_mention_onlybool (nullable)truetrue requires @bot in group chats (bot DMs are never affected); false answers every message in allowed group chats.
bot_mention_onlybool (nullable)Deprecated alias for group_mention_only. Still accepted for backward compatibility: Load() migrates it into the new field and logs a WARN. Will be removed in a future release.
server_urlstringSDK default (https://platform.ringcentral.com)RingCentral API server URL.
client_idstringPrivate App Client ID. All three Private App fields must be set together.
client_secretstringPrivate App Client Secret. Redacted in logs.
jwt_tokenstringPrivate App JWT. Redacted in logs.
group_summary_group_idstringGroup chat ID allowed to use current-group summarize. Empty disables the feature.
group_summary_message_limitint200Messages fetched per group-summarize call. <= 0 falls back to default.

heartbeat

FieldTypeDefaultAllowed values / Notes
enabledboolfalseMaster switch.
intervalstring30mGo duration: 45s, 30m, 2h. Must be positive.
active_hoursstringHH:MM-HH:MM (hours 00-23, minutes 00-59). Use 22:00-06:00 for over-midnight. Empty = 24/7.
timezonestringhost localIANA timezone, e.g. Asia/Shanghai, UTC.

cron

FieldTypeDefaultAllowed values / Notes
enabledbooltrue when cron jobs existMaster switch for the scheduler.

openclaw_gateway

Connection info for the auto-detected external openclaw agent. When url is empty, ringclaw falls back to reading ~/.openclaw/openclaw.json.

FieldTypeDefaultAllowed values / Notes
urlstringws://, wss://, http://, or https:// URL.
tokenstringBearer token. Used when the gateway expects token auth.
passwordstringPassword. Used when the gateway expects password auth.

persona

Optional. When enabled, RingClaw prepends a fixed persona + memory banner to every WebSocket-path user message. The banner is assembled from local files, so switching agents (/cc/cx) or resetting sessions (/new) never wipes the operator's curated context.

Three memory scopes are layered in the banner (all off-by-default — new files only appear when you write them with /mem add):

ScopeFileWhat to put there
global<memory_dir>/global.mdFacts shared across every chat (team conventions, codebase-wide rules)
user<memory_dir>/user/<userID>.mdPer-user preferences that should follow the user across chats
chat<memory_dir>/chat/<chatID>.mdFacts specific to one chat (sprint goal, project context)

SOUL.md is created automatically on first boot if the file does not exist (minimal neutral template — edit it to shape the assistant's voice).

FieldTypeDefaultAllowed values / Notes
enabledbool (nullable)trueSet to false to disable banner injection entirely (persona/memory slash commands then return a "feature disabled" diagnostic).
soul_filestring~/.ringclaw/SOUL.mdPath to the shared persona file. ~/ is expanded.
memory_dirstring~/.ringclaw/memoryRoot of the memory tree. <memory_dir>/global.md, <memory_dir>/user/*.md, <memory_dir>/chat/*.md.
max_soul_charsint2000Truncate SOUL.md before injection. ≤ 0 disables truncation.
max_chat_memory_charsint4000Per-chat memory cap. Tail-keep on overflow.
max_user_memory_charsint2000Per-user memory cap. Tail-keep.
max_global_memory_charsint2000Global memory cap. Tail-keep.

Manage the banner from chat:

text
/mem add project uses Go 1.25 and TypeScript strict-mode      # → current chat memory
/mem add user  prefers terse Chinese replies                  # → per-user memory
/mem add global engineering team is 8 people                  # → cross-chat memory
/mem show                  # show current chat memory
/mem show user             # show user memory
/mem del                   # shows file path, size, tail preview + /new hint
/mem del confirm           # actually clear (irreversible; agent session not reset)
/persona                   # show SOUL.md (read-only here; edit the file directly)

/mem add and /mem del are privileged commands (same Layer 1 gate as /cron); /mem show and /persona are read-only and available to any trusted sender. /mem del does not automatically reset agent sessions — the persona banner is rebuilt from disk on the next message, but in-flight sessions still carry the old memory in their context. Run /new after a clear if you want the live agent to forget too. Cron / heartbeat / HTTP API do not receive the banner — it only applies to WebSocket-path user messages. See Security › Permission Matrix.

Agents

Keys under agents are free-form agent names (e.g. claude, codex, gpt). Each value is an AgentConfig plus type-specific extras below.

AgentConfig common fields

FieldTypeDefaultAllowed values / Notes
typestringRequired. One of acp, cli, http.
commandstringRequired for acp/cli. Absolute path or binary name in PATH.
argsstring[][]Extra CLI arguments (e.g. ["acp"], ["--experimental-acp"]).
aliasesstring[][]Custom trigger words, e.g. ["gpt", "4o"].
cwdstringAgent working directory. Must satisfy agent_allow_workspace_list.
envobject{}Extra env vars passed to the agent subprocess (not to ringclaw itself).
modelstringagent-specificModel name. Defaults: claude → sonnet, openclaw → openclaw:main, HTTP fallback → gpt-4o-mini.
system_promptstringSystem prompt injected at session start.

ACP-specific (type: acp)

FieldTypeDefaultAllowed values / Notes
allow_writeboolfalseGrant the ACP fs capability (agent may write files).
full_accessboolfalseCall session/set_mode "full-access" on every new session. Requires full_access_ack: true at the top level, otherwise downgraded with a WARN.

HTTP-specific (type: http)

FieldTypeDefaultAllowed values / Notes
endpointstringFull API URL.
api_keystringSent as Authorization: Bearer ... or the format-specific header.
headersobject{}Extra HTTP headers.
formatstringopenaiOne of openai, nanoclaw, dify. Unknown values fall back to openai.
max_historyint20Only used by openai format.
senderstringOnly used by nanoclaw format.
context_modestringOnly used by nanoclaw format; forwarded verbatim to upstream.
group_jidstringOnly used by nanoclaw format.
timeoutint (seconds)120HTTP client timeout. <= 0 falls back to default.

CLI-specific (type: cli)

CLI agents have no extra fields beyond the common ones (command, args, cwd, env, model, system_prompt).