DeerFlow
When to choose DeerFlow over a prompt or a fixed workflow
Compare a long-running agent harness with a single model call and deterministic orchestration using the same task and acceptance contract.
What you will learn
- Start with variability and side effects
- Compare equivalent completion contracts
- Use a stop rule for the evaluation itself
Before you start
- Basic Python, HTTP and container concepts
- An owned task with explicit acceptance criteria
Explain the chapter’s implementation boundary and apply its checklist or isolated helper exercise.
Key takeaways
- Choose by task variability, not by the agent label.
- Compare the same accepted artifact and human correction cost.
- A simpler passing workflow is a valid selection.
Start with variability and side effects
A single model call may be enough for a short, supplied text transformation. A deterministic workflow is attractive when the steps and validation rules are stable. DeerFlow becomes relevant when a task needs iterative tool use, context retention, delegated investigation and artifact creation. These are architectural categories, not benchmark rankings of competing products.
Take one owned research task and list which decisions are genuinely unknown at the start. If every input and transformation is already prescribed, an agent may add review and operational cost without useful flexibility. If the task changes after each observation, a harness offers coordination mechanisms, but still needs explicit boundaries for publication, credentials and external writes.
Compare equivalent completion contracts
Run each candidate on the same inputs and require the same citations, unresolved-conflict handling and output format. Count human corrections and rejected results as part of the workflow, not as invisible cleanup. A polished report generated quickly is not comparable to a slower report that actually checks source conflicts unless both satisfy the same acceptance contract.
For DeerFlow, inspect configuration complexity, middleware extensions, sandbox authority and the worker-local execution caveats. For a fixed workflow, inspect the effort required to handle new branches and failures. For a single call, inspect input-size and validation constraints. The comparison should expose the trade-off that matters to the reader rather than awarding a universal winner.
Use a stop rule for the evaluation itself
Define a bounded pilot and decide in advance what failure makes adoption inappropriate: missing provenance, unauthorized actions, unacceptable operator effort or inability to restore state. Leave numeric pass-rate and cost cells blank until measured. This review has source and helper evidence, not a controlled comparison of full production systems.
Choose the smallest system that repeatedly produces an accepted artifact under your actual permissions and maintenance budget. If DeerFlow’s flexibility is valuable, keep the initial integrations narrow and expand after evidence accumulates. If a simpler pipeline already passes reliably, retaining it is a valid outcome of the evaluation rather than a failure to adopt an agent.
Implementation steps
- 1
Classify the task as fixed transformation or iterative investigation.
- 2
Write one shared acceptance contract for all candidates.
- 3
Record permissions, failures and operator effort in a bounded pilot.
- 4
Select only after the evidence meets the predeclared threshold.
Copy-ready example
{"candidates":["single model call","fixed workflow","DeerFlow"],"sharedChecks":["provenance","conflict handling","artifact format","permission compliance"],"measuredWinner":null,"pilotExecuted":false}Frequently asked questions
Is DeerFlow always better for research?
No. Small supplied-input tasks may not need a long-running harness; evaluate the task’s branching and coordination needs.
Why is there no numerical ranking?
No equivalent end-to-end comparison was run, so a ranking would imply evidence this review does not have.
Sources
- README.mdSource checked 2026-09-08
- LICENSESource checked 2026-09-08
- backend/README.mdSource checked 2026-09-08
- backend/pyproject.tomlSource checked 2026-09-08
- backend/docs/middleware-execution-flow.mdSource checked 2026-09-08
- backend/packages/harness/deerflow/agents/lead_agent/agent.pySource checked 2026-09-08
- backend/packages/harness/deerflow/agents/middlewares/loop_detection_middleware.pySource checked 2026-09-08
- backend/packages/harness/deerflow/agents/middlewares/_bounded_dict.pySource checked 2026-09-08
- backend/packages/harness/deerflow/config/loop_detection_config.pySource checked 2026-09-08
- backend/packages/harness/deerflow/sandbox/local/local_sandbox_provider.pySource checked 2026-09-08
- backend/app/gateway/auth_middleware.pySource checked 2026-09-08
- backend/app/gateway/csrf_middleware.pySource checked 2026-09-08
- docker/docker-compose.yamlSource checked 2026-09-08