DeerFlow (Deep Exploration and Efficient Research Flow) is a community-driven deep research framework open-sourced by ByteDance. Built upon the outstanding work of the open-source community, this project aims to combine large language models with specialized tools, including web search, web crawling, and Python code execution, while giving back to the open-source community.
Project Address: https://github.com/bytedance/deer-flow
DeerFlow implements a modular multi-agent system architecture designed for automated research and code analysis. The system is built on LangGraph, enabling flexible state-based workflows through a well-defined message-passing system where components communicate with each other.
The system employs a simplified workflow comprising the following components:
A collection of specialized agents executing the plan:
Each agent has access to specific tools optimized for its role and operates within the LangGraph framework.
uv
, nvm
, and pnpm
# Clone the repository
git clone https://github.com/bytedance/deer-flow.git
cd deer-flow
# Install dependencies, uv will handle Python interpreter and virtual environment creation, and install required packages
uv sync
# Configure environment variables
cp .env.example .env
# Configure your API keys:
# - Tavily: https://app.tavily.com/home
# - Brave Search: https://brave.com/search/api/
# - volcengine TTS: Add your TTS credentials if you have them
# Configure LLM models and API keys
cp conf.yaml.example conf.yaml
# Install marp for PPT generation
brew install marp-cli
uv run main.py
# First install Web UI dependencies
cd deer-flow/web
pnpm install
# Run backend and frontend servers (development mode)
# macOS/Linux
./bootstrap.sh -d
# Windows
bootstrap.bat -d
Then visit http://localhost:3000 to experience the Web UI.
DeerFlow supports multiple search engines, configurable using the SEARCH_API
variable in the .env
file:
Configuration example:
# Choose one: tavily, duckduckgo, brave_search, arxiv
SEARCH_API=tavily
DeerFlow includes text-to-speech (TTS) functionality, allowing you to convert research reports into speech. This feature uses the volcengine TTS API to generate high-quality audio, supporting customizable speed, volume, and pitch.
curl --location 'http://localhost:8000/api/tts' \
--header 'Content-Type: application/json' \
--data '{
"text": "This is a test of the text-to-speech functionality.",
"speed_ratio": 1.0,
"volume_ratio": 1.0,
"pitch_ratio": 1.0
}' \
--output speech.mp3
# Run all tests
make test
# Run a specific test file
pytest tests/integration/test_workflow.py
# Run coverage tests
make coverage
# Run code checks
make lint
# Format code
make format
DeerFlow uses LangGraph as its workflow architecture. You can use LangGraph Studio to debug and visualize workflows in real-time.
# Install uv package manager (if you don't have it)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies and start the LangGraph server
uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.12 langgraph dev --allow-blocking
After starting the server, you can access:
# Run a specific query
uv run main.py "What are the factors influencing the adoption of AI in healthcare?"
# Run with custom planning parameters
uv run main.py --max_plan_iterations 3 "How does quantum computing affect cryptography?"
# Run in interactive mode
uv run main.py --interactive
# View all available options
uv run main.py --help
DeerFlow includes a human-in-the-loop mechanism, allowing you to review, edit, and approve research plans before execution:
[ACCEPTED]
[EDIT PLAN] Add more steps about technical implementation
)The project includes several example reports showcasing DeerFlow's capabilities:
DeerFlow is built upon the outstanding work of the open-source community, with special thanks to:
These projects exemplify the transformative power of open-source collaboration, and we are honored to build DeerFlow on their foundation.