A simple conversational chatbot built with LangGraph and Groq that remembers your name across the conversation.
-
Install dependencies
pip install langgraph langchain-groq langchain-core python-dotenv
-
Add your API key
Create a.envfile in the project root:GROQ_API_KEY=your_key_hereGet a free key at console.groq.com
-
Run the chatbot
python main.py
├── .env ← API key (never commit this)
├── .gitignore
├── state.py ← shared state definition
├── nodes.py ← LLM logic
├── graph.py ← graph wiring
└── main.py ← entry point
You: Hi! My name is Ritika
Bot: Hi Ritika! Great to meet you. How can I help you today?
You: What's the capital of France?
Bot: The capital of France is Paris, Ritika!
You: What's my name?
Bot: Your name is Ritika!