跳转至

Echo Agent 配置参考

本表的 default 列是配置 schema 的字段默认值,不一定是加载后的生效值。包内 echo_agent/config/default.yaml 会覆盖其中部分字段;例如未提供用户配置时,execution.defaultExecutor 生效为 local,execution.networkPolicy 生效为 allow。tools.exec.host 另有独立默认值 sandbox,决定执行类工具使用的后端。要查看当前环境的最终配置,请运行 echo-agent config dump。

security

字段 snake type default choices 说明
security.profile security.profile Literal personal_cli personal_cli/daemon/public_gateway 整体安全档位预设

channels

字段 snake type default choices 说明
channels.telegram.enabled channels.telegram.enabled bool false — 是否启用 Telegram 通道
channels.telegram.token channels.telegram.token str "" — Telegram Bot API token
channels.telegram.allowFrom channels.telegram.allow_from list [] — 允许与机器人交互的用户白名单(空为不限制)
channels.telegram.proxy channels.telegram.proxy str None null —
channels.telegram.groupPolicy channels.telegram.group_policy Literal mention open/mention 群聊响应策略:open 全部响应,mention 仅被@时响应
channels.telegram.reactionsEnabled channels.telegram.reactions_enabled bool true — 是否对消息添加表情回应
channels.telegram.dataDir channels.telegram.data_dir str "" — Telegram 状态持久化目录(存 long-poll offset,防重启后重复拉取);缺省 ~/.echo-agent/data/telegram
channels.discord.enabled channels.discord.enabled bool false — 是否启用 Discord 通道
channels.discord.token channels.discord.token str "" — Discord Bot token
channels.discord.allowFrom channels.discord.allow_from list [] — 允许与机器人交互的用户白名单(空为不限制)
channels.discord.groupPolicy channels.discord.group_policy Literal mention open/mention 群聊响应策略:open 全部响应,mention 仅被@时响应
channels.discord.reactionsEnabled channels.discord.reactions_enabled bool true — 是否对消息添加表情回应
channels.webhook.enabled channels.webhook.enabled bool false — 是否启用 Webhook 通道
channels.webhook.host channels.webhook.host str 0.0.0.0 — Webhook 服务监听地址
channels.webhook.port channels.webhook.port int 8080 — Webhook 服务监听端口
channels.webhook.secret channels.webhook.secret str "" — 校验入站请求签名的密钥
channels.webhook.path channels.webhook.path str /webhook — Webhook 接收路径
channels.webhook.maxPending channels.webhook.max_pending int 1000 — 待处理 webhook 请求队列上限
channels.cli.enabled channels.cli.enabled bool true — 是否启用命令行通道
channels.cron.enabled channels.cron.enabled bool false — 是否启用定时任务通道
channels.slack.enabled channels.slack.enabled bool false — 是否启用 Slack 通道
channels.slack.botToken channels.slack.bot_token str "" — Slack bot token(xoxb-)
channels.slack.appToken channels.slack.app_token str "" — Slack app-level token(xapp-),用于 Socket 模式
channels.slack.allowFrom channels.slack.allow_from list [] — 允许与机器人交互的用户白名单(空为不限制)
channels.slack.reactionsEnabled channels.slack.reactions_enabled bool true — 是否对消息添加表情回应
channels.whatsapp.enabled channels.whatsapp.enabled bool false — 是否启用 WhatsApp 通道
channels.whatsapp.verifyToken channels.whatsapp.verify_token str "" — WhatsApp webhook 验证 token
channels.whatsapp.accessToken channels.whatsapp.access_token str "" — WhatsApp Cloud API 访问令牌
channels.whatsapp.phoneNumberId channels.whatsapp.phone_number_id str "" — WhatsApp 发送号码 ID
channels.whatsapp.webhookPath channels.whatsapp.webhook_path str /whatsapp — WhatsApp webhook 接收路径
channels.whatsapp.host channels.whatsapp.host str 0.0.0.0 — WhatsApp 服务监听地址
channels.whatsapp.port channels.whatsapp.port int 8081 — WhatsApp 服务监听端口
channels.whatsapp.appSecret channels.whatsapp.app_secret str "" — WhatsApp App Secret(用于 webhook HMAC 签名验证)
channels.whatsapp.allowFrom channels.whatsapp.allow_from list [] — 允许交互的用户白名单(空为不限制)
channels.whatsapp.groupPolicy channels.whatsapp.group_policy str mention — 群聊响应策略:all=响应所有消息,mention=仅响应@机器人
channels.weixin.enabled channels.weixin.enabled bool false — 是否启用微信(个人客服)通道
channels.weixin.accountId channels.weixin.account_id str "" — 微信客服账号 ID
channels.weixin.token channels.weixin.token str "" — 微信接入鉴权 token
channels.weixin.baseUrl channels.weixin.base_url str https://ilinkai.weixin.qq.com — 微信 API 基础地址
channels.weixin.cdnBaseUrl channels.weixin.cdn_base_url str https://novac2c.cdn.weixin.qq.com/c2c — 微信媒体 CDN 基础地址
channels.weixin.allowFrom channels.weixin.allow_from list [] — 允许与机器人交互的用户白名单(空为不限制)
channels.weixin.dmPolicy channels.weixin.dm_policy str open — 私聊响应策略
channels.weixin.dataDir channels.weixin.data_dir str "" — 微信通道本地数据目录
channels.qqbot.enabled channels.qqbot.enabled bool false — 是否启用 QQ 机器人通道
channels.qqbot.appId channels.qqbot.app_id str "" — QQ 机器人 AppID
channels.qqbot.appSecret channels.qqbot.app_secret str "" — QQ 机器人 AppSecret
channels.qqbot.allowFrom channels.qqbot.allow_from list [] — 允许与机器人交互的用户白名单(空为不限制)
channels.qqbot.sandbox channels.qqbot.sandbox bool false — 是否使用 QQ 沙箱环境
channels.qqbot.markdownSupport channels.qqbot.markdown_support bool true — 是否以 QQ 原生 Markdown(msg_type=2)发送并保留加粗/代码等行内标记。默认开启;若机器人未开通原生 Markdown 权限,首条消息会被拒并自动降级为纯文本重发,该会话后续对该目标直接走纯文本(24 小时后重新探测)。无论开关如何,表格/标题/分隔线都会降级为可读纯文本。关闭则始终发纯文本
channels.qqbot.mediaEnabled channels.qqbot.media_enabled bool true — 是否启用媒体(图片/文件)收发
channels.qqbot.mediaMaxFileSizeMb channels.qqbot.media_max_file_size_mb int 20 — 媒体上传单文件大小上限(MB)
channels.qqbot.mediaUploadCacheSize channels.qqbot.media_upload_cache_size int 500 — 媒体上传结果缓存条目上限
channels.qqbot.mediaParseTags channels.qqbot.media_parse_tags bool true — 是否解析消息中的媒体标签
channels.feishu.enabled channels.feishu.enabled bool false — 是否启用飞书通道
channels.feishu.appId channels.feishu.app_id str "" — 飞书应用 App ID
channels.feishu.appSecret channels.feishu.app_secret str "" — 飞书应用 App Secret
channels.feishu.verificationToken channels.feishu.verification_token str "" — 飞书事件回调验证 token
channels.feishu.encryptionKey channels.feishu.encryption_key str "" — 飞书事件加密密钥
channels.feishu.webhookPath channels.feishu.webhook_path str /feishu — 飞书事件接收路径
channels.feishu.host channels.feishu.host str 0.0.0.0 — 飞书服务监听地址
channels.feishu.port channels.feishu.port int 8083 — 飞书服务监听端口
channels.feishu.groupPolicy channels.feishu.group_policy str mention — 群聊触发策略: mention=仅被@时响应, all=响应所有消息
channels.feishu.botOpenId channels.feishu.bot_open_id str "" — 机器人自身的 open_id,用于群聊 @mention 过滤
channels.dingtalk.enabled channels.dingtalk.enabled bool false — 是否启用钉钉通道
channels.dingtalk.appKey channels.dingtalk.app_key str "" — 钉钉应用 AppKey
channels.dingtalk.appSecret channels.dingtalk.app_secret str "" — 钉钉应用 AppSecret
channels.dingtalk.robotCode channels.dingtalk.robot_code str "" — 钉钉机器人编码
channels.dingtalk.allowFrom channels.dingtalk.allow_from list [] — 允许与机器人交互的用户白名单(空为不限制)
channels.email.enabled channels.email.enabled bool false — 是否启用邮件通道
channels.email.imapHost channels.email.imap_host str "" — 收信 IMAP 服务器地址
channels.email.imapPort channels.email.imap_port int 993 — 收信 IMAP 服务器端口
channels.email.smtpHost channels.email.smtp_host str "" — 发信 SMTP 服务器地址
channels.email.smtpPort channels.email.smtp_port int 465 — 发信 SMTP 服务器端口
channels.email.username channels.email.username str "" — 邮箱登录用户名
channels.email.password channels.email.password str "" — 邮箱登录密码或授权码
channels.email.useSsl channels.email.use_ssl bool true — 是否使用 SSL 连接邮件服务器
channels.email.pollIntervalSeconds channels.email.poll_interval_seconds int 30 — 轮询新邮件的间隔(秒)
channels.email.allowFrom channels.email.allow_from list [] — 允许交互的发件人邮箱白名单(空为不限制)
channels.wecom.enabled channels.wecom.enabled bool false — 是否启用企业微信通道
channels.wecom.corpId channels.wecom.corp_id str "" — 企业微信企业 ID
channels.wecom.agentId channels.wecom.agent_id str "" — 企业微信应用 AgentId
channels.wecom.secret channels.wecom.secret str "" — 企业微信应用 Secret
channels.wecom.token channels.wecom.token str "" — 企业微信回调校验 token
channels.wecom.encodingAesKey channels.wecom.encoding_aes_key str "" — 企业微信加密回调的 EncodingAESKey,留空则为明文模式
channels.wecom.webhookPath channels.wecom.webhook_path str /wecom — 企业微信事件接收路径
channels.wecom.host channels.wecom.host str 0.0.0.0 — 企业微信服务监听地址
channels.wecom.port channels.wecom.port int 8084 — 企业微信服务监听端口
channels.matrix.enabled channels.matrix.enabled bool false — 是否启用 Matrix 通道
channels.matrix.homeserver channels.matrix.homeserver str "" — Matrix homeserver 地址
channels.matrix.userId channels.matrix.user_id str "" — Matrix 机器人用户 ID
channels.matrix.accessToken channels.matrix.access_token str "" — Matrix 访问令牌
channels.matrix.allowRooms channels.matrix.allow_rooms list [] — 允许响应的房间白名单(空为不限制)
channels.matrix.reactionsEnabled channels.matrix.reactions_enabled bool true — 是否对消息添加表情回应
channels.sendProgress channels.send_progress bool true — 是否向用户推送处理进度提示
channels.sendToolHints channels.send_tool_hints bool true — 是否推送工具调用提示
channels.streamChannels channels.stream_channels list ['cli', 'telegram', 'discord', 'slack', 'gateway:*'] — 启用流式增量回复的通道列表
channels.streamFlushChars channels.stream_flush_chars int 180 — 流式回复累计多少字符后推送一段
channels.streamFlushIntervalMs channels.stream_flush_interval_ms int 1500 — 流式回复推送的最大时间间隔(毫秒)
channels.streamParagraphMode channels.stream_paragraph_mode bool true — 是否按段落边界切分流式推送
channels.streamLocalFlushChars channels.stream_local_flush_chars int 24 — 本地通道(cli/gateway)流式推送的字符阈值,0 表示复用通用配置
channels.streamLocalFlushIntervalMs channels.stream_local_flush_interval_ms int 100 — 本地通道(cli/gateway)流式推送的最大时间间隔(毫秒)
channels.streamLocalChannels channels.stream_local_channels list ['cli', 'gateway:*'] — 使用本地低延迟流式档位的通道列表(支持 prefix:* 通配)
channels.streamOptimisticChannels channels.stream_optimistic_channels list ['gateway:cli'] — 允许乐观流式(工具前草稿先发后撤回)的通道列表;仅限能就地重绘的通道
channels.transcriptionApiKey channels.transcription_api_key str "" — 语音转写服务的 API key

