OpenDeepResearcher is an AI-powered research assistant that continuously searches for relevant information based on a user query until all necessary details are gathered. It leverages multiple AI and search APIs to automate and optimize the research process.
- Iterative Research Loop: The system refines its search iteratively until no further queries are required.
- Asynchronous Processing: Searches, webpage fetching, evaluation, and context extraction are performed concurrently for improved speed.
- Duplicate Filtering: Aggregates and deduplicates links within each round to avoid redundant processing.
- LLM-Powered Decision Making: Uses AI models to generate new search queries, decide page usefulness, extract relevant context, and produce a final comprehensive report.
- Generates precise search queries based on the user's topic.
- Default model:
deepseek-ai/DeepSeek-R1-Distill-Llama-70B
- Performs web scraping and extraction to retrieve content from relevant sources.
- Generates the final long-form research report.
You will need API access and keys for:
- Together AI API
- Tavily API
- OpenAI API
Download the notebook file or open it in Google Colab.
Run the following command in a Colab cell to install necessary libraries:
!pip install aiohttp together tavily openaiSet up API keys securely in Google Colab:
from google.colab import userdata
TOGETHER_API_KEY = userdata.get("TOGETHER_API_KEY")
TAVILY_API_KEY = userdata.get("TAVILY_API_KEY")
OPENAI_API_KEY = userdata.get("OPENAI_API_KEY")Execute all cells in order. The notebook will prompt you for:
- A research query/topic.
- An optional maximum number of iterations (default is 2 to prevent excessive API usage).
- Initial Query & Search Generation: Together AI generates initial search queries.
- Web Search & Content Extraction: Tavily API performs searches, extracts content, and filters out irrelevant links.
- Iterative Refinement: AI evaluates gathered data, determines if more research is needed, and refines search queries accordingly.
- Final Report Generation: OpenAI (O1-Mini) compiles all relevant information into a detailed and structured research report.
Once the research loop is complete, the final comprehensive report is generated and printed in the output.
- The user provides a research topic.
- Together AI generates up to four distinct search queries to maximize relevant results.
- Tavily API performs searches for all queries asynchronously.
- Aggregates and deduplicates links within each iteration.
- Extracts webpage content and evaluates its relevance.
- If more data is needed, the system generates new search queries and repeats the process.
- The loop terminates when sufficient information is gathered or the iteration limit is reached.
- OpenAI O1-Mini processes the collected context and generates a long-form research report.
- Ensures structured formatting and deep insights.
If you encounter:
RuntimeError: asyncio.run() cannot be called from a running event loop
Ensure that you are using Google Colab and handling asynchronous execution properly.
- Check your API keys and ensure they are correctly set up.
- Verify that you are not exceeding API rate limits.
- If OpenAI model
o1-minifails, ensure you have access by checking: OpenAI API Models.
OpenDeepResearcher is released under the MIT License.
Stay updated with AI research advancements by following me on X (Twitter).