
Quick Start
Prerequisites
- Python 3.10 or higher
- Node.js and npm (for the MCP server)
- DashScope API key from Alibaba Cloud
- Tavily search API key from Tavily
Configuration
Set up the following necessary API keys:Before running the Deep Research Agent, you can test whether you can start the Tavily MCP server.
Connect to Web Search MCP Client
The DeepResearch Agent only supports web search through the Tavily MCP client currently. To use this feature, you need to start the MCP server locally and establish a connection to it.
Usage
You can start running the Deep Research agent in your terminal with the following command:We have already provided a query case in If you want to have multi-turn conversations with the Deep Research Agent, you can add the following code in
main.py for your testing. You can test on your own data by modifying the query:main.py:The example is built with DashScope chat model. If you want to change the model, ensure you also update the formatter accordingly. The correspondence between built-in models and formatters is listed in the Provider Reference.
Key Features
Task Decomposition & Expansion
- Task Decomposition: The system implements a depth-first search strategy that dynamically decomposes tasks during the research process, transforming the workflow from linear to tree-structured. Decomposition can be triggered at any point during agent operation, enabling autonomous knowledge exploration, with automatic backtracking to parent tasks upon subtask completion to maintain logical consistency.
- Stack-based Mechanism: Employs a stack structure to explicitly manage task sequences and context, ensuring logical consistency and stable backtracking across complex research paths.
- Task Expansion: Enhances insight depth by analyzing tasks through eight professional dimensions, guiding the agent to explore multifaceted knowledge beyond the initial query.
Deep Search
- Breadth & Depth Integration: Combines wide-range web searching via multiple queries with high-fidelity extraction of high-value web content for granular analysis.
- Recursive Information Filling: Automatically converts identified information gaps into new sub-tasks, triggering further decomposition to ensure comprehensive coverage of the research topic.
Self Reflection
- Low-level Reflection: Low-level reflection involves corrective measures for issues arising from tool errors, incorrect parameter usage, or ineffective sub-task completion. These are resolved by adjusting decision-making in subsequent steps of the ReAct process.
- High-level Reflection: High-level reflection addresses persistent failures that resist simple corrections, often indicating unanticipated practical challenges in the initial planning. In such cases, the agent may rephrase current steps if there is a misunderstanding of sub-task objectives or if they are unachievable in their current forms.
Report Generation
- Concurrent Drafting & Citation: Maintains a real-time intermediate document with full traceability, recording findings and citations as research progresses to prevent knowledge loss.
- Synthesis-based Finalization: Shifts the generation focus from “writing from scratch” to “summarizing and polishing” intermediate records, significantly improving the report’s information density, readability, and structural logic.