models

字段 snake type default choices 说明
models.defaultModel models.default_model str "" — 无匹配路由时使用的默认模型
models.providers models.providers list [] — 模型提供商配置列表
models.providers[].name models.providers[].name str "" — 提供商名称(路由引用此名)
models.providers[].apiKey models.providers[].api_key str "" — 提供商 API 密钥
models.providers[].apiKeyEnv models.providers[].api_key_env str "" — 从指定环境变量读取 API 密钥;用于宿主进程临时注入,避免密钥写入配置文件
models.providers[].apiBase models.providers[].api_base str "" — 提供商 API 基础地址
models.providers[].models models.providers[].models list [] — 该提供商支持的模型列表
models.providers[].extraHeaders models.providers[].extra_headers dict {} — 附加到请求的自定义 HTTP 头
models.providers[].maxRetries models.providers[].max_retries int 3 — 瞬时错误时的最大重试次数(指数退避)
models.providers[].timeoutSeconds models.providers[].timeout_seconds int 120 — 单次请求超时(秒)
models.providers[].streamIncludeUsage models.providers[].stream_include_usage bool true — 流式请求是否附带 stream_options.include_usage(用于统计 token/成本);个别不支持该字段的 OpenAI 兼容端点需设为 false
models.providers[].rateLimitRpm models.providers[].rate_limit_rpm int 0 — 该提供商每分钟请求上限(0 为不限)
models.providers[].credentialPool models.providers[].credential_pool list [] — 轮换使用的多个 API 密钥池
models.routes models.routes list [] — 任务到模型的路由规则列表
models.routes[].model models.routes[].model str "" — 该路由使用的模型名
models.routes[].provider models.routes[].provider str "" — 该路由绑定的提供商名
models.routes[].taskTypes models.routes[].task_types list [] — 命中此路由的任务类型列表
models.routes[].fallbackModels models.routes[].fallback_models list [] — 主模型失败时的回退模型列表
models.routes[].maxTokens models.routes[].max_tokens int 8192 — 该路由生成的最大 token 数
models.routes[].temperature models.routes[].temperature float 0.7 — 该路由的采样温度
models.routes[].contextWindow models.routes[].context_window int 0 — 该路由模型的上下文窗口显式覆盖(0 为不指定,自动按模型解析);优先级高于内置注册表与全局兜底
models.fallbackModel models.fallback_model str "" — 全局兜底模型
models.modelWindows models.model_windows dict {} — 模型 ID 到上下文窗口 token 数的映射(setup 从提供商元数据自动捕获,也可手填);解析窗口时优先级低于路由显式覆盖、高于内置注册表

tools

