This project is a Streamlit web application that acts as a research assistant. It uses Google's Gemini model to conduct research on a given topic, synthesizes the findings, and generates a comprehensive report in Markdown format.
Here's a walkthrough of the application:
-
Enter API Keys and Topic: Provide your Serper and Google Gemini API keys, along with the research topic.
-
Run Research: The agent conducts searches and generates the report.
-
View Report: The generated report is displayed directly in the app.
-
Download Report: You can download the report as a Markdown file.
- Frontend: Streamlit
- Language Model: Google Gemini
- Search: Serper for Google Search results
- Core Logic: CrewAI
- Language: Python
To run this project on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/CodebyKumar/Simple_Research_Agent.git cd Simple_Research_Agent -
Install dependencies: It's recommended to use a virtual environment.
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the root of the project and add your API keys:SERPER_API_KEY="your_serper_api_key" GOOGLE_API_KEY="your_google_api_key" -
Run the Streamlit app:
streamlit run app.py
This application is deployed on Streamlit Cloud and is available here: https://researchagent-kk.streamlit.app/
A simple research automation tool that uses web search and Google Gemini to generate comprehensive research reports on any topic.
- Automated web search using Serper API
- AI-powered report generation using Google Gemini
- Markdown report output, ready for sharing or publishing
- Clean, modular Python codebase
- Python 3.8+
- Serper API key
- Google Gemini API key
- Install dependencies:
pip install -r requirements.txt- Clone this repository.
- Create a
.envfile in the project root with the following content:SERPER_API_KEY=your_serper_api_key_here GOOGLE_API_KEY=your_google_gemini_api_key_here
- (Optional) Create a
reports/directory, or let the script create it automatically.
Run the research agent from the command line:
python main.py "Your research topic here"python main.py "The Impact of Artificial Intelligence on the Future of Work"The generated report will be saved in the reports/ directory as a Markdown file.
- The report is saved as a clean Markdown file (no code block markers).
- Example output file:
reports/research_report_The_Impact_of_Artificial_Intelligence_on_the_Futur_20250614_222627.md
main.py
requirements.txt
reports/
utils/
agent.py
gemini_agent.py
serper_api.py
helpers.py
- Make sure your API keys are valid and have sufficient quota.
- The tool does not log or save any information except the generated report.
- If you encounter issues, check your
.envfile and API key validity.
MIT License