This project is a Python-based research assistant that uses AI to answer user queries. It generates a research report including a summary, sources, and a list of tools used.
- The user enters a research query.
- The AI agent, built with
langchain, uses a combination of web search (DuckDuckGoSearchRun) and Wikipedia search (WikipediaQueryRun) to gather information. - The agent then generates a research report with a summary and a list of sources.
- The report is automatically saved to a file named
research_output.txt.
-
Clone the repository:
git clone https://github.com/your-username/research-tool.git cd research-tool -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Create a
.envfile and add your Google API key:GOOGLE_API_KEY="your-api-key" -
Run the application:
python main.py
main.py: The main entry point of the application. It takes user input, runs the research agent, and prints the output.tools.py: Defines the tools used by the agent, including web search, Wikipedia search, and a tool to save the output to a file.requirements.txt: A list of the Python packages required to run the project.research_output.txt: The file where the research reports are saved..gitignore: Specifies which files and directories to ignore in the Git repository.