From 9c944fe69844ee1f5444beaedc5579acc217d241 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 07:04:24 +0000 Subject: [PATCH] docs: fix review feedback - source-map paths, memory API routes, supports_thinking, checkpointer callout Agent-Logs-Url: https://github.com/bytedance/deer-flow/sessions/fb75dc8c-18a4-4a23-9229-25b3c5e545cf Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> --- .../en/application/agents-and-threads.mdx | 8 +++--- .../en/reference/api-gateway-reference.mdx | 14 ++++++++--- .../en/reference/configuration-reference.mdx | 7 ++++-- .../en/reference/runtime-flags-and-modes.mdx | 2 +- .../src/content/en/reference/source-map.mdx | 4 +-- .../content/zh/application/configuration.mdx | 25 +++++++------------ .../zh/reference/api-gateway-reference.mdx | 13 +++++++--- .../zh/reference/configuration-reference.mdx | 7 ++++-- .../zh/reference/runtime-flags-and-modes.mdx | 2 +- .../src/content/zh/reference/source-map.mdx | 4 +-- 10 files changed, 50 insertions(+), 36 deletions(-) diff --git a/frontend/src/content/en/application/agents-and-threads.mdx b/frontend/src/content/en/application/agents-and-threads.mdx index a6be84331..21f71f0c4 100644 --- a/frontend/src/content/en/application/agents-and-threads.mdx +++ b/frontend/src/content/en/application/agents-and-threads.mdx @@ -106,10 +106,10 @@ checkpointer: ``` - The LangGraph Server manages its own state separately. The - checkpointer setting in config.yaml applies to the - embedded DeerFlowClient (used in direct Python integrations), not - to the LangGraph Server deployment used by DeerFlow App. + DeerFlow App uses the checkpointer setting in config.yaml to + persist thread state through the Gateway runtime (via make_checkpointer() in + deerflow.agents.checkpointer.async_provider). Configure this section if you + want threads to survive process restarts. ### Thread data storage diff --git a/frontend/src/content/en/reference/api-gateway-reference.mdx b/frontend/src/content/en/reference/api-gateway-reference.mdx index 39e068700..32fb1fdd9 100644 --- a/frontend/src/content/en/reference/api-gateway-reference.mdx +++ b/frontend/src/content/en/reference/api-gateway-reference.mdx @@ -44,9 +44,17 @@ http://localhost:2026/api |---|---|---| | `GET` | `/api/threads` | List threads | | `DELETE` | `/api/threads/{thread_id}` | Delete a thread | -| `GET` | `/api/memory` | Get global memory | -| `GET` | `/api/memory/{agent_name}` | Get agent-specific memory | -| `DELETE` | `/api/memory` | Clear global memory | +| `GET` | `/api/memory` | Get global memory data (context + facts) | +| `DELETE` | `/api/memory` | Clear all memory data | +| `POST` | `/api/memory/reload` | Reload memory from storage file | +| `GET` | `/api/memory/facts` | (included in `/api/memory` response `facts` array) | +| `POST` | `/api/memory/facts` | Create a memory fact | +| `PATCH` | `/api/memory/facts/{fact_id}` | Update a memory fact | +| `DELETE` | `/api/memory/facts/{fact_id}` | Delete a memory fact | +| `GET` | `/api/memory/export` | Export memory data as JSON | +| `POST` | `/api/memory/import` | Import and overwrite memory data | +| `GET` | `/api/memory/config` | Get memory configuration | +| `GET` | `/api/memory/status` | Get memory config + data in one request | ### Extensions diff --git a/frontend/src/content/en/reference/configuration-reference.mdx b/frontend/src/content/en/reference/configuration-reference.mdx index 3d67e063d..f6e6b1d26 100644 --- a/frontend/src/content/en/reference/configuration-reference.mdx +++ b/frontend/src/content/en/reference/configuration-reference.mdx @@ -44,8 +44,11 @@ models: base_url: null # Optional: custom endpoint URL request_timeout: 600.0 # Request timeout in seconds max_retries: 2 # Number of retries on failure - supports_vision: true # Whether to enable vision capabilities - thinking_enabled: false # Whether to enable extended thinking + supports_vision: true # Whether the model accepts image inputs + supports_thinking: false # Whether the model supports extended thinking + # thinking: {} # Optional thinking config (passed when thinking is active) + # when_thinking_enabled: {} # Optional overrides applied when thinking is enabled + # when_thinking_disabled: {} # Optional overrides applied when thinking is disabled # Any additional fields are passed through to the model constructor ``` diff --git a/frontend/src/content/en/reference/runtime-flags-and-modes.mdx b/frontend/src/content/en/reference/runtime-flags-and-modes.mdx index b189bc96d..19fdb96db 100644 --- a/frontend/src/content/en/reference/runtime-flags-and-modes.mdx +++ b/frontend/src/content/en/reference/runtime-flags-and-modes.mdx @@ -33,4 +33,4 @@ Set in the model configuration in `config.yaml`: | Flag | Type | Description | |---|---|---| | `supports_vision` | `bool` | Model accepts image inputs | -| `thinking_enabled` | `bool` | Model supports extended thinking mode | +| `supports_thinking` | `bool` | Model supports extended thinking mode | diff --git a/frontend/src/content/en/reference/source-map.mdx b/frontend/src/content/en/reference/source-map.mdx index 9db8942d8..fa53d299a 100644 --- a/frontend/src/content/en/reference/source-map.mdx +++ b/frontend/src/content/en/reference/source-map.mdx @@ -14,7 +14,7 @@ backend/ │ │ ├── memory.py # Memory read/clear │ │ ├── threads.py # Thread management │ │ └── uploads.py # File uploads -│ └── main.py # FastAPI app entry point +│ └── app.py # FastAPI app entry point (create_app()) │ └── packages/harness/deerflow/ ├── agents/ @@ -85,4 +85,4 @@ frontend/src/ | Skill loading (hot reload) | `skills/loader.py` | | MCP tool cache | `mcp/cache.py` | | File upload handling | `uploads/manager.py` | -| Gateway main router | `app/gateway/main.py` | +| Gateway app factory | `app/gateway/app.py` | diff --git a/frontend/src/content/zh/application/configuration.mdx b/frontend/src/content/zh/application/configuration.mdx index 011171f3a..f9ba38fe7 100644 --- a/frontend/src/content/zh/application/configuration.mdx +++ b/frontend/src/content/zh/application/configuration.mdx @@ -23,19 +23,13 @@ models: request_timeout: 600.0 max_retries: 2 supports_vision: true - thinking_enabled: false -``` - - -```yaml -models: - - name: claude-sonnet + supports_thinking: false use: langchain_anthropic:ChatAnthropic model: claude-sonnet-4-5 api_key: $ANTHROPIC_API_KEY max_tokens: 16000 supports_vision: true - thinking_enabled: false + supports_thinking: false ``` 启用扩展思考: @@ -46,11 +40,10 @@ models: model: claude-sonnet-4-5 api_key: $ANTHROPIC_API_KEY max_tokens: 16000 - thinking_enabled: true - extra_body: - thinking: - type: enabled - budget_tokens: 10000 + supports_thinking: true + thinking: + type: enabled + budget_tokens: 10000 ``` @@ -63,7 +56,7 @@ models: request_timeout: 600.0 max_retries: 2 supports_vision: true - thinking_enabled: false + supports_thinking: false ``` @@ -77,7 +70,7 @@ models: request_timeout: 600.0 max_retries: 2 supports_vision: false - thinking_enabled: true + supports_thinking: true ``` @@ -90,7 +83,7 @@ models: request_timeout: 600.0 max_retries: 2 supports_vision: false - thinking_enabled: false + supports_thinking: false ``` 确保 Ollama 已运行并已拉取所需模型: diff --git a/frontend/src/content/zh/reference/api-gateway-reference.mdx b/frontend/src/content/zh/reference/api-gateway-reference.mdx index 8d819b1d8..0739cab35 100644 --- a/frontend/src/content/zh/reference/api-gateway-reference.mdx +++ b/frontend/src/content/zh/reference/api-gateway-reference.mdx @@ -44,9 +44,16 @@ http://localhost:2026/api |---|---|---| | `GET` | `/api/threads` | 列出线程 | | `DELETE` | `/api/threads/{thread_id}` | 删除线程 | -| `GET` | `/api/memory` | 获取全局记忆 | -| `GET` | `/api/memory/{agent_name}` | 获取 Agent 特定记忆 | -| `DELETE` | `/api/memory` | 清除全局记忆 | +| `GET` | `/api/memory` | 获取全局记忆数据(上下文 + 事实) | +| `DELETE` | `/api/memory` | 清除所有记忆数据 | +| `POST` | `/api/memory/reload` | 从存储文件重新加载记忆 | +| `POST` | `/api/memory/facts` | 创建一条记忆事实 | +| `PATCH` | `/api/memory/facts/{fact_id}` | 更新一条记忆事实 | +| `DELETE` | `/api/memory/facts/{fact_id}` | 删除一条记忆事实 | +| `GET` | `/api/memory/export` | 导出记忆数据为 JSON | +| `POST` | `/api/memory/import` | 导入并覆盖记忆数据 | +| `GET` | `/api/memory/config` | 获取记忆配置 | +| `GET` | `/api/memory/status` | 一次性获取记忆配置和数据 | ### 扩展 diff --git a/frontend/src/content/zh/reference/configuration-reference.mdx b/frontend/src/content/zh/reference/configuration-reference.mdx index 0fb2acb23..ef3ff6a5b 100644 --- a/frontend/src/content/zh/reference/configuration-reference.mdx +++ b/frontend/src/content/zh/reference/configuration-reference.mdx @@ -44,8 +44,11 @@ models: base_url: null # 可选:自定义端点 request_timeout: 600.0 # 请求超时(秒) max_retries: 2 # 重试次数 - supports_vision: true # 是否启用视觉功能 - thinking_enabled: false # 是否启用扩展思考 + supports_vision: true # 模型是否接受图像输入 + supports_thinking: false # 模型是否支持扩展思考 + # thinking: {} # 可选思考配置(思考激活时传入) + # when_thinking_enabled: {} # 思考启用时的可选覆盖设置 + # when_thinking_disabled: {} # 思考禁用时的可选覆盖设置 # 任何其他字段都会传递给模型构造函数 ``` diff --git a/frontend/src/content/zh/reference/runtime-flags-and-modes.mdx b/frontend/src/content/zh/reference/runtime-flags-and-modes.mdx index e6eae11fe..643c82493 100644 --- a/frontend/src/content/zh/reference/runtime-flags-and-modes.mdx +++ b/frontend/src/content/zh/reference/runtime-flags-and-modes.mdx @@ -33,4 +33,4 @@ | 标志 | 类型 | 描述 | |---|---|---| | `supports_vision` | `bool` | 模型接受图像输入 | -| `thinking_enabled` | `bool` | 模型支持扩展思考模式 | +| `supports_thinking` | `bool` | 模型支持扩展思考模式 | diff --git a/frontend/src/content/zh/reference/source-map.mdx b/frontend/src/content/zh/reference/source-map.mdx index 0d5711def..a18ccd6f9 100644 --- a/frontend/src/content/zh/reference/source-map.mdx +++ b/frontend/src/content/zh/reference/source-map.mdx @@ -14,7 +14,7 @@ backend/ │ │ ├── memory.py # 记忆读取/清除 │ │ ├── threads.py # 线程管理 │ │ └── uploads.py # 文件上传 -│ └── main.py # FastAPI 应用入口 +│ └── app.py # FastAPI 应用入口(create_app()) │ └── packages/harness/deerflow/ ├── agents/ @@ -85,4 +85,4 @@ frontend/src/ | 技能加载(热重载) | `skills/loader.py` | | MCP 工具缓存 | `mcp/cache.py` | | 文件上传处理 | `uploads/manager.py` | -| Gateway 主路由器 | `app/gateway/main.py` | +| Gateway 应用工厂 | `app/gateway/app.py` |