字段 snake type default choices 说明
tools.profile tools.profile Literal full minimal/messaging/coding/full 工具集预设档位
tools.allow tools.allow list [] — 覆盖档位、显式允许的工具列表
tools.alsoAllow tools.also_allow list [] — 在档位基础上额外允许的工具
tools.deny tools.deny list [] — 显式禁用的工具列表
tools.exec.enabled tools.exec.enabled bool true — 是否启用 shell/进程执行工具
tools.exec.maxOutputChars tools.exec.max_output_chars int 2000000 — 命令输出的采集上限字符数(不是模型可见上限——后者由 spill.maxInlineChars 决定)
tools.exec.host tools.exec.host Literal sandbox auto/local/sandbox/container/remote 命令执行所在的宿主环境
tools.exec.envAllowlist tools.exec.env_allowlist list [] — 显式传给 exec、execute_code 和 process 的本机环境变量名
tools.exec.security tools.exec.security Literal allowlist deny/allowlist/full 命令执行安全模式
tools.exec.ask tools.exec.ask Literal on_miss off/on_miss/always 命令执行前的审批询问策略
tools.exec.safeBins tools.exec.safe_bins list ['awk', 'cat', 'date', 'echo', 'find', 'grep', 'head', 'ls', 'pwd', 'rg', 'sed', 'sort', 'tail', 'tr', 'uniq', 'wc'] — allowlist 模式下免审批直接放行的安全命令
tools.exec.allowedCommands tools.exec.allowed_commands list [] — 额外允许执行的命令白名单
tools.exec.blockedCommands tools.exec.blocked_commands list [] — 禁止执行的命令黑名单
tools.web.enabled tools.web.enabled bool false — 是否启用网络访问工具
tools.web.proxy tools.web.proxy str None null —
tools.web.timeoutSeconds tools.web.timeout_seconds int 30 — 网络请求超时(秒)
tools.web.searchApiKey tools.web.search_api_key str "" — 搜索服务 API key
tools.web.searchProvider tools.web.search_provider Literal brave brave/tavily/serpapi/searxng 网络搜索服务提供商
tools.web.searchApiBase tools.web.search_api_base str "" — 搜索服务 API 基础地址
tools.web.allowPrivateAddresses tools.web.allow_private_addresses bool false — 是否允许 web_fetch 访问私有/回环地址(SSRF 风险)
tools.browser.enabled tools.browser.enabled bool true — 是否开启浏览器自动化工具(默认开,未装 playwright/chromium 时 is_ready 探测自动降级不装配)
tools.browser.maxSessions tools.browser.max_sessions int 3 — 单个会话方(owner)的并发浏览器会话上限
tools.browser.maxTotalSessions tools.browser.max_total_sessions int 10 — 全实例并发浏览器会话总上限(每个会话都是独立 Chromium context,占用真实内存);<=0 表示不限制
tools.browser.sessionIdleTimeoutSec tools.browser.session_idle_timeout_sec int 300 — 浏览器会话空闲多久(秒)后自动回收
tools.browser.maxSnapshotChars tools.browser.max_snapshot_chars int 8000 — 可访问性快照文本截断上限(字符)
tools.browser.headless tools.browser.headless bool true — 无头模式(服务器环境必需)
tools.browser.navTimeoutSec tools.browser.nav_timeout_sec int 30 — 单次页面导航超时(秒)
tools.browser.allowPrivateAddresses tools.browser.allow_private_addresses bool false — 是否允许导航到内网地址(默认拦截,复用 SSRF 口径)
tools.browser.dialogPolicy tools.browser.dialog_policy str dismiss — 原生弹窗(alert/confirm/prompt)自动处理策略:dismiss 取消 / accept 确认。不处理会导致页面阻塞
tools.browser.allowEvaluate tools.browser.allow_evaluate bool true — 是否允许 evaluate 动作在页面内执行 JS。表达式黑名单只能拦住粗糙用法,无法对抗刻意混淆;不能接受页内任意代码执行的部署应关掉此项
tools.browser.allowUnsafeEvaluate tools.browser.allow_unsafe_evaluate bool false — 是否跳过 evaluate 的敏感表达式检查(读取 cookie/localStorage、脚本跳转等),默认拒绝以防注入外泄
tools.browser.persistLoginState tools.browser.persist_login_state bool false — 是否持久化浏览器登录态(cookie/localStorage)到工作区,供后续会话复用
tools.browser.viewportWidth tools.browser.viewport_width int 1280 — 浏览器视口宽度(像素)
tools.browser.viewportHeight tools.browser.viewport_height int 800 — 浏览器视口高度(像素)
tools.browser.userAgent tools.browser.user_agent str "" — 自定义 User-Agent,留空用 Chromium 默认值
tools.restrictToWorkspace tools.restrict_to_workspace bool false — 是否将文件操作限制在工作区内
tools.safeWriteRoot tools.safe_write_root str "" — 允许写入的根目录
tools.inboundDocumentEnabled tools.inbound_document_enabled bool true — 是否自动下载、解密并解析入站文档附件(docx/xlsx/pptx/pdf)
tools.inboundDocumentMaxChars tools.inbound_document_max_chars int 8000 — 入站文档自动注入正文的字符上限,超出则注入摘要并提示用 read_document 读全文
tools.mcpServers tools.mcp_servers dict {} — MCP 服务配置(键为服务名;该键会参与工具名与凭据文件名,只允许字母数字与 . - _)
tools.mcpServers{}.command tools.mcp_servers{}.command str "" — stdio 传输方式下启动 MCP 服务的命令(与 url 二选一)
tools.mcpServers{}.args tools.mcp_servers{}.args list [] — 启动 MCP 服务命令的参数
tools.mcpServers{}.env tools.mcp_servers{}.env dict {} — MCP 服务进程的环境变量,支持 ${VAR} 与 $VAR 展开(变量缺失即报错)
tools.mcpServers{}.url tools.mcp_servers{}.url str "" — Streamable HTTP 传输方式下 MCP 服务地址(与 command 二选一)
tools.mcpServers{}.headers tools.mcp_servers{}.headers dict {} — HTTP 连接 MCP 服务的自定义头,支持 ${VAR} 展开
tools.mcpServers{}.auth tools.mcp_servers{}.auth Literal "" /oauth 认证模式:留空为不认证(或自带 headers),oauth 为 OAuth 2.1 PKCE 浏览器授权
tools.mcpServers{}.trustLevel tools.mcp_servers{}.trust_level Literal untrusted untrusted/trusted 该 MCP 服务的信任级别。untrusted(默认):其工具至少按 exec 审批,服务端声明的 readOnlyHint 不能降低审批等级;trusted:采信 annotations。MCP 规范明确 annotations 仅为提示,不可作为安全判据 —— 只有你自己掌控的服务才应设为 trusted。
tools.mcpServers{}.enabled tools.mcp_servers{}.enabled bool true — 是否启用该 MCP 服务
tools.mcpServers{}.timeout tools.mcp_servers{}.timeout int 120 — MCP 工具调用超时(秒)
tools.mcpServers{}.connectTimeout tools.mcp_servers{}.connect_timeout int 60 — 连接与初始化握手的超时(秒)
tools.mcpServers{}.toolsInclude tools.mcp_servers{}.tools_include list [] — 仅暴露的 MCP 工具白名单(空为全部)
tools.mcpServers{}.toolsExclude tools.mcp_servers{}.tools_exclude list [] — 排除的 MCP 工具黑名单
tools.mcpSecurityPolicy tools.mcp_security_policy Literal block warn/block MCP 工具注入扫描策略:block 拒绝可疑工具,warn 仅告警放行。扫描覆盖工具名、描述与 inputSchema 内的描述/标题
tools.imageGen.enabled tools.image_gen.enabled bool true — 是否启用图像生成工具(取消后即使填了 key 也不注册)
tools.imageGen.backend tools.image_gen.backend str openai — 图像生成后端
tools.imageGen.apiKey tools.image_gen.api_key str "" — OpenAI 兼容后端 API key
tools.imageGen.apiBase tools.image_gen.api_base str "" — OpenAI 兼容后端 API 基础地址
tools.imageGen.model tools.image_gen.model str "" — 图像生成模型名
tools.imageGen.falKey tools.image_gen.fal_key str "" — FAL.ai 后端访问密钥
tools.imageGen.falModel tools.image_gen.fal_model str "" — FAL.ai 图像生成模型名
tools.tts.enabled tools.tts.enabled bool true — 是否启用 TTS 语音合成工具(取消后不注册,保留已填凭证)
tools.tts.openaiApiKey tools.tts.openai_api_key str "" — OpenAI TTS API key
tools.tts.openaiApiBase tools.tts.openai_api_base str "" — OpenAI TTS API 基础地址
tools.tts.model tools.tts.model str "" — TTS 模型名
tools.tts.defaultBackend tools.tts.default_backend str edge — 默认语音合成后端
tools.tts.defaultVoice tools.tts.default_voice str "" — 默认语音音色
tools.codeExec.enabled tools.code_exec.enabled bool true — 是否启用代码执行工具
tools.codeExec.timeoutSeconds tools.code_exec.timeout_seconds int 30 — 代码执行超时(秒)
tools.codeExec.allowedLanguages tools.code_exec.allowed_languages list ['python', 'javascript', 'bash'] — 允许执行的代码语言列表
tools.mcp.enabled tools.mcp.enabled bool true — 是否启用 MCP 工具接入(设为 false 时不加载任何 MCP 服务,即使 mcp_servers 里仍有配置)

execution

字段 snake type default choices 说明
execution.defaultExecutor execution.default_executor Literal sandbox local/sandbox/container/remote 默认命令执行器类型
execution.sandboxRoot execution.sandbox_root str /tmp/echo-agent-sandbox — sandbox 执行器的根目录
execution.containerImage execution.container_image str "" — container 执行器使用的镜像
execution.remoteHost execution.remote_host str "" — remote 执行器的目标主机
execution.remoteUser execution.remote_user str root — remote 执行器登录用户名
execution.remoteKeyPath execution.remote_key_path str "" — remote 执行器 SSH 私钥路径
execution.remoteStrictHostKey execution.remote_strict_host_key Literal accept-new no/accept-new/yes SSH 主机密钥严格校验策略
execution.remoteConnectTimeout execution.remote_connect_timeout int 10 — remote 执行器连接超时(秒)
execution.networkPolicy execution.network_policy Literal deny allow/deny/restricted 执行环境的网络访问策略
execution.maxBackgroundTasks execution.max_background_tasks int 64 — 后台任务并发上限,超限时可丢弃任务被丢、不可丢任务排队

