Flowr -- Scaling Up Retail Supply Chain Operations Through Agentic AI in Large Scale Supermarket Chains
Authors: Eranga Bandara, Ross Gore, Sachin Shetty, Piumi Siyambalapitiya, Sachini Rajapakse, Isurunima Kularathna, Pramoda Karunarathna, Ravi Mukkamala, Peter Foytik, Safdar H. Bouk, Abdul Rahman, Xueping Liang, Amin Hass, Tharaka Hewa, Ng Wee Keong, Kasun De Zoysa, Aruna Withanage, Nilaan Loganathan
Organizations: Old Dominion University, Norfolk, VA, USA · University of Sri Jayewardenepura, Sri Lanka · Deloitte & Touche LLP, USA · Florida International University, USA · Accenture Technology Labs, Arlington, VA, USA · Center for Wireless Communications, University of Oulu, Finland · Nanyang Technological University, Singapore · University of Colombo, Sri Lanka
Retail supply chain operations in supermarket chains involve continuous, high-volume manual workflows spanning demand forecasting, procurement, supplier coordination, and inventory replenishment, processes that are repetitive, decision-intensive, and difficult to scale without significant human effort. Despite growing investment in data analytics, the decision-making and coordination layers of these workflows remain predominantly manual, reactive, and fragmented across outlets, distribution centers, and supplier networks. This paper introduces Flowr, a novel agentic AI framework for automating end-to-end retail supply chain workflows in large-scale supermarket operations. Flowr systematically decomposes manual supply chain operations into specialized AI agents, each responsible for a clearly defined cognitive role, enabling automation of processes previously dependent on continuous human coordination. To ensure task accuracy and adherence to responsible AI principles, the framework employs a consortium of fine-tuned, domain-specialized large language models coordinated by a central reasoning LLM. Central to the framework is a human-in-the-loop orchestration model in which supply chain managers supervise and intervene across workflow stages via a Model Context Protocol (MCP)-enabled interface, preserving accountability and organizational control. Evaluation demonstrates that Flowr significantly reduces manual coordination overhead, improves demand-supply alignment, and enables proactive exception handling at a scale unachievable through manual processes. The framework was validated in collaboration with a large-scale supermarket chain and is domain-independent, offering a generalizable blueprint for agentic AI-driven supply chain automation across large-scale enterprise settings.
Figures & tables
Figure 1: Overview of the supervised fine-tuning pipeline used to adapt a base LLM to domain-specific tasks. A curated, domain-specific dataset is used to perform supervised fine-tuning of a base LLM, with Low-Rank Adapter (LoRA) modules applied to enable parameter-efficient training. The resulting fine-tuned model retains the general linguistic capabilities of the base model while incorporating domain-specific knowledge, supporting efficient deployment and updates in resource-constrained and air-gapped environments.
Figure 2: Comparison between direct human–LLM interaction and agentic AI–LLM interaction. In the top panel, a human user directly constructs and submits a prompt to a language model, manually interpreting the response. In the bottom panel, an AI agent autonomously manages the interaction loop by constructing prompts, invoking the language model, interpreting responses, and determining subsequent actions without direct human intervention. This agent-mediated workflow enables iterative reasoning, tool integration, and task automation, forming the basis of agentic AI systems used for structured decision support and multi-step workflows.
Figure 3: Manual supply chain replenishment workflow in large supermarket operations. Category managers, store and warehouse staff, procurement teams, and distribution center coordinators execute sequential stages — demand analysis, inventory monitoring, purchase order generation, supplier coordination, and outlet replenishment planning — across disconnected systems with no automated integration layer. Exceptions such as stockouts, supplier delays, spoilage risks, and demand spikes are detected reactively and escalated manually, limiting the organization’s ability to respond proactively at scale.
Figure 4: Flowr agentic AI workflow for automated retail supply chain management. The workflow decomposes manual replenishment processes into six specialized agents — a Demand Forecasting Agent, an Inventory Monitoring Agent, a Procurement and Ordering Agent, a Supplier Coordination Agent, a DC (Distribution Center) Replenishment Planning Agent, and an Exception and Alert Agent — each connected to relevant external systems and data sources via MCP servers.
Figure 5: Human supply chain manager orchestrating multiple specialized Flowr agentic AI workflows. Each workflow automates a distinct supply chain function — demand forecasting, inventory monitoring, procurement, supplier coordination, DC replenishment planning, and exception handling — and is exposed through MCP servers for human-supervised coordination, approval, and intervention.
Figure 6: LLM consortium and reasoning LLM integration flow within the Flowr framework. Each agent distributes its prompt across multiple fine-tuned domain-specialized LLMs, which produce independent reasoning outputs. The central reasoning LLM synthesizes these outputs into a coherent, validated final decision, ensuring responsible and explainable AI behavior across all supply chain workflow stages.
Figure 7: Flowr agentic workflow functions exposed through MCP servers and integrated with LM Studio. The human supply chain manager interacts with multiple specialized agent workflows via the MCP-enabled interface, invoking workflows, reviewing structured outputs, and approving actions without direct code-level intervention.
Figure 8: Procurement and Ordering Agent prompt demonstrating replenishment signal processing, supplier selection reasoning, and purchase order generation methodology.
Figure 9: Procurement and Ordering Agent output showing structured purchase orders with per-SKU quantity justification, supplier selection rationale, delivery date estimates, and flagged items requiring human review prior to confirmation.
Figure 10: DC Replenishment Planning Agent prompt demonstrating multi-constraint replenishment optimization methodology, including outlet allocation, route sequencing, vehicle assignment, and perishable timing constraint handling.
Figure 11: DC Replenishment Planning Agent output showing optimized outlet allocation table with per-outlet stock assignments, vehicle and route assignments, delivery time windows, and contingency notes for high-risk stockout locations.
Efficient utilization of supply chain analytics for decision making remains a significant challenge for planners, as critical tasks such as database querying, key performance indicator (KPI) analysis, demand forecasting, and performance diagnosis require heterogeneous expertise spanning data engineering, operations research, and domain knowledge. In this work, we propose an agentic system for supply chain analytics that bridges the gap between business decision-making and technical expertise, where a coordinator agent interprets user intent and delegates sub-tasks to specialized agents. The system supports both exploratory analysis and deterministic workflows, enabling planners to transition between ad hoc questions and structured processes. Domain logic is encapsulated within specialist agents and prompts, yielding a scalable, modular, and auditable design and lowering the cost of functional extension through prompt-centric development. We evaluate the proposed architecture on a test environment that replicates multi-echelon inventory management operations. Results show that our multi-agent design achieves a 90% accuracy, which is competitive with a single agent baseline while reducing input token usage by roughly fourfold, substantially improving scalability and cost-efficiency. Furthermore, we provide case studies to demonstrate interpretable suboptimality detection and automated forecast optimization, illustrating how agentic architectures can effectively combine open-ended exploratory analysis and deterministic supply chain analytics workflows, and provide a practical pathway toward more accessible and extensible decision-support systems.
Retail supply chain operations rely on coupled decision modules that must adapt as requirements evolve. LLMs offer a natural-language interface for this task, but existing methods primarily focus on individual optimization models. Extending them to heterogeneous decision pipelines is challenging because a requirement may admit multiple intervention paths with different downstream effects. We formulate requirement-driven adaptation as the joint selection of an intervention route and an admissible module-level change, and propose a graph-constrained agentic framework in which domain agents expose admissible reformulation interfaces and a central processor searches over bounded intervention paths. Candidates are validated and compared using downstream KPIs. In collaboration with a large retail partner, we evaluate 100 warehouse requirements elicited from practitioner interviews, with GPT, Qwen, and DeepSeek as base LLMs. Relative to direct LLM reformulation, our framework improves correctness and end-to-end success across all three models, raising end-to-end success from 72--76% to 79--83%.
Lei Zheng, Liping Yang, Zihao Li +3
School of Business and Management, Hong Kong University of Science and Technology · School of Management, University of Science and Technology of China · Institute of Operations Research and Analytics, National University of Singapore +1
Can supply-chain AI move beyond isolated decision modules toward unified operational planning? A complete replenishment plan specifies which products each location carries, which upstream facility supplies it, how often it is replenished, and how deliveries are routed. These decisions are operationally coupled: the selected assortment changes the demand and load passed to later stages; source assignment and replenishment frequency reshape the delivery requests; and route feasibility and cost, in turn, determine the system value of the earlier choices. Yet in modern supply chains, these decisions are often handled by separate departments and optimized through separate systems, which can lead to stockouts, inventory exposure, and avoidable transportation. We propose SCOPE: Supply-Chain Operations through Coupled Policies for End-to-End Coordination, a composite policy model that represents supply-chain entities as tokens, contextualizes them through a shared operational representation, and maps each token type to the corresponding decision interface. Each decision builds on the partial plan formed by earlier decisions while the completed plan is evaluated using a shared system-level utility. We instantiate this framework in urban fresh-retail replenishment, where service frequency, assortment, capacity pressure, and road-network routing interact strongly, and evaluate it on real operational data from Dingdong and JD.com, two large-scale supply chains operating at different replenishment echelons. Across both settings, SCOPE consistently outperforms methods that optimize each decision stage separately, as well as practice-oriented baselines commonly used in supply-chain operations. These results show that learning and coordinating cross-department operational couplings lead to more effective end-to-end supply-chain decisions.
Yunhao Liang, Xianqi Cao, Pujun Zhang +4
The University of Hong Kong, Hong Kong SAR, China · OptiMax AI, Hong Kong SAR, China · JD.com, China