This project is an emotionally intelligent chatbot built using Langgraph, and Google's Gemini API via langchain-google-genai.
It routes user input to different response styles:
- 🧠 Logical responses (e.g., for questions or factual queries)
- 💬 Emotional support (e.g., for personal struggles or feelings)
- 📥 Message classification using structured LLM output
- 🔁 Dynamic routing via LangGraph
- 🤖 Multi-agent behavior: "therapist" and "logical assistant"
- 🌐 Uses Gemini 1.5 Pro / Flash via LangChain integration
- 🌱 Built with Python, LangGraph, and LangChain
> Message: I'm feeling anxious and overwhelmed today
Assistant: I'm really sorry you're feeling this way. Can you tell me more about what’s been bothering you lately?
**# Setup Instructions**
# Clone the repo
git clone https://github.com/YOUR_USERNAME/langgraph-project.git
cd LangGraph Project
# Create virtual environment
python -m venv .venv
source .venv/Scripts/activate # On Windows
# Install dependencies
uv add python-dotenv langgraph langchain ipykernel
uv add langchain langchain-google-genai google-generativeai python-dotenv
# Setup Environment Variables
Create a .env file with your Gemini API key:
GOOGLE_API_KEY=your_google_api_key_here
# How to Run
python main.py
# Architecture Overview
User Input
↓
[Classifier Node]
↓
[Router Node]
┌───────┴────────┐
▼ ▼
Therapist Agent Logical Agent