An intelligent financial advisory chatbot powered by LangGraph with dual LLM support (Google Gemini & HuggingFace).
- Features
- Screenshots
- Installation
- API Keys Setup
- Usage
- Example Queries
- Configuration
- Project Structure
- Tech Stack
- Troubleshooting
- Known Limitations
- License
- Contact
- π Gold Investment Planning - Calculate affordable gold purchases based on your income and expenses
- π° Budget Analysis - Analyze your monthly budget using the 50-30-20 rule
- π Investment Advice - Get personalized investment recommendations
- π Financial Health Assessment - Track your savings rate and financial goals
- π€ General Financial Q&A - Ask any finance-related questions
- π· Dual LLM Support - Choose between Google Gemini (fast) or HuggingFace (unlimited)
- β‘ Dynamic Responses - AI-generated, context-aware advice (not templates)
- π Structured Outputs - Point-wise, easy-to-read financial analysis
- π Intelligent Routing - Automatically routes queries to specialized agents
- πΎ Session Persistence - Maintains conversation history
- π 100% Free - No credit card required for either LLM provider
IMPORTANT: This chatbot provides general financial information for educational purposes only.
- β NOT a substitute for professional financial advice
- β NOT certified financial planning
- β NOT responsible for financial decisions made based on this tool
Always consult certified financial advisors before making important financial decisions.
- Python 3.10 or higher
- pip package manager
- Internet connection (for cloud LLMs)
# 1. Clone the repository
git clone https://github.com/ShashankGowni/Agentic_ChatBot.git
cd Agentic_ChatBot
# 2. Create virtual environment
python -m venv venv
# 3. Activate virtual environment
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate
# 4. Install dependencies
pip install -r requirements.txt
You need at least ONE of these API keys (both are 100% FREE):
- Option 1: Google Gemini (Recommended - Faster β‘)
- Go to Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Click "Create API key in new project"
- Copy the key (starts with AIzaSy...)
Free Tier:
- β 60 requests per minute
- β 1,500 requests per day
- β No credit card required
- Sign up (completely free, no credit card)
- Go to Settings β Access Tokens
- Click "New token"
- Select "Read" access
- Copy the token (starts with hf_...)
Free Tier:
- β Unlimited requests
- β No credit card required
Create a .env file in the project root directory (same level as app.py):
Google Gemini API Key (get from: https://aistudio.google.com/app/apikey)
GEMINI_API_KEY=your_gemini_api_key_hereHuggingFace API Token (get from: https://huggingface.co/settings/tokens)
HUGGINGFACE_API_TOKEN=your_huggingface_token_here- Never commit the .env file to GitHub (it's already in .gitignore)
- You can use either or both keys
Run the Application:
streamlit run app.py- Open: http://localhost:8501
- Select AI Provider: Choose between π· Gemini (fast) or π€ HuggingFace (unlimited)
- Select Model: Pick from available models in the dropdown
- Enter API Key: Paste your key in the sidebar (or it auto-loads from .env)
- Choose Use Case:
- Financial Advisor
- Gold Investment Advisor
- Budget Analyzer
- Basic Chatbot
- Start Chatting! π¬
I want to buy gold. My salary is 60k and expenses are 35k.
How much can I buy in 4 months?π Gold Investment Analysis
π° Your Financial Summary:
β’ Monthly Salary: βΉ60,000
β’ Monthly Expenses: βΉ35,000
β’ Monthly Savings: βΉ25,000
...Analyze my budget: income 80k, expenses 60kπ Budget Analysis Report
π΅ Current Financial Status:
β’ Monthly Income: βΉ80,000
β’ Monthly Expenses: βΉ60,000
...[DEFAULT]
PAGE_TITLE = Financial Advisor ChatBot
LLM_OPTIONS = gemini, huggingface
USECASE_OPTIONS = Financial Advisor, Gold Investment Advisor, Budget Analyzer, Basic Chatbot
# Available Gemini models (FREE)
Gemini_MODEL_OPTIONS = gemini-2.5-flash, gemini-flash-latest, gemini-2.0-flash
# Available HuggingFace models (FREE)
HuggingFace_MODEL_OPTIONS = mistralai/Mistral-7B-Instruct-v0.2, HuggingFaceH4/zephyr-7b-betaAgentic_ChatBot/
βββ app.py
βββ requirements.txt
βββ .env
βββ .env.example
βββ .gitignore
βββ README.md
βββ images/
β βββ HomePage_Screenshot.png
β βββ ModelSelection_Screenshot.png
β βββ ChatbotFunctionality_Screenshot.png
β βββ GoldAnalysis_Screenshot.png
β βββ BudgetAnalysis_Screenshot.png
βββ src/
βββ lang_graph_chatbot/
βββ main.py # Core chatbot logic
βββ LLMS/ # LLM integrations
β βββ gemini_llm.py # Google Gemini wrapper
β βββ huggingface.py # HuggingFace wrapper
β βββ ollama.py # (Optional) Ollama support
β βββ groq_llm.py # (Deprecated)
βββ nodes/ # Specialized AI agents
β βββ classifier_node.py # Routes queries
β βββ gold_advisor_node.py # Gold expert
β βββ budget_analyzer_node.py # Budget expert
β βββ basic_chatbot_node.py # General Q&A
β βββ document_qa_node.py # Document analysis
βββ graph/ # LangGraph workflow
β βββ graph_builder.py # Builds agent workflow
βββ state/ # State management
β βββ state.py # Conversation state
βββ tools/ # Financial calculators
β βββ gold_advisor.py
β βββ budget_calculator.py
β βββ financial_analyzer.py
βββ ui/ # Streamlit UI
βββ uiconfig.ini # UI configuration
βββ uiconfigfile.py # Config parser
βββ streamlitui/
βββ loadui.py # UI loader
βββ display_result.py
- Streamlit - Interactive web UI
- LangGraph - Agent orchestration and workflow
- LangChain - LLM integration framework
- Python 3.10+ - Core programming language
- Models: gemini-2.5-flash, gemini-2.0-flash
- Speed: β‘β‘β‘β‘β‘ Very Fast
- Limit: 1,500 requests/day (FREE)
- Models: Mistral-7B-Instruct, Zephyr-7B-beta
- Speed: β‘β‘β‘ Good
- Limit: Unlimited (FREE)
- streamlit>=1.28.0
- langgraph>=0.0.20
- langchain>=0.1.0
- langchain-core>=0.1.0
- google-generativeai>=0.3.0
- huggingface-hub>=0.19.0
- python-dotenv>=1.0.0
Issue: API Key not working
- Verify key is correct in
.env - Check key has proper permissions
Issue: Rate limit exceeded
- Switch to HuggingFace (unlimited)
- Wait for rate limit reset
- Gemini: 1,500 requests/day limit
- HuggingFace: Slower response times
- Requires internet connection
- Does not provide certified financial advice
- π§ Email: shashankgowni09@gmail.com
- πΌ LinkedIn: linkedin.com/in/shashankgowni
- π GitHub: @ShashankGowni
This project is licensed under the MIT License - see the LICENSE file for details.
What this means:
- β Free to use for personal and commercial projects
- β Free to modify and distribute
- β Just keep the copyright notice
- β No warranty provided
- Built with LangGraph
- Powered by Google Gemini AI and HuggingFace
- UI built with Streamlit
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If this project helped you, please β star the repository!
Made with β€οΈ by Shashank Gowni




