https://github.com/akarshankapoor7/chatbot-using-langgraph
A LangGraph-powered chatbot project with Streamlit frontends, supporting both in-memory and SQLite-based conversation persistence, real-time streaming responses, and multi-session chat management.
https://github.com/akarshankapoor7/chatbot-using-langgraph
chatbot groq-api langgraph persistence streamlit-webapp
Last synced: 9 months ago
JSON representation
A LangGraph-powered chatbot project with Streamlit frontends, supporting both in-memory and SQLite-based conversation persistence, real-time streaming responses, and multi-session chat management.
- Host: GitHub
- URL: https://github.com/akarshankapoor7/chatbot-using-langgraph
- Owner: akarshankapoor7
- License: mit
- Created: 2025-09-15T19:57:13.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-15T20:23:06.000Z (10 months ago)
- Last Synced: 2025-09-15T21:31:48.858Z (10 months ago)
- Topics: chatbot, groq-api, langgraph, persistence, streamlit-webapp
- Language: Jupyter Notebook
- Homepage:
- Size: 222 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ChatBot-using-LangGraph
🤖 LangGraph Chatbot with Streamlit UI
An interactive **Generative AI chatbot** built using **LangGraph** and **Streamlit**, featuring persistent chat storage, multi-session handling, and a clean ChatGPT-like sidebar for navigating previous conversations.
---
## 🚀 Features
- **Multi-session chat**: Start a **new chat** anytime and revisit old ones (sessions displayed as `session-1`, `session-2`, etc.).
- **Persistent storage**: Chats are saved using **SQLite** (`SqliteSaver`) so history is retained even after restarting.
- **Sidebar navigation**: A non-collapsible **sidebar on the left**, showing all active sessions with the latest user message or session number.
- **Simple & clean UI**: Chat interface similar to ChatGPT with smooth session switching.
---
## 🛠️ Tech Stack
- [LangGraph](https://github.com/langchain-ai/langgraph) – for conversation flow and state management.
- [LangGraph Checkpoint SQLite](https://pypi.org/project/langgraph-checkpoint-sqlite/) – for saving chat history.
- [Streamlit](https://streamlit.io) – for frontend UI.
- [SQLite3](https://www.sqlite.org/index.html) – for lightweight local storage.
---
📂 Project Structure
.
├── .env # Store your API keys here
├── requirements.txt # Python dependencies
├── 01_ChatBot_with_memory_checkpoint.ipynb # Jupyter Notebook for experimentation
│
├── ChatBot_backend.py # Backend (memory only) -->
├── Streamlit_ChatBot_frontend.py # Streamlit frontend (memory only)
├── Streamlit_Chatbot_frontend_UI_1.png # Screenshot for memory-only chatbot
│
├── ChatBot_database_backend.py # Backend (with SQLite database) -->
├── Streamlit_frontend_database.py # Streamlit frontend (with SQLite DB)
├── Streamlit_frontend_database_UI_2.png # Screenshot for DB chatbot
│
├── chatbot_memory.db # SQLite database (created at runtime)
│
├── LICENSE
└── README.md
2️⃣ Create virtual environment
python -m venv lgraph
source lgraph/bin/activate # Mac/Linux
lgraph\Scripts\activate # Windows
3️⃣ Install dependencies
pip install -r requirements.txt