A full-stack AI research agent built with Python, Streamlit, and Google's Gemini. It autonomously researches complex topics by browsing the web, cross-referencing sources, auditing for bias, and generating a cited Markdown report with confidence scores.
- Plan: Generates distinct search queries based on your topic.
- Search & Scrape: Asynchronously searches the web using DuckDuckGo and extracts full body text from top results via Trafilatura.
- Audit: Analyzes findings using Gemini to detect contradictions, missing context, and biased language.
- Synthesize: Synthesizes the audited information into a final, highly structured markdown report complete with inline citations and section-based Confidence Scores.
- Python 3.9+
- A Google Gemini API Key
-
Clone the repository:
git clone <your-repo-url> cd deep-source-research-agent
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the dependencies:
pip install -r requirements.txt
-
Environment Variables: Rename
.env.exampleto.envand add your Google Gemini API key:GEMINI_API_KEY=your_gemini_api_key_here
Start the Streamlit application:
streamlit run app.pyThe application will open in your default browser at http://localhost:8501. Enter a complex research topic and click "Start Research" to watch the agent work!
- Frontend: Streamlit
- LLM/Brain: Google Generative AI (Gemini Flash)
- Web Search: duckduckgo-search
- Web Scraping: Trafilatura