permissions

字段 snake type default choices 说明
permissions.adminUsers permissions.admin_users list [] — 全局管理员用户列表
permissions.approval.requireApproval permissions.approval.require_approval list ['cronjob', 'delegate_task', 'dep_install', 'exec', 'execute_code', 'process', 'skill_install', 'skill_manage', 'spawn_task'] — 执行前必须审批的工具/动作列表。风险等级(EXEC/DANGEROUS)本身即要求审批,本列表用于额外追加,不能反向豁免;delegate_task/spawn_task 在列是因为它们派发的 worker 可以调用 exec,派发处是调用方权限仍然已知的最后一环
permissions.approval.autoApprove permissions.approval.auto_approve list [] — 自动批准的工具/动作列表
permissions.approval.autoDeny permissions.approval.auto_deny list [] — 自动拒绝的工具/动作列表
permissions.approval.defaultPolicy permissions.approval.default_policy Literal approve approve/deny/ask 未命中规则时的默认审批策略
permissions.approval.waitTimeoutSeconds permissions.approval.wait_timeout_seconds int 300 — 等待人工审批的超时(秒)
permissions.approval.cliAutoApprove permissions.approval.cli_auto_approve bool true — CLI 通道是否自动批准
permissions.approval.trustedChannels permissions.approval.trusted_channels list [] — 免审批的可信通道列表
permissions.approval.mode permissions.approval.mode Literal smart manual/smart/off 审批模式:manual 全人工,smart 智能判定,off 关闭
permissions.approval.smartModel permissions.approval.smart_model str "" — smart 模式判定审批所用模型
permissions.approval.unattendedPolicy permissions.approval.unattended_policy Literal deny deny/allow_safe 无人值守时的审批策略
permissions.elevated.enabled permissions.elevated.enabled bool false — 是否启用提权操作机制
permissions.elevated.allowFrom permissions.elevated.allow_from dict {} — 各通道允许提权的用户映射

credentials

字段 snake type default choices 说明
credentials.encryptionKeyEnv credentials.encryption_key_env str ECHO_AGENT_CREDENTIAL_KEY — 存放凭据加密密钥的环境变量名
credentials.requireEncryption credentials.require_encryption bool true — 是否强制要求凭据加密

session

字段 snake type default choices 说明
session.maxHistoryMessages session.max_history_messages int 500 — 单会话保留的最大历史消息数
session.expiryHours session.expiry_hours int 72 — 会话过期时间(小时)
session.contextWindowTokens session.context_window_tokens int 0 — 上下文窗口 token 上限的全局兜底值(0=不设,让未知模型落到 256K 现代基线;仅当你为某些无法动态解析的私有/本地模型显式设成正数时才生效,优先级低于 models.dev/内置注册表)
session.compressionWindowCap session.compression_window_cap int 200000 — 压缩预算上限(0 为不封顶):模型真实窗口用于显示,但压缩触发按 min(真实窗口, 此上限) 计算,避免大窗口模型让上下文膨胀到很大才压缩、抬高单请求成本与延迟
session.introductionEnabled session.introduction_enabled bool true — 是否在新会话发送自我介绍
session.imClarifyPendingTtlSeconds session.im_clarify_pending_ttl_seconds int 300 — IM 通道追问续接的待答有效期(秒);agent 发出追问后超过此时长,下一条消息不再当作答案而按新消息处理
session.introductionTemplate session.introduction_template str "" — 自我介绍模板
session.historyImageTtlMinutes session.history_image_ttl_minutes int 30 — 历史图片保留时长(分钟)
session.historyImageLimit session.history_image_limit int 4 — 历史中保留的最大图片数
session.historyImageSkipIfCurrent session.history_image_skip_if_current bool true — 当前轮已带图时是否跳过历史图片
session.groupSessionScope session.group_session_scope Literal per_user per_user/shared 群聊会话隔离策略:per_user 每人独立会话(默认,防群内串话),shared 整群共享一个会话

memory

