--- title: Customer Support Chatbot emoji: 🤖 colorFrom: blue colorTo: purple sdk: gradio sdk_version: 6.1.0 app_file: app.py pinned: false license: mit --- # Customer Support Chatbot A prototype customer support chatbot for a computer products company, built with Gradio, OpenAI GPT-4o-mini, and MCP server integration. ## Features - **Product Inquiries**: Browse, search, and get details about products (no authentication required) - **Order Management**: View and manage orders (requires authentication) - **Session Memory**: Maintains conversation context within each session - **Authentication**: Simple email/PIN authentication for order access ## How to Use ### Product Queries (No Authentication) - "Show me monitors" - "What products do you have?" - "Tell me about product COM-0001" - "Search for printers" ### Order Queries (Requires Authentication) - "Show my orders" - "What's the status of my order?" - "I want to place an order" ### Authentication To authenticate, include in your message: ``` email: your@email.com, pin: 1234 ``` ## Test Customers The following test customers are available: - donaldgarcia@example.net / 7912 - michellejames@example.com / 1520 - laurahenderson@example.org / 1488 - spenceamanda@example.org / 2535 - glee@example.net / 4582 - williamsthomas@example.net / 4811 - justin78@example.net / 9279 - jason31@example.com / 1434 - samuel81@example.com / 4257 - williamleon@example.net / 9928 ## Architecture - **app.py**: Gradio UI and session management - **agent.py**: LLM agent with tool calling - **mcp_client.py**: MCP server JSON-RPC client - **auth.py**: Authentication handler - **memory.py**: Session-based conversation memory - **config.py**: Configuration management ## Environment Variables Set these in your HuggingFace Space settings: - `OPENAI_API_KEY`: Your OpenAI API key - `MCP_SERVER_URL`: MCP server URL (default: https://vipfapwm3x.us-east-1.awsapprunner.com/mcp)