Demand Forecasting and Surge Detection
The system utilizes Chronos-2, a foundation model, within Databricks MMF to predict 7-day demand for each SKU. The detection phase employs a Databricks Genie Agent that identifies demand surges based on a 1.5x increase in the 7-day average compared to the prior 14-day average, filtering out low-volume SKUs with averages below 1. This ensures that only significant demand fluctuations trigger further action. The agent’s output is then passed to Amazon Quick for processing.
Supplier Reconciliation and Order Placement
Amazon Quick acts as the central orchestrator, leveraging Amazon S3 Tables to access live supplier availability. The system reconciles the surging SKU against this data, selecting the cheapest supplier capable of fulfilling the demand. The decision is made based on a shared product key, minimizing data duplication. Orders are placed through a Supplier Order API or, if no single supplier can meet the demand, a human-review ticket is generated.
Architecture and Components
The solution is built around a four-stage loop: Forecast (Databricks MMF), Detect (Databricks Genie Agent), Decide (Amazon Quick), and Act (Amazon Quick Flows). Databricks produces the demand forecast, while Amazon Quick executes the automated replenishment process. The system relies on the Model Context Protocol (MCP) for communication between Databricks and Amazon Quick, and utilizes OpenAPI connectors for API calls.
Operational Setup
The solution requires specific prerequisites, including an Author or Author Pro role for the Quick user and CREATE CATALOG permission on the Databricks metastore. The setup utilizes command-line tools: Databricks CLI 0.299.0+, AWS CLI 2.36.2+, jq 1.7, and uv (or Python 3.11). A configuration file, .supply-chain-automation-env, manages account-specific values. The repository provides scripts for Databricks and AWS setup, streamlining the deployment process.



