StockSense: Forecast & Replenishment Agent on AMD

Streamlit
application badge
Created by team Takumu Hata on October 18, 2026
Reinvent Commerce

Small and mid-sized retailers still order by gut feeling, losing margin to both stockouts and overstock. Enterprise forecasting suites are too expensive and too opaque for them. StockSense combines a numeric forecaster with an AI agent: 1. Forecasting (not LLM-only): LightGBM quantile models predict daily demand per SKU and store from sales history, weekday, holidays, price and promotions. It outputs P10/P50/P90; the median beat the best naive baseline by 5.8pp with 35.0% WAPE vs 40.8% (-14.2%). 2. Replenishment agent: Gemma-4-31B-IT on AMD GPUs via AMD Token Factory (OpenAI-compatible API, vLLM on AMD) calls get_forecast, get_inventory and calc_order_qty to draft orders and explain each quantity. All quantities come from tools using an order-up-to policy (P90 demand over lead time + review period, rounded to case packs). A number guard cross-checks every figure against tool outputs; in a measured run the agent made 12 tool calls and all 21 numbers passed the guard. aga come from tools using an order-up-to policy (P90 demand over lead time + review period, rounded to case packs). A number guard cross-checks every figure against tool outputs; in a measured run the agent made 12 tool calls and all 21 numbers passed the guard. 3. Human approval gate: nothing is ordered automatically. The store manager approves or edits each line, and edits are logged so a planner can trust the system. AMD usage: every LLM call (agent reasoning, tool calling, explanations) runs on AMD GPUs through AMD Token Factory via the openai SDK with a swapped base_url; the model is picked from GET /models (preferring Gemma), and the UI shows the model name and latency for each response.

Category tags: