DeerFlow AI Agent System

repository·main·Indexed 13 days ago

https://github.com/bytedance/deer-flow

A LangGraph-based super agent harness designed for deep exploration and research. DeerFlow orchestrates sub-agents, memory, and isolated sandbox execution environments to handle complex workflows via extensible skills. It features a middleware-driven execution cycle, support for multiple sandbox providers including BoxLite and Tenki, and an LLM-powered memory system for persistent user context across conversations.

Tokens
295.7K
Snippets
639
Records
1.2K
Agent score
98%

What's inside DeerFlow

  1. Overview of the DeerFlow App

    main

    The DeerFlow App is a complete, ready-to-deploy 'Super Agent' application that serves as the reference implementation for a production DeerFlow experience. It integrates the Harness runtime, a web-based conversation workspace, an API gateway, and a reverse proxy into a single system.

    Key Capabilities

    • Web workspace: A browser-based UI supporting threads, artifacts, file uploads, and skill selection.
    • Custom agents: Management of named agents with specific models, skills, and tool sets.
    • Thread management: Persistent conversation threads featuring checkpointing and history.
    • Streaming responses: Real-time token streaming including thinking steps and tool call visibility.
    • Artifact viewer: In-browser preview and download functionality for agent-produced files and outputs.
    • Extensions UI: Interface to enable or disable MCP servers and skills without manual configuration editing.
    • Gateway API: A FastAPI-based REST API that includes an embedded LangGraph-compatible agent runtime.
  2. What is DeerFlow

    main

    DeerFlow (Deep Exploration and Efficient Research Flow) is an open-source super agent harness. It is designed to organize sub-agents, memory, and sandboxes, combined with extensible skills, enabling agents to perform complex tasks.

    Note that DeerFlow 2.0 is a complete rewrite and is not code-compatible with version 1.x.

  3. Overview of DeerFlow Backend APIs

    main

    The DeerFlow backend provides two distinct API sets accessed through an Nginx reverse proxy at port 2026:

    1. LangGraph-compatible API (/api/langgraph/*): Used for agent interactions, managing threads, and streaming responses. This follows LangGraph SDK conventions.
    2. Gateway API (/api/*): Used for managing models, MCP (Model Context Protocol), skills, file uploads, and artifacts.

    Conversation Strategies:

    • Stateful: Pre-create a thread using POST /api/langgraph/threads and then use the thread_id for subsequent runs.
    • Stateless: Use the POST /api/langgraph/runs/stream endpoint. If no thread_id is provided, the system auto-creates one and returns the new thread_id and run_id in the Content-Location response header.
  4. Overview of the PPT Generation Skill

    main
    The ppt-generation skill is used to create professional PowerPoint (.pptx) presentations. It works by planning a presentation structure, generating unique AI-generated images for each slide to ensure visual richness, and finally composing those images into a single PPTX file. To maintain visual consistency across the deck, the workflow requires generating slide images sequentially, using the previous slide as a reference for the next one.
  5. Overview of DeerFlow 2.0

    main

    DeerFlow (Deep Exploration and Efficient Research Flow) is an open-source super agent harness. It is designed to orchestrate sub-agents, memory, and sandboxes to perform complex tasks using extensible skills.

    Note: DeerFlow 2.0 is a complete rewrite of the original Deep Research framework (v1.x) and shares no code with it. Active development is now focused on the 2.0 branch.

  6. What is DeerFlow?

    main

    DeerFlow is a runtime harness designed for building and operating long-horizon agent systems. Instead of treating agents as simple text generators or static workflow graphs, DeerFlow provides a structured environment to manage the complex components required for production-ready agent workflows.

    Key capabilities include:

    • Long-Horizon Planning: Maintaining coherence across multiple reasoning cycles and tool calls.
    • Decomposition via Subagents: Breaking complex tasks into parallel, isolated sub-tasks to manage context window constraints.
    • Sandboxed Execution: Providing a safe, isolated filesystem for agents to write files, run tests, and execute code.
    • Modular Skills & Tools: Dynamically loading capabilities (e.g., research or data analysis) to keep the core agent general.
    • Persistent Memory & Context Engineering: Managing memory, summarization, and context across different turns and sessions.
  7. DeerFlow Backend Technology Stack

    main

    The backend is built using the following core technologies:

    • Agent Orchestration: LangGraph (1.0.6+)
    • LLM Abstractions: LangChain (1.2.3+)
    • API Framework: FastAPI (0.115.0+)
    • Protocol Support: langchain-mcp-adapters (Model Context Protocol)
    • Execution: agent-sandbox (Sandboxed code execution)
    • Document Conversion: markitdown
    • Search/Scraping: tavily-python, firecrawl-py
  8. Use the GitHub Deep Research Skill

    main
    The github-deep-research skill is designed to conduct multi-round deep research on any GitHub repository. It is triggered by providing a GitHub repository URL or an open-source project name. The skill produces a structured markdown report containing an executive summary, chronological timelines, metrics analysis, and Mermaid diagrams. It is ideal for comprehensive analysis, timeline reconstruction, competitive analysis, or in-depth investigations.
  9. Use the Code Documentation Skill

    main

    The code-documentation skill is used to generate, create, or improve documentation for code, APIs, libraries, or entire repositories. It supports a wide range of outputs including READMEs, API references, architecture diagrams, developer guides, and changelogs.

    Triggering the skill: You can trigger this skill by requesting tasks such as:

    • "document this code"
    • "create a README"
    • "generate API docs"
    • "write developer guide"
    • "analyze this codebase for documentation purposes"
  10. Frontend Performance Remediation Design Overview

    main

    The DeerFlow frontend performance remediation design aims to address seventeen identified performance risks in the default web deployment. The primary goals are to bound network and client-side resources (bytes, DOM, memory, and computation) while preserving core chat and streaming semantics.

    Key architectural improvements include:

    • Rendering Optimization: Implementing an 80ms render coalescer for stream messages and using turn-level dynamic-height windowing (virtualization) for message history.
    • Resource Management: Lazy-loading heavy components like settings, Browser Live, and artifact editors; implementing component-level code splitting; and optimizing image loading via lazy-loading.
    • Data Handling: Moving from JSON+base64 to binary WebSocket messages (JPEGs) for Browser Live; using range-capable responses for text artifact previews; and replacing quadratic tool lookups with indexed metadata.
    • Static Optimization: Making the root layout static by moving cookie-aware locale providers to auth/workspace routes, and scoping styles (Markdown/KaTeX/Nextra) by route.
  11. Content Creation and Collaboration Features

    main

    Beyond raw research, DeerFlow provides tools for transforming findings into various formats and collaborating with the agents:

    Collaboration

    • Human-in-the-Loop: Users can review, edit, and clarify research plans before execution.
    • Auto-acceptance: Options to streamline workflows by automatically accepting agent suggestions.

    Output Formats

    • Podcast Generation: Uses text-to-speech synthesis to create audio content.
    • PowerPoint: Automated creation of presentations.
    • Notion-style Editing: Refinement of reports using block-based editing.