deerflow

command
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 21 Imported by: 0

README

DeerFlow - Deep Research Agent (Go Port)

This is a Go implementation of the ByteDance DeerFlow deep research agent, built using langgraphgo and langchaingo.

DeerFlow is a multi-agent system designed to conduct deep research on a given topic. It plans a research strategy, executes search steps (simulated or real), and synthesizes a comprehensive report.

Features

  • Multi-Agent Architecture: Orchestrates Planner, Researcher, and Reporter agents using a state graph.
  • Web Interface: A modern, dark-themed web UI with real-time status updates using Server-Sent Events (SSE).
  • CLI Support: Can be run directly from the command line for quick queries.
  • Extensible: Built on langgraphgo, making it easy to add new nodes, tools, or complex control flows.

Prerequisites

  • Go 1.23 or higher
  • An OpenAI-compatible API Key (e.g., OpenAI, DeepSeek)

Configuration

Set the following environment variables:

export OPENAI_API_KEY="your-api-key"

# Optional: If using DeepSeek or another compatible provider
export OPENAI_API_BASE="https://api.deepseek.com/v1" 

Usage

Build and run the application:

go build -o deerflow ./showcases/deerflow
./deerflow

Open your browser and navigate to http://localhost:8080.

Command Line Interface (CLI)

Run a query directly from the terminal:

./deerflow "What are the latest advancements in solid state batteries?"

Project Structure

  • main.go: Entry point. Handles CLI arguments and starts the HTTP server.
  • graph.go: Defines the State struct and the Graph topology (Nodes and Edges).
  • nodes.go: Contains the implementation logic for Planner, Researcher, and Reporter.
  • web/: Contains the frontend assets (HTML, CSS, JS).

Architecture

The agent follows a sequential workflow:

  1. Planner: Decomposes the user's query into a step-by-step research plan.
  2. Researcher: Iterates through the plan, gathering information for each step.
  3. Reporter: Synthesizes all gathered information into a final, formatted report.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL