Inspiration
$1.5 trillion is lost globally every year to supply chain disruptions. Mid-market manufacturers have no early-warning system — their data lives in silos across spreadsheets, ERPs, logistics portals, and external APIs that never talk to each other. A single hurricane, a delayed shipment, or a stockout can cascade into millions in losses before anyone notices.
We built Supply Chain Pulse to change that: an AI agent that unifies all these sources, watches them continuously, and recommends action before disruptions hit.
What it does
Supply Chain Pulse is a real-time risk monitoring agent that:
- Ingests data from multiple sources (orders, inventory, weather, news) via Fivetran MCP connections
- Triggers automatically on every Fivetran sync completion via webhook — no polling
- Analyzes multi-signal risk using Gemini, synthesizing inventory levels, supplier reliability, and external factors into a structured risk report
- Alerts with prioritized, costed recommendations when HIGH or MEDIUM risk is detected
- Acts — but only after a human approves. The agent then calls Fivetran MCP write tools to reconfigure the pipeline (switch suppliers, increase sync frequency, create new connections)
How we built it
- Fivetran MCP — 10 tools covering the full read/write surface:
list_connections,sync_connection,modify_connection,create_connection, and more. Every tool call is logged live tologs/tool_calls.jsonland displayed in the UI - Gemini (
gemini-2.5-flash) — structured JSON output for risk analysis, natural language for the conversational chat tab - FastAPI — webhook receiver, approval endpoint, and REST API layer between Streamlit and DuckDB
- DuckDB — embedded analytics warehouse with views for risk scoring, stockout forecasting, and supplier reliability
- Streamlit — dark-themed dashboard with animated alert cards, real-time KPI banner, and chat interface
Challenges we ran into
- DuckDB multi-process locking — DuckDB only allows one writer at a time across OS processes. Solved by routing all UI reads through FastAPI REST endpoints instead of opening the database directly from Streamlit
- Gemini quota on free tier — 20 requests/day limit on AI Studio. Solved with a graceful fallback: pre-seeded demo alert + structured data formatter so the demo never hangs waiting for an API call
- Human-in-the-loop timing — The agent must never act autonomously on a supplier switch. Implemented an approval gate where the action executor only fires after explicit confirmation, with the full MCP tool call log visible to the approver
What we learned
The Fivetran MCP server is a genuinely powerful abstraction — being able to both read pipeline state and write configuration changes through the same interface makes the agent feel like a real operations tool, not just a dashboard. The combination of Gemini for synthesis and MCP for execution is a natural fit for agentic workflows.
What's next
- Wire up the real Fivetran MCP server (currently using a deterministic mock backend)
- Add Slack/email notifications for HIGH-severity alerts
- Expand to more data sources: ERP systems, port congestion APIs, FX rate feeds
Built With
- ai
- duckdb
- fastapi
- fivetran-mcp
- gemini-ai
- python
- streamlit
Log in or sign up for Devpost to join the conversation.