字段 snake type default choices 说明
memory.enabled memory.enabled bool true — 是否启用认知记忆
memory.scopePolicy memory.scope_policy Literal session legacy/session 记忆作用域策略
memory.crossChannelOwner memory.cross_channel_owner bool true — 跨通道主人记忆归一:开启时,principal_bindings 列入的 sender 在各通道 1:1 私聊共享 owner 记忆;未列入者与群聊均按会话隔离。关闭则全部按会话隔离
memory.ownerKey memory.owner_key str owner — 主人记忆作用域键(单主体默认 owner,一般无需修改)
memory.allowModelEnvironmentWrites memory.allow_model_environment_writes bool false — 是否允许模型记忆工具写 ENVIRONMENT 记忆或带 global 标签(这类绕过 scope、全局可见);默认关闭,模型只能写自己 scope 的 USER 记忆,避免任意通道模型污染全局
memory.principalBindings memory.principal_bindings list [] — 主人身份绑定表:每项 "通道:sender_id",列入者的 1:1 私聊归一到 owner 记忆域实现跨通道互通;未列入者按会话隔离。安全前提:仅对 sender_id 由平台保证不可伪造的通道(如 Telegram/Slack)启用,否则冒充该 id 者可读主人记忆;仅在 cross_channel_owner 开启时生效
memory.retrievalOnMiss memory.retrieval_on_miss Literal degrade degrade/sync 检索缓存未命中时的行为:degrade=有界同步检索(超时回退关键词),sync=完整同步检索
memory.retrievalMissTimeoutSeconds memory.retrieval_miss_timeout_seconds float 0.8 — degrade 模式下缓存未命中时的同步检索时间预算(秒),超时回退本地关键词检索;0=完全跳过(旧行为)
memory.cacheTtlSeconds memory.cache_ttl_seconds float 60.0 — 检索预取缓存新鲜度 TTL(秒),超时即视为未命中
memory.cacheJaccardMin memory.cache_jaccard_min float 0.3 — 当前查询与缓存查询的最小 Jaccard 相似度,低于则视为话题突变未命中
memory.consolidationThreshold memory.consolidation_threshold int 20 — 触发记忆整合的条目阈值
memory.narrativeEpisodeCount memory.narrative_episode_count int 3 — 快照叙事层注入的最近 episode.summary 条数(承载跨条目时序/因果,补结构化事实层缺失)
memory.vectorEnabled memory.vector_enabled bool true — 是否启用向量检索记忆
memory.vectorDimensions memory.vector_dimensions int 0 — 记忆向量维度,0=自动跟随当前嵌入模型的实际维度
memory.maxUserMemories memory.max_user_memories int 1000 — 单用户记忆条目上限
memory.maxEnvMemories memory.max_env_memories int 500 — 环境记忆条目上限
memory.memoryNudgeInterval memory.memory_nudge_interval int 10 — 提示模型记录记忆的轮次间隔
memory.importanceDecayDays memory.importance_decay_days float 30.0 — 记忆重要性衰减周期(天)
memory.snapshotEnabled memory.snapshot_enabled bool true — 是否启用记忆快照注入上下文
memory.snapshotLayering memory.snapshot_layering bool true — 快照分层:常驻核心只保留 top-K(按有效重要度)+ 显式 pinned 条目,长尾不再每轮无条件注入 system prompt,改由 query 驱动的召回按需带出。关闭则回退旧行为(USER≤50/ENV≤30 全量注入)。解决'常驻画像与当前问题无关'的注入路径
memory.snapshotUserCoreMax memory.snapshot_user_core_max int 12 — 分层开启时 USER 常驻核心的最大条目数(top-K + pinned)。长尾靠召回带出
memory.snapshotEnvCoreMax memory.snapshot_env_core_max int 8 — 分层开启时 ENVIRONMENT 常驻核心的最大条目数(top-K + pinned)
memory.contradictionDetection memory.contradiction_detection bool true — 是否启用记忆矛盾检测
memory.sleepConsolidation memory.sleep_consolidation bool true — 是否启用空闲期记忆整合
memory.archivalThreshold memory.archival_threshold float 0.05 — 记忆归档分数阈值,低于此值进入归档层
memory.forgetThreshold memory.forget_threshold float 0.01 — 记忆遗忘分数阈值,低于此值被遗忘
memory.lineageMaxVersions memory.lineage_max_versions int 3 — 同 key 世系保留的 superseded 版本数上限,超出的最旧版本转归档待遗忘
memory.lineageRetentionDays memory.lineage_retention_days int 90 — superseded 版本保留天数,超期即转归档待遗忘(即便未超版本数上限)
memory.maxWorkingMemory memory.max_working_memory int 20 — 工作记忆条目上限
memory.embeddingBackend memory.embedding_backend Literal auto auto/local/provider 嵌入后端: auto=启动探测provider,失败静默回退fastembed; local=直接用本地fastembed免探测; provider=强制provider,探测失败报错不回退
memory.embeddingModel memory.embedding_model str "" — 记忆向量化使用的嵌入模型
memory.localEmbeddingModel memory.local_embedding_model str BAAI/bge-small-zh-v1.5 — 无embed能力provider时的本地嵌入兜底模型(fastembed),空串禁用兜底
memory.hfEmbeddingEndpoint memory.hf_embedding_endpoint str https://hf-mirror.com — 本地嵌入模型(fastembed)的 HuggingFace 下载源,默认走 hf-mirror.com 镜像以适配国内网络;设为官方源填 https://huggingface.co,空串则不覆盖已有 HF_ENDPOINT 环境变量
memory.embedTimeoutSeconds memory.embed_timeout_seconds float 1.5 — 查询向量化的单次超时(秒),超时降级为关键词检索
memory.rrfMinSimilarity memory.rrf_min_similarity float 0.3 — RRF 向量召回相似度下限(可调)。向量命中余弦低于该值则不占 rank 槽、不贡献 RRF 分,且不构成'向量达标'准入通路——避免低相似度命中污染真实候选。对归一化句向量,0.25 基本是'勉强沾边',0.30 是更稳的下限;BM25 侧改用判别性 token 门控(单个常见汉字命中不准入),不设分数下限(量纲不同)
memory.rerankEnabled memory.rerank_enabled bool true — 是否启用 cross-encoder 精排。RRF 只融合两路顺序、不懂'到底多相关',cross-encoder 对 (query,doc) 联合打分是相关性金标准。开启后对融合 top-K 重排(仅 top-K,开销小),超时/失败回退 RRF 原序。默认开:重排模型(约 941MB,sha256 校验后离线命中)在安装期就从自建镜像预取(Gitee 分卷优先,再 GitHub 整包),安装期漏下时运行期按退避重下;模型未就绪时本轮自动降级为 RRF 原序,不阻塞回复。关闭可完全省去该模型与每轮数十~上百 ms 精排延迟
memory.rerankModel memory.rerank_model str BAAI/bge-reranker-base — cross-encoder 精排模型(fastembed TextCrossEncoder 支持的模型名)。中文/多语可选 BAAI/bge-reranker-base 或 jinaai/jina-reranker-v2-base-multilingual
memory.rerankTopK memory.rerank_top_k int 10 — 精排作用的融合 top-K 数量。只对 RRF 融合后的前 K 条重排,其余保持原序,控制精排开销。默认 10:精排是纯 CPU 的 cross-encoder,base 规模模型每对 (query,doc) 打分在数十毫秒量级,K=20 常态就会撞满推理预算而整轮白跑降级;而召回配额本身只有 5 条记忆+3 条 episode,K=10 已覆盖两倍配额,再往上是花延迟买不到名次变化
memory.rerankMinScore memory.rerank_min_score float 0.0 — 精排绝对相关性下限(0=只重排不剔除)。>0 时重排分低于该值的候选被丢弃(仅在重排 top-K 内,且全被丢时回退不过滤,防止误配阈值清空召回)
memory.rerankTimeoutSeconds memory.rerank_timeout_seconds float 5.0 — 精排单次推理的等待预算(秒),超时本轮回退 RRF 原序。仅管推理:模型加载/下载走 rerank_load_timeout_seconds(两者共用一个值时,2s 既等不到 1GB 模型加载完,也不够 base 模型在纯 CPU 上给 top-K 打完分,结果是常态降级)
memory.rerankLoadTimeoutSeconds memory.rerank_load_timeout_seconds float 60.0 — 精排模型加载/下载的单次等待预算(秒),与 embed_load_timeout_seconds 对称。超时不算失败:后台加载继续,本轮回退 RRF 原序,模型就绪后自动接管。设得太小(如按推理预算的 2s)会让每次等待都超时,启动预热也白跑
memory.embedLoadTimeoutSeconds memory.embed_load_timeout_seconds float 60.0 — 本地嵌入模型首次加载/下载的超时(秒),超时即标记失败并降级为关键词检索,避免下载挂起拖垮进程
memory.localEmbeddingCacheDir memory.local_embedding_cache_dir str ~/.echo-agent/models/fastembed — 本地嵌入模型(fastembed)的缓存目录,安装期预取与运行期共用同一目录以实现离线命中;默认落在 echo-home 下的稳定位置(而非易被系统清理的临时目录),空串则用 fastembed 默认(FASTEMBED_CACHE_PATH 或临时目录)
memory.localEmbeddingMaxLoadAttempts memory.local_embedding_max_load_attempts int 5 — 本地嵌入模型加载失败后的最大重试次数,超过则本进程保持关键词检索直到重启;避免一次网络抖动就永久降级
memory.localEmbeddingRetryBackoffSeconds memory.local_embedding_retry_backoff_seconds float 30.0 — 本地嵌入模型加载失败后再次尝试前的退避等待(秒),避免失败后每条消息都反复触发加载
memory.contradictionScanOnStore memory.contradiction_scan_on_store bool false — 是否在写入记忆时即时扫描矛盾
memory.autoResolveContradictions memory.auto_resolve_contradictions bool false — 睡眠整合时自动消解同 key 矛盾(newest-wins),默认关闭只检测不消解
memory.reflectionEnabled memory.reflection_enabled bool true — 是否启用睡眠反思(归纳提炼+LLM矛盾裁决),随睡眠整合运行

knowledge

字段 snake type default choices 说明
knowledge.enabled knowledge.enabled bool true — 是否启用知识库检索
knowledge.docsDir knowledge.docs_dir str data/knowledge — 知识库文档目录
knowledge.indexPath knowledge.index_path str data/knowledge_index.json — 知识库索引文件路径
knowledge.autoIndex knowledge.auto_index bool true — 是否自动索引文档目录
knowledge.chunkSize knowledge.chunk_size int 1200 — 文档切块大小(字符)
knowledge.chunkOverlap knowledge.chunk_overlap int 120 — 相邻切块重叠大小(字符)
knowledge.maxResults knowledge.max_results int 5 — 知识检索返回的最大结果数
knowledge.allowedExtensions knowledge.allowed_extensions list ['.md', '.txt', '.rst', '.json', '.yaml', '.yml', '.py', '.pdf', '.docx', '.xlsx', '.pptx'] — 允许索引的文档扩展名

multiAgent

字段 snake type default choices 说明
multiAgent.enabled multi_agent.enabled bool true — 是否启用多代理委派
multiAgent.maxDepth multi_agent.max_depth int 3 — 委派嵌套最大深度
multiAgent.maxParallelWorkers multi_agent.max_parallel_workers int 4 — 并行子代理数上限
multiAgent.maxIterations multi_agent.max_iterations int 12 — 子代理默认最大迭代数
multiAgent.auditPath multi_agent.audit_path str data/delegation_audit.jsonl — 委派审计日志路径
multiAgent.workerProfiles multi_agent.worker_profiles list [] — 子代理画像配置列表
multiAgent.workerProfiles[].id multi_agent.worker_profiles[].id str "" — 子代理画像 ID
multiAgent.workerProfiles[].name multi_agent.worker_profiles[].name str "" — 子代理名称
multiAgent.workerProfiles[].description multi_agent.worker_profiles[].description str "" — 子代理用途描述
multiAgent.workerProfiles[].instructions multi_agent.worker_profiles[].instructions str "" — 子代理系统指令
multiAgent.workerProfiles[].defaultTools multi_agent.worker_profiles[].default_tools list [] — 子代理默认可用工具
multiAgent.workerProfiles[].model multi_agent.worker_profiles[].model str "" — 子代理使用的模型
multiAgent.workerProfiles[].maxIterations multi_agent.worker_profiles[].max_iterations int 12 — 子代理单任务最大迭代数
multiAgent.workerProfiles[].maxTokens multi_agent.worker_profiles[].max_tokens int 8192 — 子代理生成最大 token 数
multiAgent.workerProfiles[].temperature multi_agent.worker_profiles[].temperature float 0.4 — 子代理采样温度

