import { Callout } from "nextra/components"; # 配置参考 本页面提供 `config.yaml` 中所有顶层字段的完整参考。 查看仓库根目录中的 config.example.yaml 获取带注释的完整配置示例。 ## 顶层字段 | 字段 | 类型 | 说明 | |---|---|---| | `config_version` | `int` | 配置 schema 版本(当前:6) | | `log_level` | `str` | 日志级别:`debug`/`info`/`warning`/`error` | | `models` | `list` | 可用的 LLM 模型配置 | | `image_generate_model` | `str \| list` | 图像生成使用的模型名称 | | `token_usage` | `object` | Token 使用追踪配置 | | `tools` | `list` | 可用工具配置 | | `tool_groups` | `list` | 工具的命名分组 | | `tool_search` | `object` | 延迟工具加载配置 | | `sandbox` | `object` | 沙箱提供者配置 | | `skills` | `object` | 技能目录和容器路径 | | `skill_evolution` | `object` | Agent 管理的技能创建 | | `subagents` | `object` | 子 Agent 超时和最大轮次 | | `acp_agents` | `dict` | 外部 ACP Agent 配置 | | `memory` | `object` | 跨会话记忆存储 | | `summarization` | `object` | 对话摘要压缩 | | `title` | `object` | 自动线程标题生成 | | `checkpointer` | `object` | 线程状态持久化 | | `guardrails` | `object` | 工具调用授权 | | `uploads` | `object` | 文件上传配置 | | `channels` | `list` | IM 频道集成 | ## models ```yaml models: - name: gpt-4o # 模型标识符(在请求中引用) use: langchain_openai:ChatOpenAI # Python 类路径 model: gpt-4o # 传给 LLM 的模型名称 api_key: $OPENAI_API_KEY # API 密钥(支持环境变量) base_url: null # 可选:自定义端点 request_timeout: 600.0 # 请求超时(秒) max_retries: 2 # 重试次数 supports_vision: true # 是否启用视觉功能 thinking_enabled: false # 是否启用扩展思考 # 任何其他字段都会传递给模型构造函数 ``` ## sandbox ```yaml sandbox: # 本地(默认,无容器隔离) use: deerflow.sandbox.local:LocalSandboxProvider allow_host_bash: false bash_output_max_chars: 20000 read_file_output_max_chars: 50000 ls_output_max_chars: 20000 # 基于容器 # use: deerflow.community.aio_sandbox:AioSandboxProvider # image: enterprise-public-cn-beijing.cr.volces.com/vefaas-public/all-in-one-sandbox:latest # replicas: 3 # idle_timeout: 600 ``` ## memory ```yaml memory: enabled: true storage_path: memory.json debounce_seconds: 30 max_facts: 100 fact_confidence_threshold: 0.7 injection_enabled: true max_injection_tokens: 2000 model_name: null ``` ## summarization ```yaml summarization: enabled: true model_name: null trigger: - type: tokens value: 15564 keep: type: messages value: 10 trim_tokens_to_summarize: 15564 summary_prompt: null ``` ## checkpointer ```yaml checkpointer: type: sqlite # sqlite | redis | postgres connection_string: .deer-flow/checkpoints.db ``` ## subagents ```yaml subagents: timeout_seconds: 900 agents: general-purpose: timeout_seconds: 1800 max_turns: 160 bash: timeout_seconds: 300 max_turns: 80 ``` 参见各功能的文档页面了解所有字段的详细说明。