--- title: PharmAgent emoji: 🦀 colorFrom: pink colorTo: pink sdk: gradio sdk_version: 5.33.0 app_file: app.py pinned: false tracks: - agent-demo-track license: apache-2.0 --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference # 🏆 PharmAgent Pro: AI-Powered Vaccine Intelligence for Nigeria --- ## 🌍 Overview **PharmAgent Pro** is a real-time, AI-powered vaccine supply chain intelligence system built to prevent vaccine stockouts and optimize public health logistics in Nigeria. This Gradio app demonstrates the incredible power of autonomous **AI agents** to make high-stakes, data-driven decisions in a life-critical domain. Built for the **MCP Hackathon 2025**, this project fits **Track 3: Agentic Demo Showcase** by featuring a functional AI agent that: * Analyzes live regional stock data across Nigerian states * Predicts vaccine demand and risk levels * Executes smart, cost-optimized procurement orders * Generates heatmaps and financial overviews * Delivers natural language responses in real time using Mistral AI --- ## 🚀 Key Features * 🧠 **Autonomous AI Agent** (Mistral + LlamaIndex FunctionCallingAgent) * 📊 **Realistic inventory simulation** based on demographics and risk * ⚠️ **Early warning system** for vaccine shortages * 📦 **Smart ordering engine** that minimizes cost and maximizes coverage * 📈 **National dashboard** with predictive insights * 🌡️ **Heatmaps and charts** built with Plotly for interactive analysis * 🤖 **Conversational interface** via Gradio for easy use by health officials --- ## 💡 Usage Scenarios Just type in natural language commands like: * `"Stock intelligence for Lagos"` * `"National dashboard analysis"` * `"Place emergency smart order for COVID-19 in Kano"` * `"What regions have critical vaccine shortages?"` And PharmAgent Pro will return detailed reports, actionable insights, visualizations, and even execute optimized procurement plans. --- ## 📦 Agent Framework **Powered by:** * `MistralAI` (`mistral-large-latest`) for LLM capabilities * `LlamaIndex` FunctionCallingAgent for structured tool integration * `Gradio` for UI * `Plotly` for interactive visualizations The agent has access to three core tools: * `Stock Intelligence Tool`: Analyze stock status per region * `Smart Order Tool`: Place AI-calculated vaccine orders * `Dashboard Tool`: National summary with predictive forecasts --- ## 📈 Example Output > **🧠 AI STOCK INTELLIGENCE REPORT - KANO** > 🔴 CRITICAL Yellow Fever: Only 0.8 weeks supply left! > 💡 Recommendation: Order 18,000 units from Sanofi (₦38,700.00) > ⚡ AI RISK ASSESSMENT: 🔴 HIGH (Score: 1.85) --- ## 🌟 Impact This app showcases how **autonomous AI agents** can: * Optimize vaccine logistics * Prevent deadly stockouts * Save lives through intelligent automation * Support national-scale health systems with minimal human input --- ## 🙌 Built With * [Gradio](https://www.gradio.app/) * [LlamaIndex](https://www.llamaindex.ai/) * [MistralAI](https://mistral.ai/) * [Plotly](https://plotly.com/) * [Pandas](https://pandas.pydata.org/)