scheduler

字段 snake type default choices 说明
scheduler.enabled scheduler.enabled bool true — 是否启用任务调度器
scheduler.maxConcurrentJobs scheduler.max_concurrent_jobs int 10 — 并发任务数上限

checkpoint

字段 snake type default choices 说明
checkpoint.enabled checkpoint.enabled bool true — 是否开启编辑前影子git快照安全网(探测不到git时自动降级)
checkpoint.storePath checkpoint.store_path str ~/.echo-agent/checkpoints/store — 影子git仓库存放路径
checkpoint.maxSnapshotsPerWorkspace checkpoint.max_snapshots_per_workspace int 20 — 每个工作区保留的最大快照数量
checkpoint.maxTotalSizeMb checkpoint.max_total_size_mb int 500 — 整个store的总大小上限(MB),超出触发gc
checkpoint.maxFileSizeMb checkpoint.max_file_size_mb int 10 — 单文件超过此大小(MB)不纳入快照

validation

字段 snake type default choices 说明
validation.enabled validation.enabled bool true — 是否开启写后增量校验反馈(检查器探测不到时自动降级)
validation.timeoutSec validation.timeout_sec float 5.0 — 单个文件校验的超时上限(秒),超时静默跳过
validation.maxDiagnostics validation.max_diagnostics int 10 — 追加到工具结果的诊断条数上限
validation.maxFileSizeKb validation.max_file_size_kb int 512 — 超过此大小(KB)的文件跳过校验

mediaUnderstanding

字段 snake type default choices 说明
mediaUnderstanding.audioEnabled media_understanding.audio_enabled bool true — 是否开启入站音频/语音转写(provider 探测不到时自动降级)
mediaUnderstanding.audioProvider media_understanding.audio_provider str auto — 转写后端:auto(探测) / cloud(云) / local(本地 faster-whisper)
mediaUnderstanding.minAudioSizeKb media_understanding.min_audio_size_kb float 1.0 — 小于此大小(KB)的音频跳过转写(噪音/误触)
mediaUnderstanding.maxAudioSizeKb media_understanding.max_audio_size_kb int 25000 — 大于此大小(KB)的音频跳过转写(控成本)
mediaUnderstanding.localModelSize media_understanding.local_model_size str base — 本地 faster-whisper 模型规格(tiny/base/small/...)
mediaUnderstanding.videoEnabled media_understanding.video_enabled bool true — 是否开启入站视频理解(抽帧+音轨;provider/ffmpeg 探测不到自动降级)
mediaUnderstanding.videoFrameCount media_understanding.video_frame_count int 4 — 视频均匀抽帧数(喂 vision 模型)
mediaUnderstanding.videoVisionModel media_understanding.video_vision_model str "" — 视频画面描述的 vision 模型覆盖(空=用 provider 默认模型)
mediaUnderstanding.videoVisionPrompt media_understanding.video_vision_prompt str 简要描述这段视频的画面内容。 — 视频抽帧描述的提示词
mediaUnderstanding.minVideoSizeKb media_understanding.min_video_size_kb float 1.0 — 小于此大小(KB)的视频跳过理解
mediaUnderstanding.maxVideoSizeKb media_understanding.max_video_size_kb int 204800 — 大于此大小(KB)的视频跳过理解(≈200MB,成本护栏)
mediaUnderstanding.videoFfmpegConcurrency media_understanding.video_ffmpeg_concurrency int 2 — 同时运行的 ffmpeg 抽帧/抽音轨进程数上限(防多视频打爆 CPU)
mediaUnderstanding.transcriptionBaseUrl media_understanding.transcription_base_url str https://api.groq.com/openai/v1 — 云转写端点 base_url(OpenAI 兼容 /audio/transcriptions)
mediaUnderstanding.transcriptionModel media_understanding.transcription_model str whisper-large-v3 — 云转写模型名

runtime

字段 snake type default choices 说明
runtime.singleInstance runtime.single_instance bool true — 同一 workspace 是否只允许运行一个消费通道的实例(防止后台服务与前台 run 重复消费、重复回复);用 --force 可临时越过

storage

字段 snake type default choices 说明
storage.databasePath storage.database_path str data/echo_agent.db — SQLite 数据库文件路径
storage.sessionsDir storage.sessions_dir str data/sessions — 会话数据存储目录
storage.memoryDir storage.memory_dir str data/memory — 记忆数据存储目录
storage.logsDir storage.logs_dir str data/logs — 日志文件存储目录
storage.spillDir storage.spill_dir str data/spill — 工具输出溢出产物的存储目录(必须是工作区内的相对路径专用子目录)

spill

字段 snake type default choices 说明
spill.enabled spill.enabled bool true — 是否把超长工具输出落盘并只给模型预览(关闭则回退旧行为:输出由下游按 16000 字符哑截断,尾部结论丢失且无取回路径)
spill.maxInlineChars spill.max_inline_chars int 6000 — 模型可见的工具输出字符上限,超出则落盘并替换为首尾预览加取回路径
spill.retentionDays spill.retention_days int 7 — spill 产物保留天数,超期删除
spill.maxTotalMb spill.max_total_mb int 512 — spill 产物总体积上限(MB),超出按最旧优先删除
spill.sweepIntervalHours spill.sweep_interval_hours int 6 — spill 产物清扫间隔(小时)

artifacts

字段 snake type default choices 说明
artifacts.enabled artifacts.enabled bool true — 启用会话隔离的用户产物工具
artifacts.rootDir artifacts.root_dir str data/artifacts — 用户产物目录(必须是工作区内的专用相对目录)
artifacts.maxChunkChars artifacts.max_chunk_chars int 3000 — 单次追加到产物的最大字符数
artifacts.maxArtifactMb artifacts.max_artifact_mb int 50 — 单个产物最大体积(MB)
artifacts.textFallbackMaxChars artifacts.text_fallback_max_chars int 100000 — 通道不支持附件时,允许自动分段发送的最大产物字符数
artifacts.textFallbackChunkChars artifacts.text_fallback_chunk_chars int 1700 — 文本降级交付的单段字符数(默认兼容 Discord 2000 字符限制)
artifacts.retentionDays artifacts.retention_days int 30 — 已完成用户产物的建议保留天数
artifacts.maxTotalMb artifacts.max_total_mb int 1024 — 全部用户产物的总体积上限(MB,超出时最旧优先清理)
artifacts.sweepIntervalHours artifacts.sweep_interval_hours int 24 — 用户产物清理周期(小时)
artifacts.allowedExtensions artifacts.allowed_extensions list ['.md', '.txt', '.json', '.csv'] — 允许模型创建的文本产物扩展名

observability

字段 snake type default choices 说明
observability.logLevel observability.log_level str INFO — 日志级别
observability.traceEnabled observability.trace_enabled bool true — 是否记录执行轨迹(关闭则不写 trace 文件)
observability.maxTraceFiles observability.max_trace_files int 500 — trace 文件保留数量上限,超出按最旧优先轮转删除;<=0 表示不限制(禁用轮转)
observability.healthCheckIntervalSeconds observability.health_check_interval_seconds int 60 — 健康检查间隔(秒)
observability.otelEnabled observability.otel_enabled bool true — 是否启用 OpenTelemetry 指标导出
observability.otelEndpoint observability.otel_endpoint str "" — OpenTelemetry 导出端点
observability.otelServiceName observability.otel_service_name str echo-agent — OpenTelemetry 服务名
observability.otelExportIntervalMs observability.otel_export_interval_ms int 5000 — OpenTelemetry 指标导出间隔(毫秒)
observability.loopWatchdogEnabled observability.loop_watchdog_enabled bool true — 是否启用事件循环看门狗(检测 loop 冻结并自杀重启)
observability.loopWatchdogWarnSeconds observability.loop_watchdog_warn_seconds float 5.0 — 事件循环停滞多少秒后告警并转储线程栈
observability.loopWatchdogKillSeconds observability.loop_watchdog_kill_seconds float 30.0 — 事件循环冻结多少秒后自杀退出以便 supervisor 重启
observability.loopWatchdogCheckIntervalSeconds observability.loop_watchdog_check_interval_seconds float 5.0 — 看门狗线程检查心跳的间隔(秒)
observability.loopWatchdogMaxRestartsPerHour observability.loop_watchdog_max_restarts_per_hour int 5 — 一小时内看门狗自杀重启次数上限,超过则熔断不再自杀

