Inspiration Supply chains break quietly. A port strike in Rotterdam, a typhoon off the coast of Taiwan, a sudden tariff hike — by the time a procurement manager hears about it, shipments are already delayed and customer orders are already at risk. Most businesses, especially small and mid-sized ones, manage their supplier relationships in spreadsheets and only find out something went wrong when it already has. We wanted to build the "always-on analyst" that sits between those spreadsheets and the real world, connecting live disruption signals to actual business impact before the damage is done.

What it does Supply Chain Intelligence is an agentic monitoring system that watches for disruptions across four signal layers — news and geopolitical events, weather alerts, port activity, and tariff changes — and cross-references them against a business's real data: which suppliers are active, which shipments are in transit, what inventory is on hand, and which customer orders are pending fulfillment.

When a disruption is detected, the system estimates business impact end-to-end: which suppliers are affected, whether on-hand inventory can absorb the demand shortfall, how much revenue is at risk, and how severe the disruption is. It then recommends the best alternative supplier, drafts a purchase order, and writes a ready-to-send owner email — all in a single pipeline run.

The dashboard gives procurement teams a live view of active alerts, affected shipments, risk scores, and recommended actions. A calibration feedback loop records whether past predictions were accurate, letting the system improve its severity scoring over time.

How we built it The backend is Python with a Google ADK multi-agent architecture at its core: a root coordinator delegates to specialized sub-agents for disruption detection, supplier risk scoring, procurement action generation, and historical calibration. All business data lives in BigQuery (seeded from Google Sheets for the demo, mirroring how small businesses actually manage supplier and order data). The disruption pipeline runs in a fixed 9-stage sequence — ingestion → detection → impact → calibration → black swan → agent synthesis → persistence → feedback → dashboard — with a single Gemini 2.5 Flash call doing the final severity scoring and PO sizing judgment.

To fit within the Gemini free tier's rate limits (5 RPM, 20 RPD), we replaced the original multi-agent delegation loop (~25–40 model calls per simulation) with a deterministic pipeline making exactly one model call per simulation (OPTIMIZED_PIPELINE flag). All the logic that could be deterministic Python already was; only the final judgment stays with the LLM.

The frontend is React + Vite backed by a FastAPI API, with real-time alert streaming and an action panel for owner approvals. Data connectors are managed via Fivetran MCP, and end-to-end traces are captured in Arize Phoenix.

Challenges we ran into Rate limit pressure. Gemini's free tier is aggressively constrained. Our initial multi-agent design made dozens of model calls per simulation — we had to rearchitect the hot path down to a single synthesis call without losing result quality. The key insight was that most of the pipeline (detection, impact math, supplier scoring) is purely deterministic; the LLM only needed to weigh in on the final judgment.

Connecting signals to business reality. It's easy to detect that a port is congested. It's much harder to determine whether your shipment is currently at that port, and whether your inventory can cover the demand gap while you wait. Building the exposure calculator that threads shipment position, inventory levels, and pending orders together into a single impact estimate was the hardest modeling problem.

Demo data that tells a real story. Generic mock data produces uninteresting alerts. We seeded the demo around a realistic Baltimore port scenario — real route geometries, plausible ETAs, and inventory levels tuned to create genuine coverage gaps — so the alert pipeline fires meaningfully during a live demo.

Accomplishments that we're proud of A full end-to-end pipeline that goes from raw disruption signal to a ready-to-send owner email and purchase order in a single run. Getting the entire agentic loop to work reliably within Gemini's free tier with a deterministic fallback that fires when the model budget is exhausted — no silent failures. The inventory coverage model: the system correctly reduces alert severity when on-hand stock can absorb the demand shortfall, and escalates it when the gap is uncovered. This makes the alerts genuinely actionable rather than just noisy. A calibration feedback loop that records prediction accuracy so the severity model can improve over time. What we learned LLMs belong at the judgment layer, not the data layer. Every time we pushed deterministic logic into the model, it introduced latency, cost, and non-determinism. Moving all the math back into Python and using the LLM only for synthesis made the system faster, cheaper, and more debuggable. Small businesses run on Google Sheets — modeling the data pipeline around Sheets as a first-class source (not a hack to be replaced) made the system far more realistic for the target user. Agentic systems need budget discipline from the start. Retrofitting quota management into an already-built multi-agent system is painful; it should be a first-class constraint in the architecture. What's next for Supply Chain Intelligence Live data connectors — replace the seeded demo data with live feeds from NewsAPI, WeatherAPI, and MarineTraffic via Fivetran, so the agent monitors real-world events continuously. Owner approval flow — the ActionPanel UI and approval logic are built; the next step is wiring them to a notification channel (email or Slack) so procurement managers can approve or reject recommended POs from their inbox. Scheduled autonomous runs — move from manually-triggered simulations to a continuous background loop that fires an alert cycle whenever new disruption data arrives. Multi-tenant auth — add proper authentication so multiple businesses can each see only their own suppliers, shipments, and alerts. Threshold configuration UI — surface the hardcoded severity thresholds in a settings panel so teams can tune alert sensitivity without touching code.

Built With

Share this project:

Updates