--- title: Langgraph Ui emoji: 🚀 colorFrom: yellow colorTo: yellow sdk: gradio sdk_version: 5.49.1 app_file: app.py pinned: false --- # LangGraph UI A Gradio-based chat interface for LangGraph supervisor workflow with nested agent visualization and ML pipeline automation. ## Features - 📊 Data extraction from RDB tables using SQL - 🔤 Language model pretraining with tokenization - 🎯 Classification model finetuning - 📈 Comprehensive model evaluation (Precision, Recall, F1-score, Accuracy) - 🤝 4 specialized agents coordinated by supervisor - 🇰🇷 Korean language support ## Setup ### Local Development 1. Install dependencies: ```bash uv sync ``` 2. Set up environment variables: Create a `.env` file in the root directory (or copy from `.env.example`): ```bash # Required OPENAI_API_KEY=your-openai-api-key-here # Optional: LangSmith Observability LANGCHAIN_TRACING_V2=true LANGCHAIN_API_KEY=your-langsmith-api-key-here LANGCHAIN_PROJECT=langgraph-ui ``` To get a LangSmith API key: - Sign up at [LangSmith](https://smith.langchain.com/) - Create an API key in your settings - LangSmith provides observability for all agent executions, traces, and performance metrics 3. Run the application: ```bash uv run python app.py ``` The application will start on `http://localhost:7860` ### HuggingFace Spaces Deployment To deploy on HuggingFace Spaces, set these secrets: 1. Go to your Space settings 2. Navigate to "Repository secrets" 3. Add required secret: - Name: `OPENAI_API_KEY` - Value: your OpenAI API key 4. (Optional) Add LangSmith secrets for observability: - `LANGCHAIN_TRACING_V2=true` - `LANGCHAIN_API_KEY=your-langsmith-api-key` - `LANGCHAIN_PROJECT=langgraph-ui` ## Project Structure - `app.py` - Main Gradio application - `ml_pipeline_workflow.py` - ML pipeline supervisor workflow with 4 specialized agents - `pyproject.toml` - Project dependencies managed by uv - `.env` - Environment variables (not tracked in git) - `.env.example` - Environment variables template ## Technologies - [Gradio](https://gradio.app/) - Web UI framework - [LangGraph](https://langchain-ai.github.io/langgraph/) - Agent orchestration - [LangChain](https://langchain.com/) - LLM framework - [OpenAI](https://openai.com/) - LLM provider - [LangSmith](https://smith.langchain.com/) - Observability and monitoring (optional) - [uv](https://github.com/astral-sh/uv) - Python package manager Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference