Files
agent/app/config.example.yml
T

81 lines
5.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# config.example.yml — 配置模板:与 server/config.js 的 DEFAULTS 一一对应。
# 复制为 config.yml 即可启动;platforms 为空则无模型可用,可在前端设置页添加后重启。
# 模型平台池:每平台 {name, url, type?, models:[{id, ...}], keys:[{api_key, concurrency?}]}。
platforms: []
# 全局工具黑名单:profile 未配 tools_deny 时继承它;allow 先、deny 后叠加(deny 赢,与 mcp_servers 同构)。
# 写数组即整体覆盖默认值,写 [] 即清空。默认屏蔽元工具 lab 与阶段出口 handoff(后者仅 advising 显式清空后可见)。
tools_deny: [lab, handoff]
# 模型 profile:prompt + tools 名单组合,模型用 profile: <名> 引用(不配 = 全量)。
# 内置 advising 不靠引用:会话处于 advising 阶段(顾问澄清需求/规划)时强制命中,见 server/engine.js resolveProfileName。
model_profiles:
advising: # 顾问阶段:只聊和读不写,唯一出口 handoff,配专属提示词
tools_allow: [read_file, fetch, handoff]
tools_deny: [] # 必须显式清空全局黑名单,否则 handoff 自己也被 deny(同 lab 的教训)
system_prompt_file: advising-system.txt
lab: # 统一入口自测:tools 只有 lab,其余能力经 lab(help) 现场发现
tools_allow: [lab]
tools_deny: [] # 必须显式清空全局黑名单,否则 lab 自己也被 deny → 零工具
system_prompt_file: lab-system.txt # 相对 server/templates/(也接受绝对路径)
zero: # 纯文本对话:一个工具都不发
tools_allow: []
system_prompt_file: zero-system.txt
port: 8090 # 服务监听端口
workspace_root: "/workspace/tasks" # 任务工作区根目录,AI 文件操作限制在此
data_root: "/workspace/data" # 数据根目录:SQLite 与 prompt dump
db_path: "" # 留空取 data_root/.agent.db
log_level: "info" # debug < info < warn < error < none
executor: # 独立命令执行服务;两侧需同路径挂载 tasks/skills
url: "" # 非空走远端执行;留空读 env EXECUTOR_URL 或本地 spawn
token: "" # 与 executor 侧同值;留空读 env EXECUTOR_TOKEN
wxbot: # 微信接入(可选;仓库 wxbot/ 子项目,只挂内网,不入 git)
url: "" # 非空才启用;留空读 env WXBOT_URL(compose 注 http://wxbot:8093);
# 留空 = 功能整体静默关闭;填了但 wxbot 没起也不报错,设置页显示未连接
token: "" # core ↔ wxbot 共享服务 token,两侧同值;留空读 env WXBOT_TOKEN
terminal:
default_timeout_ms: 30000 # 命令默认超时(ms)
max_output_chars: 10000 # 回传模型的最大输出字符数
fetch:
timeout_ms: 30000 # 抓取总超时(ms),覆盖响应头到 body 读完
max_bytes: 1048576 # 单次响应最多抓多少字节,超限即断开
agent:
temperature: 1.0 # 采样温度
max_tool_iterations: 100 # 单轮最大迭代数(含工具调用)
max_retries: 2 # 上游失败重试次数
language: "Simplified Chinese" # 强制回复语言;留空不限
auto_compress_tokens: 60000 # In token 超此值弹「自动压缩」提议;0=关
upload:
image_compress_threshold_kb: 1536 # 大图压缩提示阈值(KB)
image_max_dim: 2000 # 压缩后长边上限(px)
image_quality: 0.85 # JPEG 质量
confirm_size_mb: 10 # 任意文件二次确认阈值(MB)
skills:
skills_root: "" # 留空取 workspace_root 同级 skills 目录
timeout_ms: 120000 # 单个技能执行超时(ms)
# 旧版 model_hold(模型保持租约)已废弃删除:key 不再独占也不排队,回合结束后的 held 不再自动到期。
auth: # users 留空 = 不启用登录认证
secret: "" # 登录态签名密钥;留空则每次重启随机(需重新登录)
ttl_ms: 2592000000 # 登录态有效期(ms,默认 30 天)
users:
- user: admin # 默认账号
password: "admin" # 默认密码,请务必修改
# 外部 MCP 服务列表:每项 {name?, url, headers?, enable?(默认 true), timeout_ms?, tools_allow?, tools_deny?}。
mcp_servers: []
public_link:
base_url: "" # 留空关闭 mint_public_link;填本服务对外地址
ttl_ms: 1800000 # 链接有效期(ms)