skills

字段 snake type default choices 说明
skills.enabled skills.enabled bool true — 是否启用技能系统
skills.skillsDir skills.skills_dir str skills — 技能脚本目录
skills.creationNudgeInterval skills.creation_nudge_interval int 10 — 提示创建技能的轮次间隔
skills.disabled skills.disabled list [] — 禁用的技能列表
skills.externalDirs skills.external_dirs list [] — 额外加载技能的外部目录
skills.allowLazyInstalls skills.allow_lazy_installs bool true — 是否允许技能运行时按需安装依赖
skills.admissionPolicy skills.admission_policy Literal stage_for_review auto_write/stage_for_review/manual_only 技能自动沉淀准入策略:auto_write 按风险自动写 / stage_for_review 低风险自动高风险暂存 / manual_only 一律暂存
skills.autoWriteRisk skills.auto_write_risk Literal low low/high auto_write 档下允许自动写盘的最高风险等级

compression

字段 snake type default choices 说明
compression.enabled compression.enabled bool true — 是否启用上下文压缩
compression.triggerRatio compression.trigger_ratio float 0.7 — 上下文占用达到该比例时触发压缩
compression.tailBudgetRatio compression.tail_budget_ratio float 0.4 — 压缩后保留尾部消息的预算比例
compression.headProtectCount compression.head_protect_count int 3 — 压缩时保护不动的头部消息数
compression.summaryTargetRatio compression.summary_target_ratio float 0.2 — 摘要相对原文的目标长度比例
compression.summaryMinTokens compression.summary_min_tokens int 2000 — 摘要最小 token 数
compression.summaryMaxTokens compression.summary_max_tokens int 12000 — 摘要最大 token 数
compression.summaryModel compression.summary_model str "" — 生成摘要使用的模型
compression.summaryCooldownSeconds compression.summary_cooldown_seconds int 600 — 两次压缩之间的冷却时间(秒)
compression.toolPruningEnabled compression.tool_pruning_enabled bool true — 是否启用工具结果剪枝
compression.toolPruningTailBudgetRatio compression.tool_pruning_tail_budget_ratio float 0.3 — 工具结果剪枝保留尾部的预算比例
compression.maxCompressionCount compression.max_compression_count int 10 — 单会话最大压缩次数

gateway

字段 snake type default choices 说明
gateway.enabled gateway.enabled bool false — 是否启用网关服务
gateway.host gateway.host str 127.0.0.1 — 网关监听地址。默认 127.0.0.1 仅本机可达;要对外提供服务改为 0.0.0.0 并同时配置 auth.apiTokens(无 token 绑非回环地址会被拒绝启动),反代场景还需在 auth.allowedHosts 列出代理域名。注意留空不等于本机:空字符串与 :: 一样是通配绑定(等同 0.0.0.0),同样受上述限制
gateway.port gateway.port int 58123 — 网关监听端口(0 表示动态分配,真实端口写入 workspace/.echo-agent/gateway.json)
gateway.apiPrefix gateway.api_prefix str /api/v1 — 网关 API 路径前缀
gateway.wsPath gateway.ws_path str /ws — 网关 WebSocket 路径
gateway.wsHeartbeatSeconds gateway.ws_heartbeat_seconds float 30.0 — 服务端 WebSocket 主动心跳间隔(秒,0 为关闭):服务端定期 ping 客户端并要求 pong,避免长回合期间连接单边失效而无人察觉导致回复投递不到 CLI
gateway.sessionPolicy.mode gateway.session_policy.mode Literal idle daily/idle/both/none 网关会话重置策略
gateway.sessionPolicy.dailyResetHour gateway.session_policy.daily_reset_hour int 4 — 每日重置会话的小时(0-23)
gateway.sessionPolicy.idleTimeoutMinutes gateway.session_policy.idle_timeout_minutes int 1440 — 会话空闲超时(分钟)
gateway.auth.mode gateway.auth.mode Literal allowlist open/allowlist/pairing 网关鉴权模式
gateway.auth.allowedUsers gateway.auth.allowed_users list [] — 允许访问网关的用户白名单
gateway.auth.adminUsers gateway.auth.admin_users list [] — 网关管理员用户列表
gateway.auth.apiTokens gateway.auth.api_tokens list [] — 网关 API 访问令牌列表
gateway.auth.adminTokens gateway.auth.admin_tokens list [] — 高危管理接口(技能导入安装删除/知识库上传删除)专用令牌;为空时回退到 api_tokens
gateway.auth.allowedOrigins gateway.auth.allowed_origins list [] — 浏览器 Origin 白名单(跨站放行入口);留空不等于关闭 CSRF 防护——WS 握手、POST /message 与管理接口默认即拦截明确的跨站浏览器请求,本项用于额外放行指定 Origin(如 webview、开发用的前端端口);非浏览器客户端始终不受影响
gateway.auth.tokenHeader gateway.auth.token_header str X-Echo-Agent-Token — 携带 API 令牌的请求头名
gateway.auth.pairingTtlSeconds gateway.auth.pairing_ttl_seconds int 300 — 配对模式令牌有效期(秒)
gateway.auth.allowedHosts gateway.auth.allowed_hosts list [] — 可接受的 Host 头列表。DNS rebinding 攻击中 Origin 与 Host 都是攻击者控制的字符串,比对二者无效;唯一可信信号是 Host 是否为本网关预期被访问的名字。绑 loopback 时留空默认接受 localhost/127.0.0.1/[::1];绑 0.0.0.0/:: 时留空会启动告警,且管理端点(会话/配置/记忆写入/任务/定时/知识库)会拒绝一切浏览器请求;反代时显式列出代理域名。条目会规范化后比较(忽略大小写、去端口、IPv6 方括号),通配符(0.0.0.0 / ::)不是有效条目,会被丢弃
gateway.knownPlatforms gateway.known_platforms list ['cli', 'ws', 'api', 'cron', 'dingtalk', 'discord', 'email', 'feishu', 'matrix', 'qqbot', 'slack', 'telegram', 'webhook', 'wechat', 'wecom', 'weixin', 'whatsapp'] — 网关认可的 platform 取值。客户端自报的 platform 会拼进通道名 gateway:{platform},而通道名在别处承载能力判定(如 channels.stream_optimistic_channels 断言该通道可就地重绘),所以不在此列表的取值会被折叠为 ws,而不是直接拒绝——避免打断已有的第三方接入。留空表示不做折叠(回到旧的完全自报行为)
gateway.platforms gateway.platforms dict {} — 各接入平台的网关配置(键为平台名)
gateway.platforms{}.rateLimitRpm gateway.platforms{}.rate_limit_rpm int 30 — 该平台每分钟请求上限
gateway.mediaCacheDir gateway.media_cache_dir str data/media_cache — 网关媒体缓存目录
gateway.mediaCacheMaxMb gateway.media_cache_max_mb int 500 — 媒体缓存大小上限(MB)
gateway.mediaMaxFileMb gateway.media_max_file_mb int 25 — 单个媒体文件下载大小上限(MB)。Content-Length 与实际字节流都会校验,超限即中止并删除临时文件
gateway.mediaMaxUrlsPerMessage gateway.media_max_urls_per_message int 10 — 单条消息允许携带的媒体 URL 数量上限,超出的部分被拒绝
gateway.mediaDownloadConcurrency gateway.media_download_concurrency int 4 — 媒体并行下载数上限,避免一条消息打满出站连接与内存
gateway.mediaAllowPrivateAddresses gateway.media_allow_private_addresses bool false — 是否允许媒体下载访问私有/回环地址(SSRF 风险)。与 tools.web.allowPrivateAddresses 同口径但独立开关:内网自建 CDN 可能需要开启,默认拦截。即使开启也仍然只允许 http/https
gateway.hooksDir gateway.hooks_dir str "" — 网关钩子脚本目录

planning

字段 snake type default choices 说明
planning.enabled planning.enabled bool true — 是否启用任务规划
planning.defaultStrategy planning.default_strategy str auto — 默认规划策略
planning.maxBranches planning.max_branches int 3 — 思维树(ToT)策略探索的候选分支数
planning.reflectionEnabled planning.reflection_enabled bool true — 是否启用规划反思

