AI Market Analyst is a multi-agent system that uses advanced LLMs to research companies and industries, generate tailored AI use cases, and provide implementation resources. The system leverages LangChain, and LangGraph to create a sophisticated analysis pipeline with web-grounded information.
- Industry & Company Research: Automatically researches companies and industries using web search
- AI Use Case Generation: Creates tailored AI/ML implementation strategies with business value analysis
- Resource Discovery: Finds relevant datasets and implementation resources from Kaggle, HuggingFace, and GitHub
- Structured Reasoning: Uses enhanced chain-of-thought reasoning and structured outputs
- Full-Stack Implementation: Includes a FastAPI backend and React/Next.js frontend
AI-Powered-Market-Analyst/
βββ backend/
β βββ config/
β β βββ __init__.py
β β βββ settings.py # Configuration for APIs and environments
β β βββ logging_config.py # Logging setup
β βββ agents/
β β βββ __init__.py
β β βββ industry_research_agent.py
β β βββ use_case_generation_agent.py
β β βββ resource_collection_agent.py
β β βββ orchestrator.py
β βββ tools/
β β βββ __init__.py
β β βββ search_tools.py
β β βββ dataset_tools.py
β β βββ analysis_tools.py
β β βββ document_tools.py
β βββ models/
β β βββ __init__.py
β β βββ llm_interface.py
β β βββ gemini_client.py
β βββ workflows/
β β βββ __init__.py
β β βββ research_workflow.py
β β βββ use_case_workflow.py
β β βββ resource_workflow.py
β βββ utils/
β β βββ __init__.py
β β βββ prompt_templates.py
β β βββ output_formatter.py
β β βββ validation.py
β βββ monitoring/
β β βββ __init__.py
β β βββ langfuse_tracker.py
β β βββ metrics.py
β βββ app.py # FastAPI application
β βββ requirements.txt # Backend dependencies
β
βββ frontend/
β βββ public/
β βββ src/
β β βββ components/
β β β βββ layout/
β β β β βββ Header.jsx
β β β β βββ Footer.jsx
β β β β βββ Layout.jsx
β β β βββ ui/
β β β β βββ Button.jsx
β β β β βββ Card.jsx
β β β β βββ Input.jsx
β β β β βββ Loader.jsx
β β β βββ forms/
β β β β βββ AnalysisForm.jsx
β β β βββ results/
β β β βββ ResultsPanel.jsx
β β β βββ UseCaseCard.jsx
β β β βββ ResourceLinks.jsx
β β βββ pages/
β β β βββ index.js
β β β βββ api/
β β β β βββ hello.js
β β β βββ results/[id].js
β β βββ services/
β β β βββ api.js
β β βββ styles/
β β βββ globals.css
β βββ package.json
β βββ tsconfig.json
β
βββ README.md
- Python 3.10 or higher
- Node.js 18 or higher
- Google API key for Gemini
- SERP API key for web search
- Kaggle API credentials (optional)
- Google Cloud credentials (optional, for VertexAI)
-
Clone the repository:
git clone https://github.com/iprajwaal/AI-Powered-Market-Analyst.git cd AI-Powered-Market-Analyst
-
Set up a virtual environment:
cd backend python -m venv .venv source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
export PYTHONDONTWRITEBYTECODE=1 export PYTHONPATH=$PYTHONPATH:./backend
This project uses API keys for Google Cloud Platform (GCP), Gemini, and SERP API. Store these securely.
-
Create a
credentials
folder in the project root:mkdir credentials
-
Gemini API Key:
- Visit the Google AI Studio
- Create a new API key
- Save this key in your
.env
file
-
SERP API Credentials:
- Sign up for a SERP API account
- Obtain your API key from the dashboard
- Create a file named
api.yml
inside thecredentials
folder:serp: key: your_serp_api_key_here
-
Kaggle API Credentials (Optional):
- Create a Kaggle account if you don't have one
- Go to your account settings and create a new API token
- Download the
kaggle.json
file and place it in thecredentials
folder
-
Create
.env
file:# API Keys GEMINI_API_KEY=your_gemini_api_key SERPAPI_KEY=your_serpapi_key KAGGLE_USERNAME=your_kaggle_username KAGGLE_KEY=your_kaggle_key HUGGINGFACE_API_KEY=your_huggingface_api_key # Optional Langfuse Monitoring LANGFUSE_PUBLIC_KEY=pk-lf-your_langfuse_public_key LANGFUSE_SECRET_KEY=sk-lf-your_langfuse_secret_key # LLM Configuration LLM_PROVIDER=llm_provider LLM_MODEL=llm_model
-
Navigate to the frontend directory:
cd ../frontend
-
Install dependencies:
npm install
-
Create
.env.local
file:NEXT_PUBLIC_API_URL=http://localhost:8000
cd backend
uvicorn app:app --host 0.0.0.0 --port 8000 --reload
cd frontend
npm run dev
The application will be available at http://localhost:3000.
- Navigate to the home page
- Enter a company name (e.g., "Microsoft") or industry name (e.g., "Healthcare")
- Set the Number of Use Cases to Generate
- Submit the form and wait for the analysis to complete
- Explore the generated use cases and resources
- Download the markdown report if desired
POST /api/analyze
: Start an analysis with company or industry informationGET /api/analysis/{request_id}
: Get the status and results of an analysisGET /api/markdown/{request_id}
: Get the markdown output for an analysisGET /health
: Health check endpoint
- FastAPI: Web framework for the API
- LangChain: Framework for tool integration
- LangGraph: Framework for workflow orchestration
- Gemini API: Large language model for text generation
- SerpAPI: Web search API for information retrieval
- Kaggle API: Dataset discovery
- Next.js: React framework for the web application
- Tailwind CSS: Utility-first CSS framework for styling
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a new branch for your feature or bug fix
- Make your changes and commit them
- Push your changes to your fork
- Create a pull request to the main repository