Configuration
Config File Location
Default config file:
text
~/.clawgo/config.jsonIn debug mode, it switches to:
text
.clawgo/config.jsonLoad strategy:
- start from
DefaultConfig() - read JSON
- use strict decoding, so unknown fields fail
- apply environment variable overrides for fields with
envtags
Top-Level Structure
The top-level Config includes:
agentschannelsprovidersgatewaycrontoolsloggingsentinelmemory
agents
agents.defaults
Global defaults that shape runtime behavior.
Important fields:
workspaceproxyproxy_fallbacksmax_tokenstemperaturemax_tool_iterationsheartbeatcontext_compactionexecutionsummary_policy
context_compaction
enabledmodetrigger_messageskeep_recent_messagesmax_summary_charsmax_transcript_chars
Supported mode values:
summaryresponses_compacthybrid
If you use responses_compact, the active provider must declare supports_responses_compact: true.
execution
run_state_ttl_secondsrun_state_maxtool_parallel_safe_namestool_max_parallel_calls
This controls tool concurrency and runtime state retention.
agents.router
The router supports keyword-based dispatch from the main agent.
Important fields:
enabledmain_agent_idstrategypolicy.intent_max_input_charspolicy.max_rounds_without_userrulesallow_direct_agent_chatmax_hopsdefault_timeout_secdefault_wait_replysticky_thread_owner
Supported strategy values:
rules_firstround_robinmanual
agents.subagents
Each subagent is an independently declared item.
Common fields:
enabledtypetransportnode_idparent_agent_idnotify_main_policydisplay_namerolesystem_promptsystem_prompt_filememory_namespaceaccept_fromcan_talk_totools.allowlisttools.denylistruntime.*
Notes:
- enabled local subagents should normally define
system_prompt_file - node-backed branches require
transport: "node",node_id, andparent_agent_id
channels
Supported channel configs:
telegramdiscordfeishudingtalkwhatsappqqmaixcam
Shared dedupe settings:
inbound_message_id_dedupe_ttl_secondsinbound_content_dedupe_window_secondsoutbound_dedupe_window_seconds
tools.mcp
Fields:
enabledrequest_timeout_secservers
Per-server fields:
enabledtransportcommandargsenvworking_dirdescriptionpackage
The current implementation only supports:
text
transport = "stdio"See MCP Integration for details.
providers
Structured as:
providers.proxyproviders.proxies.<name>
Fields:
api_keyapi_basemodelssupports_responses_compactauthtimeout_secresponses
gateway
hostporttoken
Default port is 18790.
Validation
Run:
bash
clawgo config checkThe validator checks:
- numeric bounds
- provider existence
- fallback validity
- router rules referencing existing agents
- required credentials for enabled channels
- compatibility of
responses_compact