a2A

字段 snake type default choices 说明
a2A.enabled a2a.enabled bool true — 是否启用 A2A(agent-to-agent)接口
a2A.agentName a2a.agent_name str echo-agent — 对外暴露的 A2A 代理名
a2A.agentDescription a2a.agent_description str A modular AI agent framework — 对外暴露的 A2A 代理描述
a2A.capabilities a2a.capabilities list ['chat', 'tool_use'] — A2A AgentCard 对外声明的能力标签
a2A.taskTtlSeconds a2a.task_ttl_seconds float 3600.0 — A2A 终态任务保留时长(秒),超时后回收;tasks/get 在此窗口内仍可取回结果
a2A.maxTasks a2a.max_tasks int 1000 — A2A 任务仓库容量上限,超出时淘汰最老的终态任务
a2A.activeTaskTtlSeconds a2a.active_task_ttl_seconds float 86400.0 — 未达终态任务的兜底保留时长(秒),防卡住的任务永久占用;非任务超时

evaluation

字段 snake type default choices 说明
evaluation.datasetPath evaluation.dataset_path str data/eval — 评测数据集路径
evaluation.timeoutPerCase evaluation.timeout_per_case int 120 — 单条评测用例超时(秒)

bus

字段 snake type default choices 说明
bus.maxQueueSize bus.max_queue_size int 1000 — 事件总线队列容量上限
bus.maxConcurrency bus.max_concurrency int 50 — 事件总线并发处理上限

rateLimit

字段 snake type default choices 说明
rateLimit.sessionRpm rate_limit.session_rpm int 20 — 单会话每分钟请求上限
rateLimit.sessionBurst rate_limit.session_burst int 5 — 单会话突发请求上限

circuitBreaker

字段 snake type default choices 说明
circuitBreaker.failureThreshold circuit_breaker.failure_threshold int 5 — 触发熔断的连续失败次数
circuitBreaker.recoverySeconds circuit_breaker.recovery_seconds float 60.0 — 熔断后尝试恢复的等待时间(秒)
circuitBreaker.halfOpenMax circuit_breaker.half_open_max int 2 — 半开状态允许的试探请求数

plugins

字段 snake type default choices 说明
plugins.required plugins.required list [] — 启动必需插件,缺失、禁用或加载失败时拒绝启动
plugins.enabled plugins.enabled bool true — 是否启用插件系统
plugins.allow plugins.allow list [] — 允许加载的插件白名单
plugins.deny plugins.deny list [] — 禁止加载的插件黑名单
plugins.extraDirs plugins.extra_dirs list [] — 额外的插件搜索目录
plugins.config plugins.config dict {} — 各插件的自定义配置(键为插件名)
plugins.trustedPlugins plugins.trusted_plugins list [] — 免权限校验的可信插件列表
plugins.permissionMode plugins.permission_mode Literal compat compat/strict 插件权限模式

ui

字段 snake type default choices 说明
ui.locale ui.locale Literal auto en/zh/auto 界面语言

agent

字段 snake type default choices 说明
agent.maxIterations agent.max_iterations int 40 — agent 主循环最大迭代数
agent.artifactCompletionIterations agent.artifact_completion_iterations int 12 — 长报告在主循环预算后可用于产物收尾的额外轮次(不允许继续检索,0 禁用)
agent.maxOutputContinuations agent.max_output_continuations int 3 — 模型命中单次输出上限后自动续写的最大次数
agent.continuationOverlapChars agent.continuation_overlap_chars int 2000 — 自动续写时用于检测并去除重复文本的窗口字符数
agent.toolConcurrency.enabled agent.tool_concurrency.enabled bool true — 是否对只读、路径不冲突的工具并发执行
agent.toolConcurrency.maxConcurrent agent.tool_concurrency.max_concurrent int 4 — 工具并发上限(1 等价关闭并发,退化为串行)
agent.heartbeat.enabled agent.heartbeat.enabled bool true — 长任务静默时是否定时播报进度心跳
agent.heartbeat.firstDelaySec agent.heartbeat.first_delay_sec int 30 — 首条心跳前的静默阈值(秒),短任务不触发
agent.heartbeat.minIntervalSec agent.heartbeat.min_interval_sec int 60 — 两次可见反馈之间的最小间隔(秒),压制高频里程碑
agent.heartbeat.verbosity agent.heartbeat.verbosity Literal key_milestones key_milestones/every_tool/silent 心跳详细度:仅关键里程碑/每个工具/不发文字
agent.heartbeat.template agent.heartbeat.template str ⏳ {activity}(已用时 {elapsed}) — 心跳文案模板,支持 {elapsed} 与 {activity} 占位
agent.inspection.enabled agent.inspection.enabled bool false — 是否开启主动巡检(默认关;需在 INSPECT.md 声明巡检项)
agent.inspection.tickIntervalSec agent.inspection.tick_interval_sec int 300 — 巡检节拍器扫描到期项的间隔(秒),非每项巡检频率
agent.inspection.inspectFile agent.inspection.inspect_file str INSPECT.md — 巡检清单文件名(workspace 相对路径)
agent.inspection.maxItemsPerTick agent.inspection.max_items_per_tick int 5 — 单次节拍最多投给 agent 的到期巡检项数
agent.inspection.deliverChannel agent.inspection.deliver_channel str "" — 巡检告警投递通道(空则用注册时的 session 兜底)
agent.inspection.deliverChatId agent.inspection.deliver_chat_id str "" — 巡检告警投递会话 id(空则用注册时的 session 兜底)

evolution

字段 snake type default choices 说明
evolution.enabled evolution.enabled bool false — 是否启用自进化技能引擎
evolution.triggerMode evolution.trigger_mode Literal manual manual/threshold/scheduled 进化触发模式
evolution.thresholdTrajectories evolution.threshold_trajectories int 50 — threshold 模式触发所需轨迹数
evolution.cronExpression evolution.cron_expression str 0 4 * * * — scheduled 模式的 cron 表达式
evolution.maxCandidatesPerRun evolution.max_candidates_per_run int 3 — 单次进化生成的候选上限
evolution.maxTrajectoriesPerRun evolution.max_trajectories_per_run int 200 — 单次进化处理的轨迹上限
evolution.evalDatasetPath evolution.eval_dataset_path str data/eval/baseline.yaml — 进化评测基线数据集路径
evolution.regressionThreshold evolution.regression_threshold float 0.05 — 判定回归的分数下降阈值
evolution.requireStrictImprovement evolution.require_strict_improvement bool true — 是否要求严格改进才晋升
evolution.minEvalCases evolution.min_eval_cases int 3 — 晋升所需的最小评测用例数,样本不足则判定不确定不晋升
evolution.recordTrajectories evolution.record_trajectories bool true — 是否记录执行轨迹用于进化
evolution.trajectoryRetentionDays evolution.trajectory_retention_days int 30 — 轨迹保留天数
evolution.evolverModel evolution.evolver_model str "" — 执行进化所用模型
evolution.skillSizeLimitBytes evolution.skill_size_limit_bytes int 50000 — 进化产出技能的大小上限(字节)
evolution.redactArgs evolution.redact_args bool true — 记录轨迹时是否脱敏工具参数
evolution.evalParallel evolution.eval_parallel int 2 — 进化评测并发度
evolution.evalTimeoutSeconds evolution.eval_timeout_seconds int 60 — 进化评测单用例超时(秒)
evolution.cooldownSecondsAfterPromote evolution.cooldown_seconds_after_promote int 86400 — 晋升后再次进化的冷却时间(秒)
evolution.autoPromote evolution.auto_promote bool true — 是否自动晋升通过评测的候选
evolution.candidateReviewRequired evolution.candidate_review_required bool false — 晋升前是否需要人工审查候选

cost

字段 snake type default choices 说明
cost.enabled cost.enabled bool false — 是否启用成本追踪与预算控制
cost.dailyBudgetUsd cost.daily_budget_usd float 0.0 — 每日成本预算(美元,0 为不限)
cost.softThresholdRatio cost.soft_threshold_ratio float 0.8 — 达到预算该比例时发出软告警
cost.pricingOverrides cost.pricing_overrides dict {} — 模型定价覆盖表

workspace

字段 snake type default choices 说明
workspace workspace str ~/.echo-agent — agent 工作区根目录