This file is for coding agents. If the DeerFlow repository is not already cloned and open, clone https://github.com/bytedance/deer-flow.git first, then continue from the repository root.
Bootstrap a DeerFlow local development workspace on the user's machine with the least risky path available.
Default preference:
- Docker development environment
- Local development environment
Do not assume API keys or model credentials exist. Set up everything that can be prepared safely, then stop with a concise summary of what the user still needs to provide.
- Be idempotent. Re-running this document should not damage an existing setup.
- Prefer existing repo commands over ad hoc shell commands.
- Do not use
sudoor install system packages without explicit user approval. - Do not overwrite existing user config values unless the user asks.
- If a step fails, stop, explain the blocker, and provide the smallest next action.
- If multiple setup paths are possible, prefer Docker when Docker is already available.
Consider the setup successful when all of the following are true:
- The DeerFlow repository is cloned and the current working directory is the repo root.
config.yamlexists.- For Docker setup,
make docker-initcompleted successfully and Docker prerequisites are prepared, but services are not assumed to be running yet. - For local setup,
make checkpassed or reported no missing prerequisites, andmake installcompleted successfully. - The user receives the exact next command to launch DeerFlow.
- The user also receives any missing model configuration or referenced environment variable names from
config.yaml, without inspecting secret-bearing files for actual values.
- If the current directory is not the DeerFlow repository root, clone
https://github.com/bytedance/deer-flow.gitif needed, then change into the repository root. - Confirm the current directory is the DeerFlow repository root by checking that
Makefile,backend/,frontend/, andconfig.example.yamlexist. - Detect whether
config.yamlalready exists. - If
config.yamldoes not exist, runmake config. - Detect whether Docker is available and the daemon is reachable with
docker info. - If Docker is available:
- Run
make docker-init. - Treat this as Docker prerequisite preparation only. Do not claim that app services, compose validation, or image builds have already succeeded.
- Do not start long-running services unless the user explicitly asks or this setup request clearly includes launch verification.
- Tell the user the recommended next command is
make docker-start.
- Run
- If Docker is not available:
- Run
make check. - If
make checkreports missing system dependencies such asnode,pnpm,uv, ornginx, stop and report the missing tools instead of attempting privileged installs. - If prerequisites are satisfied, run
make install. - Tell the user the recommended next command is
make dev.
- Run
- Inspect
config.yamlonly for missing model entries or referenced environment variable placeholders. Do not read.env,frontend/.env, or other secret-bearing files. - If no model is configured, tell the user they must add at least one entry under
modelsinconfig.yaml. - If
config.yamlreferences variables such as$OPENAI_API_KEY, tell the user which variable names still need real values, but do not verify them by opening secret-bearing files. - If the repository already appears configured, avoid repeating expensive work unless it is necessary to verify the environment.
Use the lightest verification that matches the chosen setup path.
For Docker setup:
- Confirm
make docker-initcompleted successfully. - Confirm
config.yamlexists. - State explicitly that Docker services were not started and
make docker-startis still the first real launch step. - Do not leave background services running unless the user asked for that.
For local setup:
- Confirm
make installcompleted successfully. - Confirm
config.yamlexists. - Do not leave background services running unless the user asked for that.
Return a short status report with:
- Setup path used: Docker or local
- Setup level reached: Docker prerequisites prepared or local dependencies installed
- Files created or detected: for example
config.yaml - Remaining user action: model config, env var values, auth files, or nothing
- Exact next command to start DeerFlow
Complete the steps above. When finished, stop after the setup boundary and report status instead of continuing into unrelated project work.