forked from bytedance/deer-flow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
2285 lines (2146 loc) · 106 KB
/
Copy pathconfig.example.yaml
File metadata and controls
2285 lines (2146 loc) · 106 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Configuration for the DeerFlow application
#
# Guidelines:
# - Copy this file to `config.yaml` and customize it for your environment
# - The default path of this configuration file is `config.yaml` in the project root.
# You can set `DEER_FLOW_PROJECT_ROOT` to define that root explicitly, or use
# `DEER_FLOW_CONFIG_PATH` to point at a specific config file.
# - Runtime state defaults to `.deer-flow` under the project root. Override it
# with `DEER_FLOW_HOME` when you need a different writable data directory.
# - Environment variables are available for all field values. Example: `api_key: $OPENAI_API_KEY`
# - The `use` path is a string that looks like "package_name.sub_package_name.module_name:class_name/variable_name".
# ============================================================================
# Config Version (used to detect outdated config files)
# ============================================================================
# Bump this number when the config schema changes.
# Run `make config-upgrade` to merge new fields into your local config.yaml.
config_version: 29
# ============================================================================
# Logging
# ============================================================================
# Log level for deerflow modules (debug/info/warning/error)
log_level: info
# Request trace correlation for Gateway logs, HTTP response headers, and
# Langfuse metadata. Disabled by default to preserve existing HTTP/log output.
logging:
enhance:
enabled: false
format: text
# ============================================================================
# Agent Extensions
# ============================================================================
# Optional AgentMiddleware classes loaded into the lead and subagent runtime
# middleware chains after built-in runtime middlewares, but before the
# safety/clarification tail. Missing packages, invalid classes, and broken
# modules fail loudly at agent creation with an actionable import error.
# The same zero-argument class list applies to both lead and subagent runtimes;
# lead-only vs subagent-only configuration is not expressible yet. Treat these
# files as trusted operator config because middleware classes execute code.
# Uncomment this block to define middlewares in config.yaml. Leaving it commented
# lets extensions_config.json remain the source of truth for extension packages.
# extensions:
# middlewares:
# - my_company.deerflow_middlewares:DomainGuardMiddleware
# - my_company.deerflow_middlewares:LatencyStampingMiddleware
# ============================================================================
# Tracing / Observability (Monocle)
# ============================================================================
# Optional agent tracing via Monocle. Configured through environment variables
# (MONOCLE_TRACING, MONOCLE_EXPORTERS, OKAHU_API_KEY — like LangSmith/Langfuse),
# not config.yaml keys, and OFF by default. See README.md → "Monocle Tracing"
# for setup, what each exporter captures, and where the trace data goes.
# ============================================================================
# Token Usage
# ============================================================================
# Enable token usage collection and display.
# When enabled, DeerFlow records input/output/total tokens per model call
# and shows usage metadata in the workspace UI when providers return it.
token_usage:
enabled: true
# ============================================================================
# Token Budget — Per-run token limits
# ============================================================================
# Prevents runaway API costs by enforcing hard token limits per run.
# When warn_threshold is crossed, the agent receives an in-context warning.
# When hard_stop_threshold is crossed, tool_calls are stripped and the agent
# is forced to produce a final answer immediately.
token_budget:
enabled: false # Set to true to activate budget enforcement
max_tokens: 200000 # Total token limit (input + output) per run
max_input_tokens: null # Optional separate input-only limit
max_output_tokens: null # Optional separate output-only limit
warn_threshold: 0.8 # Warn at 80% of the budget
hard_stop_threshold: 1.0 # Force stop at 100% of the budget
# ============================================================================
# Recursion Limit — Hard ceiling for a client-supplied run recursion_limit
# ============================================================================
# A run's recursion_limit caps the number of LangGraph super-steps (each is at
# least one LLM call). The Gateway never trusts a client-supplied value
# verbatim: any value above this ceiling is clamped down to it, preventing
# runaway API cost / DoS. Invalid or non-positive client values fall back to
# the server default of 100. Raise this only if you legitimately run very
# deeply nested subagent graphs.
max_recursion_limit: 1000
# ============================================================================
# Models Configuration
# ============================================================================
# Configure available LLM models for the agent to use
#
# Optional per-model pricing (powers the real-cost display on the workspace
# console). Add a `pricing` block to any model entry; use ONE currency across
# all models. Prices are per one million tokens.
#
# pricing:
# currency: CNY # ISO code shown in the console (CNY, USD, ...)
# input_per_million: 8.0 # price per 1M input tokens (cache miss)
# output_per_million: 32.0 # price per 1M output tokens
# input_cache_hit_per_million: 0.8 # price per 1M cache-hit input tokens
# # (optional; omit → hits billed at miss price)
models:
# Example: Volcengine (Doubao) model
# - name: doubao-seed-1.8
# display_name: Doubao-Seed-1.8
# use: deerflow.models.patched_deepseek:PatchedChatDeepSeek
# model: doubao-seed-1-8-251228
# api_base: https://ark.cn-beijing.volces.com/api/v3
# api_key: $VOLCENGINE_API_KEY
# timeout: 600.0
# max_retries: 2
# supports_thinking: true
# supports_vision: true
# supports_reasoning_effort: true
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# Example: Volcengine Coding Plan (one key, multi-vendor gateway)
# The Coding Plan endpoint (/api/coding/v3) lets you access models from
# Doubao, GLM, DeepSeek, Kimi, and MiniMax with a single API key.
# Each model may differ in thinking/vision support - configure per-model.
#
# - name: glm-5.2-cp
# display_name: GLM-5.2 (Coding Plan)
# use: deerflow.models.patched_deepseek:PatchedChatDeepSeek
# model: glm-5.2
# api_base: https://ark.cn-beijing.volces.com/api/coding/v3
# api_key: $VOLCENGINE_API_KEY
# timeout: 600.0
# max_retries: 2
# supports_thinking: true
# supports_vision: false
# supports_reasoning_effort: true
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
#
# - name: deepseek-v4-pro-cp
# display_name: DeepSeek-V4-Pro (Coding Plan)
# use: deerflow.models.patched_deepseek:PatchedChatDeepSeek
# model: deepseek-v4-pro
# api_base: https://ark.cn-beijing.volces.com/api/coding/v3
# api_key: $VOLCENGINE_API_KEY
# timeout: 600.0
# max_retries: 2
# supports_thinking: true
# supports_vision: false
# supports_reasoning_effort: true
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# Example: OpenAI model
# - name: gpt-4
# display_name: GPT-4
# use: langchain_openai:ChatOpenAI
# model: gpt-4
# api_key: $OPENAI_API_KEY # Use environment variable
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# temperature: 0.7
# supports_vision: true # Enable vision support for view_image tool
# Example: OpenAI Responses API model
# - name: gpt-5-responses
# display_name: GPT-5 (Responses API)
# use: langchain_openai:ChatOpenAI
# model: gpt-5
# api_key: $OPENAI_API_KEY
# request_timeout: 600.0
# max_retries: 2
# use_responses_api: true
# output_version: responses/v1
# supports_vision: true
# Example: Ollama (native provider — preserves thinking/reasoning content)
#
# IMPORTANT: Use langchain_ollama:ChatOllama instead of langchain_openai:ChatOpenAI
# for Ollama models. The OpenAI-compatible endpoint (/v1/chat/completions) does NOT
# return reasoning_content as a separate field — thinking content is either flattened
# into <think> tags or dropped entirely (ollama/ollama#15293). The native Ollama API
# (/api/chat) correctly separates thinking from response content.
#
# Install: cd backend && uv pip install 'deerflow-harness[ollama]'
#
# - name: qwen3-local
# display_name: Qwen3 32B (Ollama)
# use: langchain_ollama:ChatOllama
# model: qwen3:32b
# base_url: http://localhost:11434 # No /v1 suffix — uses native /api/chat
# num_predict: 8192
# temperature: 0.7
# reasoning: true # Passes think:true to Ollama native API
# supports_thinking: true
# supports_vision: false
#
# - name: gemma4-local
# display_name: Gemma 4 27B (Ollama)
# use: langchain_ollama:ChatOllama
# model: gemma4:27b
# base_url: http://localhost:11434
# num_predict: 8192
# temperature: 0.7
# reasoning: true
# supports_thinking: true
# supports_vision: true
#
# For Docker deployments, use host.docker.internal instead of localhost:
# base_url: http://host.docker.internal:11434
# Example: Anthropic Claude model (with extended thinking)
# supports_thinking: true is required — without it, DeerFlow silently falls
# back to non-thinking mode even when the UI thinking toggle is on.
# budget_tokens is required by the Anthropic API when thinking.type=enabled
# (no server default; min 1024; must be less than max_tokens).
# - name: claude-sonnet-4
# display_name: Claude Sonnet 4
# use: langchain_anthropic:ChatAnthropic
# model: claude-sonnet-4-20250514
# api_key: $ANTHROPIC_API_KEY
# default_request_timeout: 600.0
# max_retries: 2
# max_tokens: 16000
# supports_vision: true
# supports_thinking: true
# when_thinking_enabled:
# thinking:
# type: enabled
# budget_tokens: 4096 # required; min 1024; must be < max_tokens
# when_thinking_disabled:
# thinking:
# type: disabled
# Example: Google Gemini model (native SDK, no thinking support)
# - name: gemini-2.5-pro
# display_name: Gemini 2.5 Pro
# use: langchain_google_genai:ChatGoogleGenerativeAI
# model: gemini-2.5-pro
# gemini_api_key: $GEMINI_API_KEY
# timeout: 600.0
# max_retries: 2
# max_tokens: 8192
# supports_vision: true
# Example: Gemini model via OpenAI-compatible gateway (with thinking support)
# Use PatchedChatOpenAI so that tool-call thought_signature values on tool_calls
# are preserved across multi-turn tool-call conversations — required by the
# Gemini API when thinking is enabled. See:
# https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures
# - name: gemini-2.5-pro-thinking
# display_name: Gemini 2.5 Pro (Thinking)
# use: deerflow.models.patched_openai:PatchedChatOpenAI
# model: google/gemini-2.5-pro-preview # model name as expected by your gateway
# api_key: $GEMINI_API_KEY
# base_url: https://<your-openai-compat-gateway>/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 16384
# supports_thinking: true
# supports_vision: true
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# Example: Xiaomi MiMo model (with thinking support)
# MiMo thinking mode returns reasoning_content and requires that field to be
# replayed on historical assistant messages in multi-turn agent/tool-call
# conversations. Use PatchedChatMiMo instead of plain ChatOpenAI.
# Use https://api.xiaomimimo.com/v1 with pay-as-you-go `sk-...` keys.
# Use your Token Plan regional URL (for example
# https://token-plan-cn.xiaomimimo.com/v1) with Token Plan `tp-...` keys.
# PatchedChatMiMo is model-id agnostic; use it for every MiMo thinking model
# entry you configure (for example mimo-v2.5-pro, mimo-v2.5, mimo-v2-pro,
# mimo-v2-omni, or mimo-v2-flash), including models referenced by subagent
# model overrides.
# See: https://platform.xiaomimimo.com/docs/en-US/usage-guide/passing-back-reasoning_content
# - name: mimo-v2.5-pro
# display_name: MiMo V2.5 Pro
# use: deerflow.models.patched_mimo:PatchedChatMiMo
# model: mimo-v2.5-pro
# api_key: $MIMO_API_KEY
# base_url: https://api.xiaomimimo.com/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 8192
# supports_thinking: true
# supports_vision: false
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# Example: DeepSeek V4 model (with thinking support)
# - name: deepseek-v4
# display_name: DeepSeek V4 (Thinking)
# use: deerflow.models.patched_deepseek:PatchedChatDeepSeek
# model: deepseek-v4-pro
# api_key: $DEEPSEEK_API_KEY
# timeout: 600.0
# max_retries: 2
# max_tokens: 8192
# supports_thinking: true
# supports_vision: false # DeepSeek V4 does not support vision
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# Example: Kimi K2.5 model
# - name: kimi-k2.5
# display_name: Kimi K2.5
# use: deerflow.models.patched_deepseek:PatchedChatDeepSeek
# model: kimi-k2.5
# api_base: https://api.moonshot.cn/v1
# api_key: $MOONSHOT_API_KEY
# timeout: 600.0
# max_retries: 2
# max_tokens: 32768
# supports_thinking: true
# supports_vision: true # Check your specific model's capabilities
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# Example: Novita AI (OpenAI-compatible)
# Novita provides an OpenAI-compatible API with competitive pricing
# See: https://novita.ai
# - name: novita-deepseek-v3.2
# display_name: Novita DeepSeek V3.2
# use: langchain_openai:ChatOpenAI
# model: deepseek/deepseek-v3.2
# api_key: $NOVITA_API_KEY
# base_url: https://api.novita.ai/openai
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# temperature: 0.7
# supports_thinking: true
# supports_vision: true
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# Example: StepFun (阶跃星辰) reasoning models
# StepFun provides OpenAI-compatible API with reasoning models.
# With reasoning_format: deepseek-style, the API returns reasoning_content
# (same field as DeepSeek), which must be replayed on historical assistant
# messages in multi-turn tool-call conversations.
# Use PatchedChatStepFun instead of plain ChatOpenAI.
# Docs: https://platform.stepfun.com/docs/api-reference/chat-completions
# - name: step-3.7-flash
# display_name: Step 3.7 Flash
# use: deerflow.models.patched_stepfun:PatchedChatStepFun
# model: step-3.7-flash
# api_key: $STEPFUN_API_KEY
# base_url: https://api.stepfun.com/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# supports_thinking: true
# supports_reasoning_effort: true
# supports_vision: true
# when_thinking_enabled:
# extra_body:
# reasoning_format: deepseek-style
# when_thinking_disabled:
# extra_body:
# reasoning_format: deepseek-style
# Example: MiniMax (OpenAI-compatible) - International Edition
# MiniMax provides high-performance models with 512K context window and 128K max output
# Docs: https://platform.minimax.io/docs/api-reference/text-openai-api
# - name: minimax-m3
# display_name: MiniMax M3
# use: deerflow.models.patched_minimax:PatchedChatMiniMax
# model: MiniMax-M3
# api_key: $MINIMAX_API_KEY
# base_url: https://api.minimax.io/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# temperature: 1.0 # MiniMax requires temperature in (0.0, 1.0]
# supports_vision: true
# supports_thinking: true
# # PatchedChatMiniMax is the MiniMax adapter: it enables reasoning_split and
# # maps MiniMax's structured reasoning into reasoning_content (the field
# # DeerFlow understands), and it strips the per-message `name` field that
# # DeerFlow middlewares attach — MiniMax rejects requests whose user-message
# # names differ with "user name must be consistent (2013)". Declare the
# # thinking toggle so non-thinking paths (flash mode, follow-up suggestions,
# # title/memory generation) truly disable reasoning instead of spending
# # tokens on it.
# when_thinking_enabled:
# extra_body:
# thinking:
# type: adaptive
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# NOTE: M2.x models always think — passing thinking:{type:disabled} has no
# effect (per MiniMax docs), so the toggle above is omitted for M2.7. The
# follow-up-suggestions endpoint strips inline <think> defensively regardless.
# Still use the PatchedChatMiniMax adapter: it strips the per-message `name`
# field DeerFlow middlewares attach, which MiniMax otherwise rejects with
# "user name must be consistent (2013)".
# - name: minimax-m2.7
# display_name: MiniMax M2.7
# use: deerflow.models.patched_minimax:PatchedChatMiniMax
# model: MiniMax-M2.7
# api_key: $MINIMAX_API_KEY
# base_url: https://api.minimax.io/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# temperature: 1.0 # MiniMax requires temperature in (0.0, 1.0]
# supports_vision: false # M2.7 is text-only; M3 supports vision
# supports_thinking: true
# - name: minimax-m2.7-highspeed
# display_name: MiniMax M2.7 Highspeed
# use: deerflow.models.patched_minimax:PatchedChatMiniMax
# model: MiniMax-M2.7-highspeed
# api_key: $MINIMAX_API_KEY
# base_url: https://api.minimax.io/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# temperature: 1.0 # MiniMax requires temperature in (0.0, 1.0]
# supports_vision: false # M2.7 is text-only; M3 supports vision
# supports_thinking: true
# Example: MiniMax (OpenAI-compatible) - CN 中国区用户
# MiniMax provides high-performance models with 512K context window and 128K max output
# Docs: https://platform.minimaxi.com/docs/api-reference/text-openai-api
# - name: minimax-m3
# display_name: MiniMax M3
# use: deerflow.models.patched_minimax:PatchedChatMiniMax
# model: MiniMax-M3
# api_key: $MINIMAX_API_KEY
# base_url: https://api.minimaxi.com/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# temperature: 1.0 # MiniMax requires temperature in (0.0, 1.0]
# supports_vision: true
# supports_thinking: true
# # PatchedChatMiniMax is the MiniMax adapter: it enables reasoning_split and
# # maps MiniMax's structured reasoning into reasoning_content (the field
# # DeerFlow understands), and it strips the per-message `name` field that
# # DeerFlow middlewares attach — MiniMax rejects requests whose user-message
# # names differ with "user name must be consistent (2013)". Declare the
# # thinking toggle so non-thinking paths (flash mode, follow-up suggestions,
# # title/memory generation) truly disable reasoning instead of spending
# # tokens on it.
# when_thinking_enabled:
# extra_body:
# thinking:
# type: adaptive
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# NOTE: M2.x models always think — passing thinking:{type:disabled} has no
# effect (per MiniMax docs), so the toggle above is omitted for M2.7. The
# follow-up-suggestions endpoint strips inline <think> defensively regardless.
# Still use the PatchedChatMiniMax adapter: it strips the per-message `name`
# field DeerFlow middlewares attach, which MiniMax otherwise rejects with
# "user name must be consistent (2013)".
# - name: minimax-m2.7
# display_name: MiniMax M2.7
# use: deerflow.models.patched_minimax:PatchedChatMiniMax
# model: MiniMax-M2.7
# api_key: $MINIMAX_API_KEY
# base_url: https://api.minimaxi.com/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# temperature: 1.0 # MiniMax requires temperature in (0.0, 1.0]
# supports_vision: false # M2.7 is text-only; M3 supports vision
# supports_thinking: true
# - name: minimax-m2.7-highspeed
# display_name: MiniMax M2.7 Highspeed
# use: deerflow.models.patched_minimax:PatchedChatMiniMax
# model: MiniMax-M2.7-highspeed
# api_key: $MINIMAX_API_KEY
# base_url: https://api.minimaxi.com/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 4096
# temperature: 1.0 # MiniMax requires temperature in (0.0, 1.0]
# supports_vision: false # M2.7 is text-only; M3 supports vision
# supports_thinking: true
# Example: OpenRouter (OpenAI-compatible)
# OpenRouter models use the same ChatOpenAI + base_url pattern as other OpenAI-compatible gateways.
# - name: openrouter-gemini-2.5-flash
# display_name: Gemini 2.5 Flash (OpenRouter)
# use: langchain_openai:ChatOpenAI
# model: google/gemini-2.5-flash-preview
# api_key: $OPENAI_API_KEY
# base_url: https://openrouter.ai/api/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 8192
# temperature: 0.7
# Example: Atlas Cloud (OpenAI-compatible)
# Atlas Cloud exposes a single OpenAI-compatible endpoint in front of many open
# models (DeepSeek, Qwen, Kimi, GLM, MiniMax, Llama, ...), so it uses the same
# ChatOpenAI + base_url pattern as other OpenAI-compatible gateways.
# Browse model ids at https://api.atlascloud.ai/v1/models — see https://atlascloud.ai
# - name: atlascloud-deepseek-v3.2
# display_name: DeepSeek V3.2 (Atlas Cloud)
# use: langchain_openai:ChatOpenAI
# model: deepseek-ai/DeepSeek-V3.2-Exp
# api_key: $ATLASCLOUD_API_KEY
# base_url: https://api.atlascloud.ai/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 8192
# temperature: 0.7
# supports_vision: false
#
# For reasoning models on Atlas Cloud (e.g. a Qwen3 *-thinking id), use the
# patched OpenAI-compatible adapter so reasoning_content is replayed across
# multi-turn tool-call conversations:
# - name: atlascloud-qwen3-thinking
# display_name: Qwen3 235B Thinking (Atlas Cloud)
# use: deerflow.models.patched_openai:PatchedChatOpenAI
# model: qwen/qwen3-235b-a22b-thinking-2507
# api_key: $ATLASCLOUD_API_KEY
# base_url: https://api.atlascloud.ai/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 8192
# supports_thinking: true
# supports_vision: false
# when_thinking_enabled:
# extra_body:
# thinking:
# type: enabled
# when_thinking_disabled:
# extra_body:
# thinking:
# type: disabled
# Example: vLLM 0.19.0 (OpenAI-compatible, with reasoning toggle)
# DeerFlow's vLLM provider preserves vLLM reasoning across tool-call turns and
# toggles Qwen-style reasoning by writing
# extra_body.chat_template_kwargs.enable_thinking=true/false.
# Some reasoning models also require the server to be started with
# `vllm serve ... --reasoning-parser <parser>`.
# - name: qwen3-32b-vllm
# display_name: Qwen3 32B (vLLM)
# use: deerflow.models.vllm_provider:VllmChatModel
# model: Qwen/Qwen3-32B
# api_key: $VLLM_API_KEY
# base_url: http://localhost:8000/v1
# request_timeout: 600.0
# max_retries: 2
# max_tokens: 8192
# supports_thinking: true
# supports_vision: false
# when_thinking_enabled:
# extra_body:
# chat_template_kwargs:
# enable_thinking: true
# Example: Qwen3-Coder deployed on MindIE Engine
# - name: Qwen3_Coder_480B_MindIE
# display_name: Qwen3-Coder-480B (MindIE)
# use: deerflow.models.mindie_provider:MindIEChatModel
# model: Qwen3-Coder-480B-A35B-Instruct-Client
# base_url: http://localhost:8989/v1
# api_key: $OPENAI_API_KEY
# temperature: 0
# max_retries: 1
# supports_thinking: false
# supports_vision: false
# supports_reasoning_effort: false
# # --- Advanced Network Settings ---
# # Due to MindIE's streaming limitations with tool calling, the provider
# # uses mock-streaming (awaiting full generation). Extended timeouts are required.
# read_timeout: 900.0 # 15 minutes to prevent drops during long document generation
# connect_timeout: 30.0
# write_timeout: 60.0
# pool_timeout: 30.0
# ============================================================================
# Tool Groups Configuration
# ============================================================================
# Define groups of tools for organization and access control
tool_groups:
- name: web
- name: file:read
- name: file:write
- name: bash
- name: browser
# ============================================================================
# Tools Configuration
# ============================================================================
# Configure available tools for the agent to use
tools:
# Web search tool (uses DuckDuckGo, no API key required)
- name: web_search
group: web
use: deerflow.community.ddg_search.tools:web_search_tool
max_results: 5
# backend: auto # DDGS backend(s): auto, duckduckgo, brave, wikipedia, etc.
# region: wt-wt # wt-wt is normalized for Wikipedia when backend includes auto/all/wikipedia.
# safesearch: moderate # on, moderate, off
# Web search tool (uses SearXNG, self-hosted, no API key required)
# SearXNG is a free internet metasearch engine which aggregates results from
# various search services. Deploy your own instance: https://github.com/searxng/searxng
# For Docker deployments, use the Docker service name instead of localhost.
# - name: web_search
# group: web
# use: deerflow.community.searxng.tools:web_search_tool
# base_url: http://localhost:8088 # SearXNG instance URL (default: :8088; Docker: http://searxng:8080)
# max_results: 5 # Maximum number of search results
# Web search tool (uses Serper - Google Search API, requires SERPER_API_KEY)
# Serper provides real-time Google Search results. Sign up at https://serper.dev
# Note: set SERPER_API_KEY in your environment before starting the app.
# Avoid putting literal API keys in config.yaml; use the $VAR form instead.
# - name: web_search
# group: web
# use: deerflow.community.serper.tools:web_search_tool
# max_results: 5 # capped at 10 by the Serper provider
# # api_key: $SERPER_API_KEY # Optional explicit env-var reference
# Web search tool (uses Brave Search API, requires BRAVE_SEARCH_API_KEY)
# Brave Search returns results from an independent index. Sign up at
# https://brave.com/search/api/ to get a key. Unlike the DuckDuckGo
# `backend: brave` option above, this calls the official Brave API directly.
# - name: web_search
# group: web
# use: deerflow.community.brave.tools:web_search_tool
# max_results: 5 # Capped at 20 by the Brave Search API
# # api_key: $BRAVE_SEARCH_API_KEY # Optional if the env var is set
# Web search tool (requires Tavily API key)
# - name: web_search
# group: web
# use: deerflow.community.tavily.tools:web_search_tool
# max_results: 5
# # api_key: $TAVILY_API_KEY # Set if needed
# Web search tool (uses InfoQuest, requires InfoQuest API key)
# - name: web_search
# group: web
# use: deerflow.community.infoquest.tools:web_search_tool
# # Used to limit the scope of search results, only returns content within the specified time range. Set to -1 to disable time filtering
# search_time_range: 10
# Web search tool (uses Exa, requires EXA_API_KEY)
# - name: web_search
# group: web
# use: deerflow.community.exa.tools:web_search_tool
# max_results: 5
# search_type: auto # Options: auto, neural, keyword
# contents_max_characters: 1000
# # api_key: $EXA_API_KEY
# Web search tool (uses Firecrawl, requires FIRECRAWL_API_KEY)
# - name: web_search
# group: web
# use: deerflow.community.firecrawl.tools:web_search_tool
# max_results: 5
# # api_key: $FIRECRAWL_API_KEY
# Web search tool (uses GroundRoute, requires GROUNDROUTE_API_KEY)
# GroundRoute is a meta search layer: one API in front of six engines (Serper,
# Brave, Exa, Tavily, Firecrawl, Perplexity). It routes each query to the cheapest
# engine that clears a quality bar and fails over if one is down. Pricing is
# gain-share (you keep about half of any cache savings). Get a key at
# https://groundroute.ai/keys
# - name: web_search
# group: web
# use: deerflow.community.groundroute.tools:web_search_tool
# max_results: 5 # Clamped to 1-50 by GroundRoute
# # api_key: $GROUNDROUTE_API_KEY # Optional if the env var is set
# Web search tool (uses fastCRW - Firecrawl-compatible web scraper, single binary,
# self-host or cloud. Cloud requires CRW_API_KEY; self-host may need no key.)
# - name: web_search
# group: web
# use: deerflow.community.fastcrw.tools:web_search_tool
# max_results: 5
# # api_key: $CRW_API_KEY
# # base_url: https://fastcrw.com/api # default cloud; set to e.g. http://localhost:3000 for self-host
# Web fetch tool (uses Browserless - headless Chrome, self-hosted or cloud)
# Browserless renders pages with a real headless Chrome, ideal for JavaScript-heavy
# sites and SPAs. Deploy your own: https://github.com/browserless/browserless
# For Docker deployments, use the Docker service name instead of localhost.
# NOTE: Only one web_fetch provider can be active at a time.
# Comment out the Jina AI web_fetch entry below before enabling this one.
# - name: web_fetch
# group: web
# use: deerflow.community.browserless.tools:web_fetch_tool
# base_url: http://localhost:3032 # Browserless instance URL (default: :3032; Docker: http://browserless:3000)
# # token: $BROWSERLESS_TOKEN # API token (required for Browserless Cloud; optional for self-hosted)
# timeout_s: 30 # Request timeout in seconds
# # allow_private_addresses: false # SSRF guard: keep false in production. Set true ONLY for intentional internal targets.
# # wait_for_event: "networkidle" # Wait for a page event before returning (e.g. "load", "networkidle")
# # wait_for_timeout_ms: 2000 # Extra wait after page load in milliseconds
# # wait_for_selector: "article" # CSS selector to wait for before returning
# Web fetch tool (uses Crawl4AI - self-hosted headless Chromium, no API key)
# Crawl4AI returns server-cleaned "fit" markdown directly (no readability step needed),
# ideal for JavaScript-heavy sites. Self-host (JWT auth is off by default, no key):
# docker run -d -p 11235:11235 --shm-size=1g unclecode/crawl4ai:0.8.6
# For Docker deployments, use the Docker service name instead of localhost.
# NOTE: Only one web_fetch provider can be active at a time.
# Comment out the Jina AI web_fetch entry below before enabling this one.
# - name: web_fetch
# group: web
# use: deerflow.community.crawl4ai.tools:web_fetch_tool
# base_url: http://localhost:11235 # Crawl4AI server URL (Docker: http://crawl4ai:11235)
# timeout: 30 # Request timeout in seconds
# # allow_private_addresses: false # SSRF guard: keep false in production. Set true ONLY for intentional internal targets.
# # filter: fit # Markdown filter: fit (default) | raw | bm25 | llm
# # token: $CRAWL4AI_TOKEN # Bearer token (only if the server has JWT auth enabled)
# Web capture tool (uses Browserless /screenshot to render a page as an artifact)
# Browserless captures JavaScript-heavy pages with a real headless Chrome and
# writes the screenshot into the current thread's outputs. It can run against
# a self-hosted Browserless instance without a token, or Browserless Cloud with
# BROWSERLESS_TOKEN. For Docker deployments, use the Docker service name instead
# of localhost.
# - name: web_capture
# group: web
# use: deerflow.community.browserless.tools:web_capture_tool
# base_url: http://localhost:3032 # Browserless instance URL (Docker: http://browserless:3000)
# # token: $BROWSERLESS_TOKEN # Required for Browserless Cloud; optional for self-hosted
# timeout_s: 30 # Request timeout in seconds
# output_format: png # png, jpeg, or webp
# full_page: true # Capture entire page instead of viewport only
# viewport_width: 1280
# viewport_height: 720
# # wait_for_selector: "main" # CSS selector to wait for before capturing
# # wait_for_selector_timeout_ms: 5000
# # wait_for_timeout_ms: 1000 # Extra wait after navigation in milliseconds
# # best_attempt: true # Continue with current page state if waits time out
# # allow_private_addresses: false # SSRF guard: keep false in production. Set true ONLY to
# # # capture internal/private targets (loopback, RFC1918, etc.)
# Agentic browser control (stateful navigate → observe → click/type loop).
# Unlike web_fetch/web_capture (read-only, stateless), these tools keep a live
# per-thread Playwright browser so the agent can interact with JavaScript-heavy
# pages, fill forms, and follow multi-step flows. Elements are addressed by the
# numeric [ref] index returned in each page snapshot.
#
# Requires the optional dependency, installed once per environment:
# cd backend && uv sync --extra browser && uv run playwright install chromium
# make dev / Docker startup auto-detect an active browser_navigate entry and
# preserve the browser extra during dependency sync.
#
# Uncomment the whole block to enable. Launch and URL-policy settings are read
# canonically from browser_navigate and shared by every browser tool + Live.
# - name: browser_navigate
# group: browser
# use: deerflow.community.browser_automation.tools:browser_navigate_tool
# headless: true # Set false only for local, trusted debugging
# timeout_ms: 30000 # Per-action navigation/interaction timeout
# viewport_width: 1280
# viewport_height: 720
# # allow_private_addresses: false # SSRF guard: keep false in production
# # cdp_url: http://127.0.0.1:9222 # Attach to YOUR running Chrome (Codex-style)
# # allow_unguarded_cdp: false # REQUIRED true with cdp_url: attaching to an
# # # existing Chrome prevents DeerFlow from
# # # enforcing its subresource/redirect SSRF guard.
# # # instead of launching a private headless one.
# # # Start Chrome with --remote-debugging-port=9222
# # # so you watch the agent drive your real browser
# # # with your real login sessions. Local/trusted only;
# # # never enable for an untrusted CDP endpoint.
# # # Chrome must be version-matched to the bundled
# # # Playwright; a much newer Chrome can reject the
# # # CDP handshake. If so, use headless: false to launch
# # # Playwright's own visible browser instead.
# # Multi-worker note: browser sessions live in one Gateway worker's memory.
# # Keep GATEWAY_WORKERS=1 while this tool group is enabled.
# - name: browser_snapshot
# group: browser
# use: deerflow.community.browser_automation.tools:browser_snapshot_tool
# - name: browser_click
# group: browser
# use: deerflow.community.browser_automation.tools:browser_click_tool
# - name: browser_type
# group: browser
# use: deerflow.community.browser_automation.tools:browser_type_tool
# - name: browser_get_text
# group: browser
# use: deerflow.community.browser_automation.tools:browser_get_text_tool
# max_chars: 8000 # Truncation cap for browser_get_text output
# - name: browser_back
# group: browser
# use: deerflow.community.browser_automation.tools:browser_back_tool
# - name: browser_screenshot
# group: browser
# use: deerflow.community.browser_automation.tools:browser_screenshot_tool
# - name: browser_close
# group: browser
# use: deerflow.community.browser_automation.tools:browser_close_tool
# Web fetch tool (uses Exa)
# NOTE: Only one web_fetch provider can be active at a time.
# Comment out the Jina AI web_fetch entry below before enabling this one.
# - name: web_fetch
# group: web
# use: deerflow.community.exa.tools:web_fetch_tool
# # api_key: $EXA_API_KEY
# Web fetch tool (uses Jina AI reader)
- name: web_fetch
group: web
use: deerflow.community.jina_ai.tools:web_fetch_tool
timeout: 10
# Optional proxy for restricted networks / Docker / WSL.
# Use host.docker.internal instead of 127.0.0.1 when the proxy runs on the host.
# proxy: $HTTPS_PROXY
# trust_env: true
# Web fetch tool (uses InfoQuest)
# - name: web_fetch
# group: web
# use: deerflow.community.infoquest.tools:web_fetch_tool
# # Overall timeout for the entire crawling process (in seconds). Set to positive value to enable, -1 to disable
# timeout: 10
# # Waiting time after page loading (in seconds). Set to positive value to enable, -1 to disable
# fetch_time: 10
# # Timeout for navigating to the page (in seconds). Set to positive value to enable, -1 to disable
# navigation_timeout: 30
# Web fetch tool (uses Firecrawl, requires FIRECRAWL_API_KEY)
# - name: web_fetch
# group: web
# use: deerflow.community.firecrawl.tools:web_fetch_tool
# # api_key: $FIRECRAWL_API_KEY
# Web fetch tool (uses GroundRoute, requires GROUNDROUTE_API_KEY)
# Fetches a page's extracted text via GroundRoute mode=page.
# NOTE: Only one web_fetch provider can be active at a time.
# Comment out the Jina AI web_fetch entry above before enabling this one.
# - name: web_fetch
# group: web
# use: deerflow.community.groundroute.tools:web_fetch_tool
# # api_key: $GROUNDROUTE_API_KEY
# Web fetch tool (uses fastCRW - Firecrawl-compatible web scraper, single binary,
# self-host or cloud. Cloud requires CRW_API_KEY; self-host may need no key.)
# NOTE: Only one web_fetch provider can be active at a time.
# Comment out the Jina AI web_fetch entry above before enabling this one.
# - name: web_fetch
# group: web
# use: deerflow.community.fastcrw.tools:web_fetch_tool
# # api_key: $CRW_API_KEY
# # base_url: https://fastcrw.com/api # default cloud; set to e.g. http://localhost:3000 for self-host
# # allow_private_addresses: false # SSRF guard: keep false in production. Set true ONLY for intentional internal targets.
# Image search tool (uses DuckDuckGo)
# Use this to find reference images before image generation
- name: image_search
group: web
use: deerflow.community.image_search.tools:image_search_tool
max_results: 5
# Image search tool (uses InfoQuest)
# - name: image_search
# group: web
# use: deerflow.community.infoquest.tools:image_search_tool
# # Used to limit the scope of image search results, only returns content within the specified time range. Set to -1 to disable time filtering
# image_search_time_range: 10
# # Image size filter. Options: "l" (large), "m" (medium), "i" (icon).
# image_size: "i"
# Image search tool (uses Serper - Google Images API, requires SERPER_API_KEY)
# Serper provides real-time Google Images results. Sign up at https://serper.dev
# Note: set SERPER_API_KEY in your environment before starting the app.
# Avoid putting literal API keys in config.yaml; use the $VAR form instead.
# - name: image_search
# group: web
# use: deerflow.community.serper.tools:image_search_tool
# max_results: 5 # capped at 10 by the Serper provider
# # api_key: $SERPER_API_KEY # Optional explicit env-var reference
# Image search tool (uses Brave Image Search API, requires BRAVE_SEARCH_API_KEY)
# Brave provides independent image results and works alongside the Brave web search tool.
# Note: set BRAVE_SEARCH_API_KEY in your environment before starting the app.
# Avoid putting literal API keys in config.yaml; use the $VAR form instead.
# - name: image_search
# group: web
# use: deerflow.community.brave.tools:image_search_tool
# max_results: 5 # capped at 200 by Brave Image Search
# # country: US
# # search_lang: en
# # safesearch: strict
# # spellcheck: true
# # api_key: $BRAVE_SEARCH_API_KEY # Optional explicit env-var reference
# File operations tools
- name: ls
group: file:read
use: deerflow.sandbox.tools:ls_tool
- name: read_file
group: file:read
use: deerflow.sandbox.tools:read_file_tool
- name: glob
group: file:read
use: deerflow.sandbox.tools:glob_tool
max_results: 200
- name: grep
group: file:read
use: deerflow.sandbox.tools:grep_tool
max_results: 100
- name: write_file
group: file:write
use: deerflow.sandbox.tools:write_file_tool
- name: str_replace
group: file:write
use: deerflow.sandbox.tools:str_replace_tool
# Bash execution tool
# Active only when using an isolated shell sandbox or when
# sandbox.allow_host_bash: true explicitly opts into host bash.
- name: bash
group: bash
use: deerflow.sandbox.tools:bash_tool
# ============================================================================
# Tool Search Configuration (Deferred Tool Loading)
# ============================================================================
# When enabled, MCP tools are not loaded into the agent's context directly.
# Instead, they are listed by name in the system prompt and discoverable
# via the tool_search tool at runtime.
# This reduces context usage and improves tool selection accuracy when
# multiple MCP servers expose a large number of tools.