You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-45Lines changed: 58 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,35 +104,45 @@ That prompt is intended for coding agents. It tells the agent to clone the repo
104
104
cd deer-flow
105
105
```
106
106
107
-
2.**Generate local configuration files**
107
+
2.**Run the setup wizard**
108
108
109
109
From the project root directory (`deer-flow/`), run:
110
110
111
111
```bash
112
-
make config
112
+
make setup
113
113
```
114
114
115
-
This command creates local configuration files based on the provided example templates.
115
+
This launches an interactive wizard that guides you through choosing an LLM provider, optional web search, and execution/safety preferences such as sandbox mode, bash access, and file-write tools. It generates a minimal `config.yaml` and writes your keys to `.env`. Takes about 2 minutes.
116
116
117
-
3.**Configure your preferred model(s)**
117
+
The wizard also lets you configure an optional web search provider, or skip it for now.
118
118
119
-
Edit `config.yaml` and define at least one model:
119
+
Run `make doctor` at any time to verify your setup and get actionable fix hints.
120
+
121
+
> **Advanced / manual configuration**: If you prefer to edit `config.yaml` directly, run `make config` instead to copy the full template. See `config.example.yaml` for the complete reference including CLI-backed providers (Codex CLI, Claude Code OAuth), OpenRouter, Responses API, and more.
122
+
123
+
> **Custom Agent UI**: If you want to create and manage custom agents from the web UI, enable the protected HTTP API in `config.yaml`:
124
+
>
125
+
> ```yaml
126
+
> agents_api:
127
+
> enabled: true
128
+
> ```
129
+
130
+
<details>
131
+
<summary>Manual model configuration examples</summary>
120
132
121
133
```yaml
122
134
models:
123
-
- name: gpt-4 # Internal identifier
124
-
display_name: GPT-4 # Human-readable name
125
-
use: langchain_openai:ChatOpenAI # LangChain class path
126
-
model: gpt-4 # Model identifier for API
127
-
api_key: $OPENAI_API_KEY # API key (recommended: use env var)
128
-
max_tokens: 4096# Maximum tokens per request
129
-
temperature: 0.7# Sampling temperature
135
+
- name: gpt-4o
136
+
display_name: GPT-4o
137
+
use: langchain_openai:ChatOpenAI
138
+
model: gpt-4o
139
+
api_key: $OPENAI_API_KEY
130
140
131
141
- name: openrouter-gemini-2.5-flash
132
142
display_name: Gemini 2.5 Flash (OpenRouter)
133
143
use: langchain_openai:ChatOpenAI
134
144
model: google/gemini-2.5-flash-preview
135
-
api_key: $OPENAI_API_KEY # OpenRouter still uses the OpenAI-compatible field name here
145
+
api_key: $OPENROUTER_API_KEY
136
146
base_url: https://openrouter.ai/api/v1
137
147
138
148
- name: gpt-5-responses
@@ -182,47 +192,22 @@ That prompt is intended for coding agents. It tells the agent to clone the repo
182
192
```
183
193
184
194
- Codex CLI reads `~/.codex/auth.json`
185
-
- The Codex Responses endpoint currently rejects `max_tokens` and `max_output_tokens`, so `CodexChatModel` does not expose a request-level token cap
186
-
- Claude Code accepts `CLAUDE_CODE_OAUTH_TOKEN`, `ANTHROPIC_AUTH_TOKEN`, `CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`, `CLAUDE_CODE_CREDENTIALS_PATH`, or plaintext `~/.claude/.credentials.json`
187
-
- ACP agent entries are separate from model providers. If you configure `acp_agents.codex`, point it at a Codex ACP adapter such as `npx -y @zed-industries/codex-acp`; the standard `codex` CLI binary is not ACP-compatible by itself
188
-
- On macOS, DeerFlow does not probe Keychain automatically. Export Claude Code auth explicitly if needed:
195
+
- Claude Code accepts `CLAUDE_CODE_OAUTH_TOKEN`, `ANTHROPIC_AUTH_TOKEN`, `CLAUDE_CODE_CREDENTIALS_PATH`, or `~/.claude/.credentials.json`
196
+
- ACP agent entries are separate from model providers — if you configure `acp_agents.codex`, point it at a Codex ACP adapter such as `npx -y @zed-industries/codex-acp`
197
+
- On macOS, export Claude Code auth explicitly if needed:
@@ -276,7 +261,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed Docker development guide.
276
261
277
262
If you prefer running services locally:
278
263
279
-
Prerequisite: complete the "Configuration" steps above first (`make config` and model API keys). `make dev` requires a valid configuration file (defaults to `config.yaml` in the project root; can be overridden via `DEER_FLOW_CONFIG_PATH`).
264
+
Prerequisite: complete the "Configuration" steps above first (`make setup`). `make dev` requires a valid `config.yaml` in the project root (can be overridden via `DEER_FLOW_CONFIG_PATH`). Run `make doctor` to verify your setup before starting.
280
265
On Windows, run the local development flow from Git Bash. Native `cmd.exe` and PowerShell shells are not supported for the bash-based service scripts, and WSL is not guaranteed because some scripts rely on Git for Windows utilities such as `cygpath`.
281
266
282
267
1. **Check prerequisites**:
@@ -390,6 +375,7 @@ DeerFlow supports receiving tasks from messaging apps. Channels auto-start when
3. Under **Events**, subscribe to `im.message.receive_v1` and select **Long Connection** mode.
493
496
4. Copy the App ID and App Secret. Set `FEISHU_APP_ID` and `FEISHU_APP_SECRET` in `.env` and enable the channel in `config.yaml`.
494
497
498
+
**WeChat Setup**
499
+
500
+
1. Enable the `wechat` channel in `config.yaml`.
501
+
2. Either set `WECHAT_BOT_TOKEN` in `.env`, or set `qrcode_login_enabled: true` for first-time QR bootstrap.
502
+
3. When `bot_token` is absent and QR bootstrap is enabled, watch backend logs for the QR content returned by iLink and complete the binding flow.
503
+
4. After the QR flow succeeds, DeerFlow persists the acquired token under `state_dir` for later restarts.
504
+
5. For Docker Compose deployments, keep `state_dir` on a persistent volume so the `get_updates_buf` cursor and saved auth state survive restarts.
505
+
495
506
**WeCom Setup**
496
507
497
508
1. Create a bot on the WeCom AI Bot platform and obtain the `bot_id` and `bot_secret`.
@@ -654,6 +665,8 @@ This is the difference between a chatbot with tool access and an agent with an a
654
665
655
666
**Summarization**: Within a session, DeerFlow manages context aggressively — summarizing completed sub-tasks, offloading intermediate results to the filesystem, compressing what's no longer immediately relevant. This lets it stay sharp across long, multi-step tasks without blowing the context window.
656
667
668
+
**Strict Tool-Call Recovery**: When a provider or middleware interrupts a tool-call loop, DeerFlow now strips provider-level raw tool-call metadata on forced-stop assistant messages and injects placeholder tool results for dangling calls before the next model invocation. This keeps OpenAI-compatible reasoning models that strictly validate `tool_call_id` sequences from failing with malformed history errors.
669
+
657
670
### Long-Term Memory
658
671
659
672
Most agents forget everything the moment a conversation ends. DeerFlow remembers.
0 commit comments