RecurSearch is an AI-driven recursive web research tool that performs comprehensive, multi-layered research similar to OpenAI's Deep Research. It uses specialized AI agents to generate detailed research reports with citations, statistics, and relevant images.
do use and explore newer version which is faster, better!
- 🔄 Recursive Web Search - Multi-layered searches that dive deeper with intelligent follow-up questions
- 🤖 AI-Powered Agent System - Specialized agents for research generation, validation, and content curation
- 📊 Statistical Support - Reports backed by relevant data and statistics
- 🖼️ Intelligent Image Selection - Research-focused image searches and integration
- 📄 Multi-Page Reports - Generate comprehensive reports up to 2 pages
- 📝 Citation Support - Optional citation generation with credible sources
- 🔧 Customizable Research Depth - Control how deep the research goes
- 📋 Comprehensive Logging - Local logs and reports for transparency and debugging
- 🔍 Quality Evaluation - Automated evaluation for toxicity, bias, and answer relevancy
- 🌐 AgentNetwork Integration - Support for Mastra's AgentNetwork framework
- Node.js v20+ installed on your system
-
Clone and navigate to the project:
cd recursearch npm install -
Set up environment variables in
.env.development:OPENAI_API_KEY=your-openai-api-key TAVILY_API_KEY=your-tavily-api-key EXA_API_KEY=your-exa-api-key
-
Start the development server:
npm run dev
-
Generate reports:
- Go to the Search Agent tab in the Mastra playground running at
localhost:4411and request report generation - The search agent has memory enabled for follow-up questions
- For AgentNetwork features, use the Networks tab in the playground
- Go to the Search Agent tab in the Mastra playground running at
RecurSearch supports multiple AI models. Configure your preferred AI provider and model in config/config.ts by changing the settingRunTimeContext variable.
out of box, Recursearch has support for
- OpenAI
- Claude
- Gemini
more providers and models can easily be added
| Agent | Purpose |
|---|---|
| Search Agent | Orchestrates the research process and formats final reports |
| Question Agent | Generates insightful follow-up research questions |
| Custom Question Agent | Validates question uniqueness to avoid redundancy |
| Question Picker Agent | Selects the most research-focused questions |
| Stats Agent | Generates statistical queries to support findings with data |
| Image Agent | Creates targeted image search queries for visual content |
| Content Picker Agent | Evaluates and selects the most credible web sources |
Comprehensive research with web tools and data integration:
- simpleSearchAgent - Initial data gathering
- imageSearchAgent - Research-relevant image discovery
- reportFormattingAgent - User-defined formatting compliance
- QuestionAgent, QuestionPickerAgent, CustomQuestionAgent - Question management
- ImageQueryAgent - Precise image search queries
- StatsAgent - Statistical integration
- citationAgent - Credible source identification
Enhanced with planning and evaluation agents:
- PlannerAgent - Structures the research process
- PlannerEvalAgent - Evaluates research plan effectiveness
- ReportEvalAgent - Assesses report quality and completeness
Simulates debate-like processes for controversial topics:
- ResearchPresenterAgent - Presents arguments and findings
- ResearchCriticAgent - Generates counterarguments
- ReportJudgeAgent - Evaluates arguments for balanced conclusions
Note: Debate version intentionally excludes web tools to focus on reasoning-based arguments.
All example reports are completely AI-generated without manual editing.
Highest quality reports with full recursive research:
- The Influence of Chronic Stress on Immune System Function
- Impact of AI-Generated Content on Journalism and Media Credibility
- Impact of Music Therapy on Individuals with Depression
- How LLMs Work
- Mental Health Research
Each report includes preview screenshots as authenticity proof.
Template-style reports with good structure but variable fact quality:
- Recommendation Algorithms and User Behavior on Social Media
- Music Therapy and Depression Impact
- Chronic Stress and Immune Function
Plan-evaluate-improve methodology reports:
- How LLMs Work (Reflection Version)
Argument-based reports using pure reasoning (no web data):
- Benefits of Debate on Research Reports
- Music Therapy's Influence on Depression
- Phone Usage vs. Mental Health
RecurSearch uses a decision tree approach where agents collaborate to:
- Generate multiple research questions
- Validate question uniqueness and relevance
- Select the most promising research paths
- Search recursively through multiple layers
- Evaluate content credibility and relevance
- Synthesize findings into comprehensive reports
- Assess final output quality and bias
This tool was created for research into multi-agent report generation.
Important:
- Must not be used unethically
- Authors take no responsibility for misuse
- Always verify AI-generated content
- Use responsibly for legitimate research purposes
RecurSearch is inspired by:
GPL - Please see license requirements for full terms.
For detailed architecture diagrams and advanced configuration, see the /docs directory.