快速开始
配置
PROFILE.md、SOUL.md、downcity.json 与运行目录配置说明
配置
一个 Agent 项目的核心配置由 3 部分组成:
PROFILE.md:Agent 角色与行为边界(必需)SOUL.md:稳定执行原则(可选)downcity.json:运行时配置(必需)
downcity.json 关键字段
start(仅高级场景)
town agent start 的端口由 console 自动分配。
因此常规场景不需要在项目 downcity.json 配置 start.port。
仅在你手动运行前台 runtime 或调试特殊网络绑定时,才考虑配置:
{
"start": {
"host": "0.0.0.0"
}
}execution
agent 绑定模型 ID:
{
"execution": {
"type": "api",
"modelId": "quality"
}
}说明:
- 当前项目 runtime 通过
execution.modelId绑定模型 modelId应该对应已连接 City AIService 暴露的模型- 对当前项目 runtime 路径,
execution.type应写为api - provider secrets 和 provider 连接细节不写进项目配置
plugins.chat
聊天通道与队列控制:
{
"plugins": {
"chat": {
"queue": {
"maxConcurrency": 2,
"mergeDebounceMs": 600,
"mergeMaxWaitMs": 2000
},
"channels": {
"telegram": {
"enabled": true,
"channelAccountId": "telegram-main"
}
}
}
}
}channelAccountId 会绑定到 ~/.downcity/downcity.db 的全局 bot 账户池(channel_accounts)。
plugins.chat.queue 说明:
maxConcurrency:不同 chatKey lane 的全局并发上限。mergeDebounceMs:连续入站消息的短防抖窗口,窗口内消息会尽量并入同一次 run。mergeMaxWaitMs:合并等待的硬上限,避免持续来消息导致无限延迟。
plugins.skill
配置 skills 扫描目录:
{
"plugins": {
"skill": {
"enabled": true,
"paths": [".agents/skills"],
"allowExternalPaths": false
}
}
}plugins.*
插件配置现在写在项目 downcity.json 里。
例如 asr:
town asr on SenseVoiceSmall
town config get plugins.asr常用命令
town config get
town config get execution.modelId
town city status
town config unset plugins.chat.channels.telegram