A sophisticated AI chatbot application built with Streamlit, LangGraph, and PostgreSQL featuring intelligent conversation management, real-time streaming, and automatic summarization.
- Memory-Enabled Conversations: AI remembers context across messages
- Real-Time Streaming: Instant response generation with live typing indicators
- Intelligent Summarization: Automatic conversation summarization when reaching message limits
- Persistent Chat History: All conversations saved and retrievable
- Secure User Authentication: Password-protected user accounts
- Session Management: Secure session handling
- Data Privacy: User data isolation and protection
- Cloud Database: Secure PostgreSQL (Neon) integration
- Thread-Based Conversations: Organized chat management
- Auto-Save: Real-time message saving
- Conversation History: Access all past conversations
- Cloud Storage: Data persistence across sessions
- Python 3.8 or higher
- PostgreSQL database (Neon Cloud recommended)
- OpenAI API key or compatible LLM provider
-
Clone the repository
git clone https://github.com/yourusername/langgraph-ai-assistant.git cd langgraph-ai-assistant
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.env
file in the root directory:# Database Configuration DATABASE_URL=your_postgresql_connection_string # AI Model Configuration GOOGLE_API_KEY=your_google_api_key MODEL_NAME=gemini-2.0-flash # or your preferred model
-
Run the application
streamlit run Login.py
- Create a Neon account
- Create a new project and database
- Copy the connection string to your
.env
file - Run the initialization script to create tables
Update your .env
file with the appropriate API keys and model names.
streamlit
langgraph
langgraph-checkpoint-postgres
langchain-google-genai
langchain-core
psycopg-binary
psycopg-pool
python-dotenv