This project is a sophisticated, multi-step AI agent designed to automate the process of researching and analyzing developer tools, frameworks, and services. Given a simple query (e.g., "open source alternatives to Firebase"), the agent performs web searches, scrapes relevant articles, extracts key information, and generates a final, structured analysis with recommendations.
The agent is built with a modern Python stack and features a user-friendly web interface created with Streamlit.
PS: This project was inspired from @TechWithTim on YT, I leveraged Gemini Key instead of Open AI.
Github Repo: https://github.com/techwithtim/Advanced-Research-Agent
- Multi-Step Workflow: Utilizes LangGraph to create a robust, multi-step workflow (extract tools -> research -> analyze).
- Dynamic Web Scraping: Employs Firecrawl to perform real-time web searches and scrape content from websites.
- AI-Powered Analysis: Leverages Google's Gemini 2.5 Flash model for intelligent data extraction and final analysis.
- Structured Output: Uses Pydantic models to ensure the data passed between steps is structured and validated.
- Resilient Error Handling: Includes a fallback mechanism to recover from failed steps and continue the research process.
- Interactive UI: Provides a clean and interactive web interface built with Streamlit for easy use.
- Orchestration: LangChain & LangGraph
- LLM: Google Gemini 2.5 Flash
- Web Scraping/Search: Firecrawl
- Web UI: Streamlit (WORKING ON IT!)
- Package Management:
uv - Language: Python 3.10+
Follow these steps to set up the project environment.
git clone <your-repository-url>
cd <your-repository-name>Initialize the project with uv:
uv init .Use uv to install all the required packages from requirements.txt or do this.
uv add firecrawl-py python-dotenv langchain-google-genai langchain langgraph pydantic python-dotenv(Streamlit integration coming soon)
Create a file named .env in the root of your project directory and add your API keys:
GOOGLE_API_KEY=your_google_api_key_here
FIRECRAWL_API_KEY=your_firecrawl_api_key_hereOnce the setup is complete, you can launch the Streamlit application.
uv run streamlit run main.pyYour web browser will automatically open to the application's URL (usually http://localhost:8501).
.
├── src/
│ ├── __init__.py
│ ├── workflow.py # Defines the core LangGraph agent and its steps
│ ├── firecrawl.py # Service class for interacting with the Firecrawl API
│ ├── models.py # Pydantic models for state and data structures
│ └── prompts.py # Contains all prompts for the LLM
├── .env # Stores API keys and environment variables
├── .python-version # Python version specification
├── main.py # The Streamlit application entry point
├── pyproject.toml # Project configuration and dependencies
└── README.md # You are here!
- Start the application using
uv run streamlit run main.py - Enter your research query in the text input field
- Click "Start Research" to begin the analysis
- The agent will:
- Extract relevant tools from your query
- Perform web searches for each tool
- Scrape and analyze content from multiple sources
- Generate a comprehensive analysis with recommendations
Contributions are welcome! Please feel free to submit a Pull Request.
To use this application, you'll need API keys for:
- Google Gemini API: Get your key from Google AI Studio
- Firecrawl API: Sign up at Firecrawl to get your API key
- API Key Errors: Make sure your
.envfile is in the root directory and contains valid API keys - Virtual Environment Issues: Ensure you've activated the virtual environment before installing packages
- Package Installation Problems: Try using
pipinstead ofuv pipif you encounter issues
If you encounter any issues, please check the following:
- Ensure all dependencies are installed correctly
- Verify that your API keys are valid and have sufficient quota
- Check that you're using Python 3.10 or higher
- Reach out at bhavyajha1404@gmail.com