A conversational AI agent built with LangGraph and Streamlit, featuring persistent memory with PostgreSQL, real-time streaming, multi-tool integration, and document/video Q&A capabilities with full observability. Try it live here.
Please mind occasional Groq API errors, free tier has rate limitations. Since this is a shared demo, the database resets every day using Github Actions (disabled for now due to no usage). Also, the app is deployed on Streamlit, that uses AWS servers. The YT subtitles API blocks IPs originating from AWS servers. Hence, during deployment you cannot ask question about a YT video.
- PostgreSQL-based checkpoint persistence for reliability
- Thread-based conversation storage across sessions
- Reload previous conversations seamlessly
- Short-term memory implementation for context-aware responses
- Token-by-token streaming for improved user experience
- Live tool execution feedback (e.g., "Calling get_weather... Processing... Done")
- Asynchronous response generation with visual indicators
Four production-ready tools with streaming output:
- Calculator - Mathematical computations
- DuckDuckGo Search - Web search integration
- Currency Converter - Real-time exchange rates
- Weather API - Current weather data
- Upload one PDF per chat
- Ask questions grounded strictly in that document
- RAG-based retrieval for accurate answers
- To query another PDF, start a new chat
- Provide one YouTube video per chat
- Ask questions based on the video transcript
- Semantic search across video content
- To analyze a different video, start a new chat
- LangSmith integration for debugging and monitoring
- Trace all LLM calls, tool executions, and agent decisions
- Performance analytics and error tracking
- Built with Streamlit for rapid prototyping
- Clean, responsive UI with real-time updates
- Easy deployment and customization
- Python 3.10+
- uv package manager
- PostgreSQL 12+ installed and running
-
Clone the repository
git clone https://github.com/i0Ta07/Phoenix cd Phoenix -
Install dependencies
uv sync
-
Set up PostgreSQL database
-- Create the user CREATE USER phoenix_user WITH PASSWORD 'your_password'; -- Create the database with this user as owner CREATE DATABASE phoenix_db OWNER phoenix_user; -- Connect to the new database \c phoenix_db -- Grant schema privileges (phoenix_user already owns the database, but this ensures they can create objects) GRANT ALL PRIVILEGES ON SCHEMA public TO phoenix_user; -- For future tables/sequences created by ANY user, grant access to phoenix_user ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO phoenix_user; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO phoenix_user;
-
Configure environment variables
Create a
.envfile in the root directory:# Groq GROQ_API_KEY=your_groq_key # LangSmith Observability LANGSMITH_API_KEY=your_langsmith_key LANGCHAIN_TRACING=true LANGSMITH_ENDPOINT=https://api.smith.langchain.com LANGCHAIN_PROJECT=phoenix # ExchangeRate API EXCHANGE_API_KEY=your_exchange_rate_api_key # Hugging Face Token HF_TOKEN = "your_hugging_face_token" # PostgreSQL Database DB_URL="postgresql://phoenix_user:your_password@localhost:5432/phoenix_db"
-
Launch the application
cd main uv run streamlit run main/frontend.py
Phoenix is deployed on Streamlit Cloud.
| Component | Service |
|---|---|
| Hosting | Streamlit Cloud |
| LLM Inference | Groq (gpt-oss-120b,gpt-oss-20b) |
| Embeddings | HuggingFace (all-MiniLM-L6-v2) |
| Database | Neon DB (Serverless Postgres) |
| DB Reset | GitHub Actions (every day (disabled due to low usage now)) |
Contributions are welcome! Please open an issue or submit a pull request.
