An agentic multi-model pipeline built around ECDC and ERVISS epidemiological data, delivering pharmacy-level medicine distribution recommendations across the EU.

How it’s built

Risk Detection Using Topological Data Analysis (TDA), the system monitors respiratory data to detect changes in homology, specifically tracking the "persistence" of data features to identify early-stage viral clusters before they become surges. This feeds into a Holt-Winters time series model for seasonal demand forecasting, and a fine-tuned Qwen2.5-Instruct 3B (via QLoRA) generates outbreak predictions from the processed signals. A Qwen3-235B model hosted on Crusoe then synthesises these predictions into actionable supply alerts.

Autonomous Inventory Scanning A dedicated AI agent powered by Claude Haiku 4.6 scans pharmacy inventory data to identify current supply-demand gaps. Currently performs weekly recommendations at a national level across the EU using real-time ERVISS data.

Automated Procurement & Routing A Haversine-based geospatial algorithm retrieves and ranks the nearest distributors for each pharmacy. An Orchestrator Agent then merges alert signals from both the predictive and inventory streams, elaborates a detailed list of required respiratory medicines, calculates a proposed budget, and pushes a final Check/Approve notification to the Human App for oversight, keeping a human in the loop on every procurement decision.

The frontend is a focused interactive dashboard with maps and drill-down detail views.


Challenges

  • Data Complexity: Choosing the right parameters for the TDA and time series models against the real-time ERVISS dataset required significant experimentation with dimensionality reduction and persistence thresholds.
  • Decision Agency: Defining the threshold for the AI to move from "Scanning" to "Routing" was non-trivial — the model needed to distinguish genuine outbreak signals from minor fluctuations without triggering unnecessary restocks.
  • System Integration: Building a cohesive multi-agent flow where the AI autonomously selects distributors and constructs a procurement budget — while ensuring the human-in-the-loop remained the final authority — required strict orchestration logic across every stage.

What We Learned

The "shape" of data often tells a more accurate story than simple linear trends. Integrating TDA into a supply chain context proved that high-level mathematics has a very practical, life-saving application — making healthcare systems more resilient and meaningfully more environmentally sustainable.


Tech Stack

AI & ML: Claude API (Haiku 4.6), Qwen2.5-Instruct 3B (QLoRA fine-tuned), Qwen3-235B via Crusoe, Scikit-learn, Statsmodels, Principal Component Analysis

Data & Backend: Python, Supabase, ECDC Data, ERVISS API

Frontend: NextJS, Lovable

Infrastructure: Google Colab, Zed

Algorithms: Topological Data Analysis, Holt-Winters Exponential Smoothing, Haversine Geospatial Routing

Built With

  • claude-api
  • crusoe-api
  • ecdc-data
  • erviss-api
  • geospatial
  • google-collab
  • haversine
  • holt-winters-exponential-smoothing
  • lovable
  • nextjs
  • principal-component-analysis
  • python
  • qwen
  • scikit-learn
  • statsmodels
  • supabase-db
  • tda
  • zed
Share this project:

Updates