# config.example.yml — 配置模板:与 server/config.js 的 DEFAULTS 一一对应。 # 复制为 config.yml 即可启动;platforms 为空则无模型可用,可在前端设置页添加后重启。 # 模型平台池:每平台 {name, url, type?, models:[{id, ...}], keys:[{api_key, concurrency?}]}。 platforms: [] # 模型 profile:prompt + tools 白名单组合,模型用 profile: <名> 引用(不配 = 全量)。 model_profiles: mini: # 小模型:只留核心工具,省上下文 tools_allow: [read_file, write_file, edit_file, terminal, fetch, web_search, get_skill_info, run_skill] system_prompt_file: mini-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 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: idle_release_ms: 180000 # 无人观看超时释放(ms) active_max_ms: 1800000 # 有人观看最长保持(ms) sweep_ms: 10000 # 租约巡检间隔(ms) 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)