mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-25 11:18:22 +00:00
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>
This commit is contained in:
parent
b62ac7672a
commit
9c944fe698
@ -106,10 +106,10 @@ checkpointer:
|
|||||||
```
|
```
|
||||||
|
|
||||||
<Callout type="info">
|
<Callout type="info">
|
||||||
The LangGraph Server manages its own state separately. The
|
DeerFlow App uses the <code>checkpointer</code> setting in <code>config.yaml</code> to
|
||||||
<code>checkpointer</code> setting in <code>config.yaml</code> applies to the
|
persist thread state through the Gateway runtime (via <code>make_checkpointer()</code> in
|
||||||
embedded <code>DeerFlowClient</code> (used in direct Python integrations), not
|
<code>deerflow.agents.checkpointer.async_provider</code>). Configure this section if you
|
||||||
to the LangGraph Server deployment used by DeerFlow App.
|
want threads to survive process restarts.
|
||||||
</Callout>
|
</Callout>
|
||||||
|
|
||||||
### Thread data storage
|
### Thread data storage
|
||||||
|
|||||||
@ -44,9 +44,17 @@ http://localhost:2026/api
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `GET` | `/api/threads` | List threads |
|
| `GET` | `/api/threads` | List threads |
|
||||||
| `DELETE` | `/api/threads/{thread_id}` | Delete a thread |
|
| `DELETE` | `/api/threads/{thread_id}` | Delete a thread |
|
||||||
| `GET` | `/api/memory` | Get global memory |
|
| `GET` | `/api/memory` | Get global memory data (context + facts) |
|
||||||
| `GET` | `/api/memory/{agent_name}` | Get agent-specific memory |
|
| `DELETE` | `/api/memory` | Clear all memory data |
|
||||||
| `DELETE` | `/api/memory` | Clear global memory |
|
| `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
|
### Extensions
|
||||||
|
|
||||||
|
|||||||
@ -44,8 +44,11 @@ models:
|
|||||||
base_url: null # Optional: custom endpoint URL
|
base_url: null # Optional: custom endpoint URL
|
||||||
request_timeout: 600.0 # Request timeout in seconds
|
request_timeout: 600.0 # Request timeout in seconds
|
||||||
max_retries: 2 # Number of retries on failure
|
max_retries: 2 # Number of retries on failure
|
||||||
supports_vision: true # Whether to enable vision capabilities
|
supports_vision: true # Whether the model accepts image inputs
|
||||||
thinking_enabled: false # Whether to enable extended thinking
|
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
|
# Any additional fields are passed through to the model constructor
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -33,4 +33,4 @@ Set in the model configuration in `config.yaml`:
|
|||||||
| Flag | Type | Description |
|
| Flag | Type | Description |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `supports_vision` | `bool` | Model accepts image inputs |
|
| `supports_vision` | `bool` | Model accepts image inputs |
|
||||||
| `thinking_enabled` | `bool` | Model supports extended thinking mode |
|
| `supports_thinking` | `bool` | Model supports extended thinking mode |
|
||||||
|
|||||||
@ -14,7 +14,7 @@ backend/
|
|||||||
│ │ ├── memory.py # Memory read/clear
|
│ │ ├── memory.py # Memory read/clear
|
||||||
│ │ ├── threads.py # Thread management
|
│ │ ├── threads.py # Thread management
|
||||||
│ │ └── uploads.py # File uploads
|
│ │ └── uploads.py # File uploads
|
||||||
│ └── main.py # FastAPI app entry point
|
│ └── app.py # FastAPI app entry point (create_app())
|
||||||
│
|
│
|
||||||
└── packages/harness/deerflow/
|
└── packages/harness/deerflow/
|
||||||
├── agents/
|
├── agents/
|
||||||
@ -85,4 +85,4 @@ frontend/src/
|
|||||||
| Skill loading (hot reload) | `skills/loader.py` |
|
| Skill loading (hot reload) | `skills/loader.py` |
|
||||||
| MCP tool cache | `mcp/cache.py` |
|
| MCP tool cache | `mcp/cache.py` |
|
||||||
| File upload handling | `uploads/manager.py` |
|
| File upload handling | `uploads/manager.py` |
|
||||||
| Gateway main router | `app/gateway/main.py` |
|
| Gateway app factory | `app/gateway/app.py` |
|
||||||
|
|||||||
@ -23,19 +23,13 @@ models:
|
|||||||
request_timeout: 600.0
|
request_timeout: 600.0
|
||||||
max_retries: 2
|
max_retries: 2
|
||||||
supports_vision: true
|
supports_vision: true
|
||||||
thinking_enabled: false
|
supports_thinking: false
|
||||||
```
|
|
||||||
</Tabs.Tab>
|
|
||||||
<Tabs.Tab>
|
|
||||||
```yaml
|
|
||||||
models:
|
|
||||||
- name: claude-sonnet
|
|
||||||
use: langchain_anthropic:ChatAnthropic
|
use: langchain_anthropic:ChatAnthropic
|
||||||
model: claude-sonnet-4-5
|
model: claude-sonnet-4-5
|
||||||
api_key: $ANTHROPIC_API_KEY
|
api_key: $ANTHROPIC_API_KEY
|
||||||
max_tokens: 16000
|
max_tokens: 16000
|
||||||
supports_vision: true
|
supports_vision: true
|
||||||
thinking_enabled: false
|
supports_thinking: false
|
||||||
```
|
```
|
||||||
|
|
||||||
启用扩展思考:
|
启用扩展思考:
|
||||||
@ -46,11 +40,10 @@ models:
|
|||||||
model: claude-sonnet-4-5
|
model: claude-sonnet-4-5
|
||||||
api_key: $ANTHROPIC_API_KEY
|
api_key: $ANTHROPIC_API_KEY
|
||||||
max_tokens: 16000
|
max_tokens: 16000
|
||||||
thinking_enabled: true
|
supports_thinking: true
|
||||||
extra_body:
|
thinking:
|
||||||
thinking:
|
type: enabled
|
||||||
type: enabled
|
budget_tokens: 10000
|
||||||
budget_tokens: 10000
|
|
||||||
```
|
```
|
||||||
</Tabs.Tab>
|
</Tabs.Tab>
|
||||||
<Tabs.Tab>
|
<Tabs.Tab>
|
||||||
@ -63,7 +56,7 @@ models:
|
|||||||
request_timeout: 600.0
|
request_timeout: 600.0
|
||||||
max_retries: 2
|
max_retries: 2
|
||||||
supports_vision: true
|
supports_vision: true
|
||||||
thinking_enabled: false
|
supports_thinking: false
|
||||||
```
|
```
|
||||||
</Tabs.Tab>
|
</Tabs.Tab>
|
||||||
<Tabs.Tab>
|
<Tabs.Tab>
|
||||||
@ -77,7 +70,7 @@ models:
|
|||||||
request_timeout: 600.0
|
request_timeout: 600.0
|
||||||
max_retries: 2
|
max_retries: 2
|
||||||
supports_vision: false
|
supports_vision: false
|
||||||
thinking_enabled: true
|
supports_thinking: true
|
||||||
```
|
```
|
||||||
</Tabs.Tab>
|
</Tabs.Tab>
|
||||||
<Tabs.Tab>
|
<Tabs.Tab>
|
||||||
@ -90,7 +83,7 @@ models:
|
|||||||
request_timeout: 600.0
|
request_timeout: 600.0
|
||||||
max_retries: 2
|
max_retries: 2
|
||||||
supports_vision: false
|
supports_vision: false
|
||||||
thinking_enabled: false
|
supports_thinking: false
|
||||||
```
|
```
|
||||||
|
|
||||||
确保 Ollama 已运行并已拉取所需模型:
|
确保 Ollama 已运行并已拉取所需模型:
|
||||||
|
|||||||
@ -44,9 +44,16 @@ http://localhost:2026/api
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `GET` | `/api/threads` | 列出线程 |
|
| `GET` | `/api/threads` | 列出线程 |
|
||||||
| `DELETE` | `/api/threads/{thread_id}` | 删除线程 |
|
| `DELETE` | `/api/threads/{thread_id}` | 删除线程 |
|
||||||
| `GET` | `/api/memory` | 获取全局记忆 |
|
| `GET` | `/api/memory` | 获取全局记忆数据(上下文 + 事实) |
|
||||||
| `GET` | `/api/memory/{agent_name}` | 获取 Agent 特定记忆 |
|
| `DELETE` | `/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` | 一次性获取记忆配置和数据 |
|
||||||
|
|
||||||
### 扩展
|
### 扩展
|
||||||
|
|
||||||
|
|||||||
@ -44,8 +44,11 @@ models:
|
|||||||
base_url: null # 可选:自定义端点
|
base_url: null # 可选:自定义端点
|
||||||
request_timeout: 600.0 # 请求超时(秒)
|
request_timeout: 600.0 # 请求超时(秒)
|
||||||
max_retries: 2 # 重试次数
|
max_retries: 2 # 重试次数
|
||||||
supports_vision: true # 是否启用视觉功能
|
supports_vision: true # 模型是否接受图像输入
|
||||||
thinking_enabled: false # 是否启用扩展思考
|
supports_thinking: false # 模型是否支持扩展思考
|
||||||
|
# thinking: {} # 可选思考配置(思考激活时传入)
|
||||||
|
# when_thinking_enabled: {} # 思考启用时的可选覆盖设置
|
||||||
|
# when_thinking_disabled: {} # 思考禁用时的可选覆盖设置
|
||||||
# 任何其他字段都会传递给模型构造函数
|
# 任何其他字段都会传递给模型构造函数
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -33,4 +33,4 @@
|
|||||||
| 标志 | 类型 | 描述 |
|
| 标志 | 类型 | 描述 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `supports_vision` | `bool` | 模型接受图像输入 |
|
| `supports_vision` | `bool` | 模型接受图像输入 |
|
||||||
| `thinking_enabled` | `bool` | 模型支持扩展思考模式 |
|
| `supports_thinking` | `bool` | 模型支持扩展思考模式 |
|
||||||
|
|||||||
@ -14,7 +14,7 @@ backend/
|
|||||||
│ │ ├── memory.py # 记忆读取/清除
|
│ │ ├── memory.py # 记忆读取/清除
|
||||||
│ │ ├── threads.py # 线程管理
|
│ │ ├── threads.py # 线程管理
|
||||||
│ │ └── uploads.py # 文件上传
|
│ │ └── uploads.py # 文件上传
|
||||||
│ └── main.py # FastAPI 应用入口
|
│ └── app.py # FastAPI 应用入口(create_app())
|
||||||
│
|
│
|
||||||
└── packages/harness/deerflow/
|
└── packages/harness/deerflow/
|
||||||
├── agents/
|
├── agents/
|
||||||
@ -85,4 +85,4 @@ frontend/src/
|
|||||||
| 技能加载(热重载) | `skills/loader.py` |
|
| 技能加载(热重载) | `skills/loader.py` |
|
||||||
| MCP 工具缓存 | `mcp/cache.py` |
|
| MCP 工具缓存 | `mcp/cache.py` |
|
||||||
| 文件上传处理 | `uploads/manager.py` |
|
| 文件上传处理 | `uploads/manager.py` |
|
||||||
| Gateway 主路由器 | `app/gateway/main.py` |
|
| Gateway 应用工厂 | `app/gateway/app.py` |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user