配置说明
配置文件位置
默认配置文件:
text
~/.clawgo/config.json调试模式下:
text
.clawgo/config.json顶层结构
当前真实顶层结构是:
agentschannelsmodelsgatewaycrontoolsloggingsentinelmemory
normalized view
虽然落盘文件还是 raw config,但部分接口会提供 normalized view:
core.default_providercore.default_modelcore.main_agent_idcore.subagentsruntime.routerruntime.providers
这里要注意:当前 normalized 核心字段仍然是 core.subagents,不是 core.agents。
agents.defaults
关键字段:
workspacemodel.primarymax_tokenstemperaturemax_tool_iterationsheartbeatcontext_compactionexecutionsummary_policy
model.primary 的格式是:
text
provider/model例如:
json
{
"model": {
"primary": "codex/gpt-5.4"
}
}agents.router
当前 router 负责把用户请求派给 main 和各个 subagent。
关键字段:
enabledmain_agent_idstrategypolicy.intent_max_input_charspolicy.max_rounds_without_userrulesallow_direct_agent_chatmax_hopsdefault_timeout_secsticky_thread_owner
agents.communication
负责 agent 间线程化消息协作。
字段:
modepersist_threadspersist_messagesmax_messages_per_threaddead_letter_queuedefault_message_ttl_sec
agents.subagents
这是当前最重要的角色配置区域。
常见字段:
enabledtypetransportparent_agent_idnotify_main_policydisplay_nameroledescriptionsystem_prompt_filememory_namespaceaccept_fromcan_talk_torequires_main_mediationdefault_reply_totools.allowlisttools.denylisttools.max_parallel_callsruntime.providerruntime.modelruntime.temperatureruntime.timeout_secruntime.max_retriesruntime.retry_backoff_msruntime.max_task_charsruntime.max_result_charsruntime.max_parallel_runs
当前约束:
- 启用中的本地 subagent 必须配置
system_prompt_file system_prompt_file必须是 workspace 内相对路径accept_from/can_talk_to需要引用已存在的 subagent
models.providers
provider 配置在:
json
{
"models": {
"providers": {}
}
}常见字段:
api_keyapi_basemodelssupports_responses_compactauthtimeout_secruntime_persistruntime_history_fileruntime_history_maxoauthresponses
auth 允许:
beareroauthhybridnone
tools.mcp
当前支持:
stdiohttpstreamable_httpsse
server 级字段常见有:
enabledtransportcommandargsurlworking_dirpermissionpackage
一个最小原始结构
json
{
"agents": {
"router": {
"enabled": true,
"main_agent_id": "main",
"strategy": "rules_first",
"rules": []
},
"subagents": {
"main": {
"enabled": true,
"type": "router",
"role": "orchestrator",
"system_prompt_file": "agents/main/AGENT.md"
},
"coder": {
"enabled": true,
"type": "worker",
"role": "code",
"system_prompt_file": "agents/coder/AGENT.md"
}
}
},
"models": {
"providers": {
"openai": {
"api_key": "YOUR_KEY",
"api_base": "https://api.openai.com/v1",
"models": ["gpt-5.4"],
"auth": "bearer"
}
}
}
}