A powerful research assistant that combines web search capabilities with AI analysis to provide comprehensive insights on any topic. Built with Cerebras for fast inference and Exa for intelligent web search.
- Intelligent Web Search: Uses Exa's AI-powered search engine to find relevant sources
- Multi-Layer Research: Performs follow-up searches for deeper insights
- Multi-Agent Research: Implements Anthropic-style parallel agent approach
- Structured Analysis: Provides summaries, key insights, and actionable recommendations
- Multiple Research Modes: Choose between basic, deep, or multi-agent research
- Source Attribution: All findings are linked to their original sources
- Clone the repository:
git clone https://github.com/yourusername/ai-deep-research-assistant.git
cd ai-deep-research-assistant- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env with your API keys- Cerebras API Key: Get it from https://cloud.cerebras.ai
- Exa API Key: Get it from https://exa.ai
Quick research with single search and analysis:
python -m src.main --mode basic --query "latest AI breakthroughs 2025"Two-layer research with follow-up investigation:
python -m src.main --mode deep --query "quantum computing advances"Parallel agent approach for complex topics:
python -m src.main --mode multi-agent --query "renewable energy policy"Run in interactive mode to ask multiple questions:
python -m src.main --interactiveLoad queries from a file:
python -m src.main --mode deep --input-file input_docs/research_topics.txtai-deep-research-assistant/
├── src/
│ ├── __init__.py
│ ├── main.py # Entry point
│ ├── research_engine.py # Core research logic
│ ├── agents.py # Multi-agent implementation
│ ├── search_client.py # Exa search wrapper
│ └── config.py # Configuration management
├── input_docs/ # Research queries and topics
├── config/
│ └── settings.py # Application settings
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
├── requirements.txt # Python dependencies
├── README.md # This file
└── AGENTS.md # Agent behavior documentation
- Single web search (5 sources)
- AI analysis and synthesis
- Summary and key insights
- Best for: Quick fact-checking, general information
- Initial broad search (6 sources)
- AI generates follow-up question
- Targeted secondary search (4 sources)
- Comprehensive synthesis
- Best for: Research projects, detailed analysis
- Lead agent breaks query into 3 parallel subtasks
- Specialized agents work simultaneously
- Parallel synthesis of findings
- Best for: Complex topics, comprehensive coverage
All research results follow this structure:
RESEARCH RESULTS
================
Query: [Your query]
Sources analyzed: [Number]
SUMMARY:
[2-3 sentence overview]
INSIGHTS:
• [Key insight 1]
• [Key insight 2]
• [Key insight 3]
DEPTH GAINED: (Deep mode only)
[How follow-up enhanced understanding]
SOURCES:
1. [Title] - [URL]
2. [Title] - [URL]
...
Place your research queries in input_docs/ directory:
research_topics.txt (one query per line):
artificial intelligence ethics
climate change solutions
blockchain technology trends
queries.json (structured format):
{
"queries": ["quantum computing applications", "space exploration news"]
}Environment variables in .env:
CEREBRAS_API_KEY=your_cerebras_api_key
EXA_API_KEY=your_exa_api_key
CEREBRAS_MODEL=llama3.1-70b
DEFAULT_MODE=basic
MAX_SOURCES_BASIC=5
MAX_SOURCES_DEEP=6
MAX_SOURCES_MULTI=2
OUTPUT_FORMAT=structured
python -m src.main --mode deep --max-sources 10 --query "your topic"python -m src.main --mode deep --query "topic" --output results.mdpython -m src.main --mode deep --input-file queries.txt --output results/- Be specific: "renewable energy storage 2025" vs "energy"
- Use time context: Add years for recent developments
- Choose right mode: Basic for facts, Deep for analysis, Multi for complexity
- Review sources: Check source quality and relevance
- Iterate: Use findings to refine follow-up questions
- Web search depends on Exa's index coverage
- Analysis is based on available sources
- Complex topics may require multiple queries
- API rate limits apply
This project is licensed under the MIT License - see the LICENSE file for details.
For questions and support, please open an issue on GitHub.
- Built with Cerebras for fast inference
- Powered by Exa AI search engine
- Inspired by Perplexity AI and Anthropic's multi-agent research