<?xml version="1.0" encoding="UTF-8"?>
<article xmlns:xlink="http://www.w3.org/1999/xlink">
<front><article-meta>
<title-group><article-title>Intelligent Inventory Management in Behpakhsh Company&apos;s Supply Chain Using InvAgent: A Large Language Model Based on a Multi-Agent System</article-title></title-group>
<contrib-group>
<contrib contrib-type="author"><name><surname>Bagherian</surname><given-names>Mohammad</given-names></name><xref ref-type="aff" rid="aff1"/></contrib>
<contrib contrib-type="author"><name><surname>Bagherian</surname><given-names>Behnam</given-names></name><xref ref-type="aff" rid="aff2"/></contrib>
<contrib contrib-type="author"><name><surname>Nahavandi</surname><given-names>Nasim</given-names></name><xref ref-type="aff" rid="aff3"/></contrib>
<aff id="aff1">Department of  Industrial Engineering, Tarbiat Modares University, Tehran Iran.</aff>
<aff id="aff2">Department of Rail Transportation Engineering, Tehran University of Science and Technology Iran.</aff>
<aff id="aff3">Department of Industrial Engineering, Faculty of Industrial Engineering, Tarbiat Modares University, Tehran, Iran.</aff>
</contrib-group>
<abstract><p>Behpakhsh Company, as one of the largest distribution and logistics companies in the country, plays a significant role in Supply Chain Management (SCM). SCM involves coordinating and integrating material, information, and financial flows across units to ensure the efficient and effective procurement and distribution of goods. In today&apos;s Volatile, Uncertain, Complex, and Ambiguous (VUCA) environment, effective inventory management is essential for the operational success of distribution companies. This paper examines the innovative approach adopted by Behpakhsh Company to leverage InvAgent technology, an artificial intelligence–based language model that uses zero-shot learning to enhance inventory management and reduce costs. By analyzing data and making intelligent decisions under changing conditions, InvAgent improves transparency and adaptability across Behpakhsh&apos;s supply chain. The implementation of this model has not only increased efficiency and productivity in Behpakhsh&apos;s distribution operations but also helped mitigate the risks of inventory shortages and excessive stockpiling. Ultimately, this study demonstrates that Behpakhsh, through advanced technologies and Large Language Models (LLMs), has achieved improved supply chain performance and enhanced customer satisfaction.</p></abstract>
<kwd-group kwd-group-type="author"><kwd>Behpakhsh supply chain management</kwd><kwd>Inventory management</kwd><kwd>Large language model</kwd><kwd>Zero-shot</kwd></kwd-group>
</article-meta></front>
<body>
<sec id="sec-1">
<p>learning, InvAgent.</p>
</sec>
<sec id="sec-2"><label>1</label><title>Introduction</title>
<p>Supply Chain Management (SCM) involves the coordination and management of the flows of goods, information, and finances across interconnected and diverse entities, from suppliers to consumers, to deliver products efficiently and effectively. Inventory management, as a vital component of SCM, focuses on monitoring and controlling ordering, storage, and utilization of components and finished products. In today&apos;s Volatile, Uncertain, Complex, and Ambiguous (VUCA) world, effective inventory management is essential for aligning supply and demand, minimizing costs, and enhancing supply chain resilience. It enables firms to remain confident in their ability to adapt to disruptions (Quan et al. <xref ref-type="bibr" rid="ref-1">[1]</xref>), optimize resources (Abaku et al. <xref ref-type="bibr" rid="ref-2">[2]</xref>), and sustain uninterrupted operations (Yasmin <xref ref-type="bibr" rid="ref-3">[3]</xref>) in a highly interconnected, dynamic market environment. Previous studies on inventory management have explored various applications of heuristic approaches, such as the Beer Distribution Game <xref ref-type="bibr" rid="ref-4">[4–6]</xref>. In addition, numerous applications of reinforcement learning–based models have been investigated, including decentralized inventory management (Mousa et al. <xref ref-type="bibr" rid="ref-7">[7]</xref>) and adaptive supply chain synchronization (Kegenbekov and Jackson <xref ref-type="bibr" rid="ref-8">[8]</xref>). However, these approaches often require complex model design and extensive training resources and generally lack explainability. Despite these advances, the application of Large Language Models (LLMs) to address multi-agent Inventory Management Problems (IMP) in the supply chain of Behpakhsh Company has not yet been comprehensively investigated. In this study, InvAgent is introduced as an innovative LLM-based zero-shot multi-agent inventory management system. By leveraging the advanced capabilities of LLMs, this system enhances the operational resilience of Behpakhsh&apos;s supply chain and strengthens collaboration among its network components. The InvAgent approach utilizes the reasoning and decision-making capabilities of LLMs to achieve better coordination, optimize inventory management processes, and enhance transparency and adaptability within Behpakhsh&apos;s supply chain. The proposed framework of this paper, illustrated in <xref ref-type="fig" rid="fig1">Fig. 1</xref>, comprehensively explains the operational mechanism of InvAgent and its impact on improving the efficiency of Behpakhsh&apos;s supply chain network.</p>
<fig id="fig1"><label>Figure 1</label><caption><p>Illustrates the InvAgent framework.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:1:66,375.9,537.1,493"/><p content-type="note">This figure is shown in the PDF version of the article.</p></fig>
<p><xref ref-type="fig" rid="fig1">Fig. 1</xref> illustrates the InvAgent framework, a Zero-Shot LLM-based multi-agent inventory management system. First, the user proxy resets the environment at the beginning of the first episode. In the second step, the user proxy requests the current episode state for each stage from the environment. Then, the user proxy provides the current state to each stage and requests an action from it. Finally, all agents take actions simultaneously and transition to the next state.</p>
<p>Our contributions in this paper, with a focus on Behpakhsh Company, are summarized as follows:</p>
<sec id="sec-3"><title>Utilizing large language models for multi-agent inventory management</title>
<p>In this study, the Zero-Shot learning capabilities of LLMs are employed to manage the multi-agent inventory management systems of Behpakhsh Company. This capability enables adaptive and informed decision-making without the need for prior training or explicitly provided examples, thereby enhancing system flexibility.</p>
</sec>
<sec id="sec-4"><title>Model explainability and transparency</title>
<p>The proposed model offers a high level of explainability, further enhanced by Chain-of-Thought (CoT) reasoning. This feature facilitates a clearer understanding of the model&apos;s behavior and increases trust in its outcomes, making it a more reliable system compared to traditional heuristic and reinforcement learning approaches.</p>
</sec>
<sec id="sec-5"><title>Dynamic adaptation to variable demand</title>
<p>Our model dynamically adapts to different demand scenarios, thereby minimizing costs and preventing inventory shortages. Through extensive evaluation across diverse scenarios, this capability demonstrates improved efficiency in Behpakhsh Company&apos;s SCM and optimizes inventory management processes.</p>
<p>These contributions enable Behpakhsh Company to enhance its supply chain productivity by leveraging advanced technologies and to deliver more reliable and transparent operational performance.</p>
</sec>
</sec>
<sec id="sec-6"><label>2</label><title>Methodology</title>
<p>This section describes the methodological framework for designing and implementing the InvAgent model. This methodology involves defining a multi-layer, multi-period production–inventory system to model and simulate the supply chain processes of the Behpakhsh Company. Subsequently, the proposed InvAgent model is introduced as an LLM-based multi-agent inventory management system, which is designed to optimize supply chain operations</p>
<sec id="sec-7"><label>2.1</label><title>Problem Definition</title>
<p>A multi-layer, multi-period production–inventory system is designed to model and simulate a typical multi-stage supply chain for the production and distribution of non-perishable goods. As illustrated in <xref ref-type="fig" rid="fig2">Fig. 2</xref>, each stage of the supply chain consists of an inventory storage area (for storing essential materials required for production) and a production facility (for converting raw materials into products).</p>
<p>System characteristics:</p>
<p>I. The output materials of stage i are used as the input materials for stage i–1.</p>
<p>II. The stages are indexed in descending order, from stage M–1 (the upstream beginning of the supply chain) to stage 0, which represents the retail level.</p>
<p>III. Production at each stage is constrained by both the production capacity and the available inventory at that stage.</p>
<p>IV. The flow of raw materials starts from upstream stages and eventually reaches the retail stage to satisfy customer demand.</p>
<p>Time periods (T): the supply chain is divided into discrete time periods t. Each simulation starts at t = 0 with initial conditions, and during each time period T, the following events occur:</p>
<p>Shipment review: each stage receives its inbound shipments that arrive after completing the corresponding transportation lead times.</p>
<p>Order and demand review: each stage places replenishment orders to its corresponding suppliers. Orders are placed based on available production capacity and suppliers&apos; inventory levels. Customer demand at the retail stage is fulfilled based on available inventory.</p>
<p>Order and demand fulfillment: each stage delivers products up to its maximum feasible capacity to satisfy incoming demands or replenishment orders. Orders and demands that cannot be fulfilled within the current time period are prioritized in the subsequent period.</p>
<p>Profit calculation: each stage calculates the costs and profits associated with the following activities: product sales, raw material ordering, penalties for delayed fulfillment, and Holding costs for excess inventory.</p>
<p>This multi-layer, multi-period production–inventory system provides the foundational structure for analyzing and simulating the supply chain processes of the Behpakhsh Company. It accurately models transportation, production, and inventory management processes. The proposed InvAgent leverages this structure to enhance supply chain performance and reduce operational costs.</p>
<fig id="fig2"><label>Figure 2</label><caption><p>Flowchart of inventory management of a multi-tier supply chain.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:3:66,530.7,537.1,712.6"/><p content-type="note">This figure is shown in the PDF version of the article.</p></fig>
<p>In <xref ref-type="fig" rid="fig2">Fig. 2</xref>, Raw materials flow through each stage, which includes inventory storage and production facilities. The upstream plant at stage i supplies intermediate products to stage i-1 below, where they are stored as inventory. Stage 0 (retail) supplies finished products to meet customer demand. Considering the items mentioned in <xref ref-type="table" rid="tab1">Table 1</xref>, the overall inventory management problem (IMP), which is taken from Hubbs et al. <xref ref-type="bibr" rid="ref-9">[9]</xref>, can be described using the following equations:</p>
<p>Im,t = Im,t−1 + Rm,t−Lm − Sm,t, for all m ∈ M, (1) Rm,t = min(Bm+1,t−1 + Om,t,Cm+1, Im+t,t−1 + Rm+1,t−Lm+1) , for all m = 0, … , M − 2, (2a) RM−1,t = OM−1,t, (2b) Sm,t = Rm−1,t, for all m = 1, … , M − 1, (3a) S0,t = min(B0,t−1 + Dt,C0, I0,t−1 + R0,t−L0), (3b) Bm,t = BM,t−1 + Om−1,t − Sm,t, for all m = 1, … , M − 1, (4a) B0,t = B0,t−1 + Dt − S0,t, (4b) Pm,t = pmSm,t − rmRm,t − kmBm,t − hmIm,t, for all m ∈ M. (5)</p>
<p>In Eq (1), the current inventory at stage m at the end of the current time period t is equal to the ending inventory of the previous period, plus the fulfilled order from period t − Lm, minus the sales during the current period. In Eq (2.a), the fulfilled orders at stage m placed during time period t are determined by the minimum of the following three components: 1) the previous backlog at the downstream stage plus the newly requested orders, 2) the production capacity of the upstream stage, and 3) the total available inventory at the upstream stage m + 1 at the beginning of time period t, which includes the remaining inventory from the previous period and newly arrived orders after accounting for the transportation lead time. The final fulfilled order is the minimum of these three values, ensuring the order does not exceed any of them. It ensures the supply chain operates within inventory and capacity limits, preventing overcommitment and inventory shortages. Eq (2.b) indicates that requested orders at the highest stage are always fulfilled, since an unlimited supply of raw materials is assumed at this stage. As shown in Eq (3.a), sales are always equal to the fulfilled orders, except at stage 0 (the retailer). In Eq. (3.b), sales at stage 0 (the retailer) during time period t are determined by the minimum of the following three components: 1) the previous backlog at stage 0 plus the current customer demand, 2) the production capacity at stage 0, and 3) the total available inventory at stage 0 at the beginning of time period t, which consists of the remaining inventory from the previous period and newly fulfilled orders after accounting for transportation lead time. It ensures that retail sales do not exceed total demand, production capacity, or available inventory. In Eq. (4.a), the backlog at stage m during time period t, for all stages except the retailer, is calculated as the sum of the previous backlog at that stage and the orders requested from the downstream stage, minus the sales at stage m. In Eq. (4.b), the backlog at stage 0 (the retailer) during time period t is calculated similarly to Eq. (4.a); however, the requested order is replaced by customer demand, since the retailer interacts directly with customers. Finally, in Eq. (5), the profit at each stage m during time period t is calculated as sales revenue minus procurement costs, unmet demand penalty costs, and inventory holding costs.</p>
<table-wrap id="tab1"><label>Table 1</label><caption><p>Parameter symbols and definitions.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:4:66,427.2,537.1,653.2"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
</sec>
<sec id="sec-8"><label>2.2</label><title>InvAgent</title>
<p>In this project, we introduce InvAgent, a LLM–based multi-agent inventory management system designed for supply chain optimization. InvAgent consists of several key agents, including a user proxy and one agent for each stage of the supply chain. The user proxy acts as an intermediary between the environment and all supply chain agents, facilitating communication and data exchange management.</p>
<p>The methodological framework of InvAgent is illustrated in <xref ref-type="fig" rid="fig1">Fig. 1</xref> and proceeds through the following steps:</p>
<p>I. The user proxy resets the environment at the beginning of the first episode.</p>
<p>II. The user proxy requests the current episode state for each stage from the environment.</p>
<p>III. The user proxy provides the state of each stage to the corresponding agent and requests an action from it. IV. The user proxy sends the agents&apos; actions to the environment and receives the next state and the reward for that step.</p>
<p>V. The user proxy determines whether the simulation has terminated; if not, the simulation returns to Step 2. At the beginning of the simulation, we generate system messages for the agents (as shown in <xref ref-type="fig" rid="fig3">Fig. 3</xref>) that provide essential information, such as definitions, roles, and objectives, within the supply chain. The agent state Sm,tS_{m,t}Sm,t and action am,ta_{m,t}am,t are defined as follows:</p>
<p>sm,t = [cm, pm, rm, km, hm, Lm, Im,t−1, Bm,t−1, Bm+1,t−1, Sm,t−Lmax, … , Sm,t−1, 0, … ,0, Rm,t−Lm, … , Rm,t−1], and</p>
<p>am,t = Om,t, The state comprises the current stage, inventory level, backlog, upstream backlog, recent sales, and received deliveries, with zero remaining layers. As illustrated in <xref ref-type="fig" rid="fig4">Fig. 4</xref>, the prompt is designed to collect state information and action requests from each agent to ensure effective decision-making and transparent communication across the supply chain. It includes contextual information such as the current time step, the stage, and the stage index, which indicate the model&apos;s position within the supply chain. The state description (<xref ref-type="fig" rid="fig5">Fig. 5</xref>) provides a comprehensive snapshot of inventory levels, backlogs, past sales, and incoming deliveries, thereby enabling informed decision-making. Demand details (<xref ref-type="fig" rid="fig6">Fig. 6</xref>) and downstream orders (<xref ref-type="fig" rid="fig7">Fig. 7</xref>) help link supply decisions to immediate needs, allowing upstream suppliers to respond rapidly to downstream orders or demand signals. The strategy description (<xref ref-type="fig" rid="fig8">Fig. 8</xref>) highlights guidelines such as accounting for lead times and avoiding over-ordering to maintain inventory balance. By requiring justification before action selection, the prompt promotes transparency and interpretability in the decision-making process.</p>
<p>System Message:</p>
<p>Retailer: You play a vital role as Stage 1 (Retailer) in a four-stage supply chain. Your objective is to minimize the total cost by effectively managing inventory and orders.</p>
<p>Wholesaler: You play a vital role as Stage 2 (Wholesaler) in a four-stage supply chain. Your objective is to minimize the total cost by effectively managing inventory and orders.</p>
<fig id="fig3"><label>Figure 3</label><caption><p>System messages that provide critical information, such as definitions, roles, and objectives in the supply chain.</p></caption></fig>
<p>Prompt:</p>
<p>You are currently at period {time period}, and you are at stage {stage} out of {number of stages} in the supply chain. Given the current situation:</p>
<p>{State description}</p>
<p>{Demand description} {Downstream order description}</p>
<p>What is your action (order quantity) for this period?</p>
<p>{Strategy description}</p>
<p>Please first explain your reasoning in 1–2 sentences, and then state your action as a non-negative number enclosed in brackets (e.g., [0]) Demand Description:</p>
<fig id="fig4"><label>Figure 4</label><caption><p>Prompt for inventory management simulation in LLMs (see Figs. 5–8).</p></caption></fig>
<p>• Constant Demand: The expected demand at the retail stage (Stage 1) is a fixed demand of 4 units for all 12 periods.</p>
<p>• Variable Demand: The expected demand at the retail stage (Stage 1) follows a discrete uniform distribution U {0, 4} for all 12 periods.</p>
<p>• Higher Demand: The expected demand at the retail stage (Stage 1) follows a discrete uniform distribution U {0, 8} for all 12 periods.</p>
<p>• Seasonal Demand: The expected demand at the retail stage (Stage 1) follows a discrete uniform distribution U {0, 4} for the first 4 periods and a discrete uniform distribution U {5, 8} for the remaining 8 periods.</p>
<p>• Normal Demand: The expected demand at the retail stage (Stage 1) follows a truncated normal distribution N (4, 22) at 0 for all 12 periods.</p>
<fig id="fig5"><label>Figure 5</label><caption><p>Upon receiving deliveries, we select the next Lm interval.</p></caption></fig>
<fig id="fig6"><label>Figure 6</label><caption><p>Demand description for the different demand scenarios included in the order.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:6:66,464,537.1,587.4"/><p content-type="note">This figure is shown in the PDF version of the article.</p></fig>
<p>Bottom Order Description:</p>
<p>Your bottom order from stage {stage-1} for this round is {[stage-1] actions}.</p>
<fig id="fig7"><label>Figure 7</label><caption><p>Downward ordering from the previous to the current stage in a cycle that can transfer downstream information faster.</p></caption></fig>
<p>Strategy Description:</p>
<p>The golden rule of the game: Open orders should always be equal to “Expected down Orders + Backlogs”. If open orders are larger than this, inventory will increase (as soon as open orders arrive). If open orders are smaller than this, the backlog will not decrease and may even increase. Please plan in advance when and where to transfer your order. Remember that your upstream stage has its own transfer time, so don’t wait until the inventory runs out. Also, avoid ordering multiple units at once. Try to spread your order over multiple rounds to avoid the bullwhip effect. Anticipate future order changes and adjust your orders accordingly to maintain a stable inventory level.</p>
<fig id="fig8"><label>Figure 8</label><caption><p>Strategy description introducing the golden rule and decision-making guidance for the LLM.</p></caption></fig>
<p>Design Features of the Prompt are as follows Step 1. Zero-shot learning The prompt we designed operates via zero-shot learning, providing the LLM with all examples. It means the model must generate responses solely based on its pre-existing knowledge and the information provided in the prompt.</p>
<p>Step 2. Demand description Unlike reinforcement learning, which involves a training process to improve understanding of the environment and demand, since we do not have prior training, providing a detailed and clear demand description is crucial to ensure accurate understanding and effective responses.</p>
<p>Step 3. Downstream orders The prompt considers downstream orders, where information can be delivered quickly and shared efficiently across different stages.</p>
<p>Step 4. Human-designed strategy The inherent LLM strategy is generally sufficient for simple scenarios, such as fixed demands. However, for more complex scenarios, like seasonal demand, it is assumed that human-designed strategies can better assist LLMs in decision-making.</p>
<p>Step 5. Chain-of-Thought (CoT) The CoT approach can improve the explainability of results. By guiding the LLM through a structured reasoning process, CoT helps the model better understand the scenario and enhance its reasoning, ultimately leading to more reliable, accurate outcomes.</p>
</sec>
</sec>
<sec id="sec-9"><label>3</label><title>Experiments</title>
<p>In this section, we evaluate the performance of InvAgent, our proposed LLM based on a multi-agent inventory management system, by describing the experimental scenarios, baseline models, and experimental settings. Then, we present results demonstrating the adaptability and efficiency of InvAgent, summarized with ablation studies to assess the impact of various prompt components in dynamic SCM.</p>
<p>To evaluate InvAgent&apos;s performance in a multi-layer supply chain, a set of experimental scenarios was designed. Each scenario provides specific conditions to examine the robustness and adaptability of the proposed model. The goal of these scenarios is to simulate various situations that a supply chain might encounter in real-world conditions.</p>
<sec id="sec-10"><label>3.1</label><title>Experimental Scenario Features</title>
<p>Dynamic demand scenarios: situations where customer demand changes unexpectedly. Assessing how the model adapts to complex patterns and extreme demand fluctuations.</p>
<p>Resource constraint scenarios: limitations in production capacity, storage space, and transportation. Analyzing model performance under conditions where resources are insufficient to meet demand.</p>
<p>Multi-period scenarios: include delays in transferring materials between different supply chain stages and the evaluation of the impact of scheduling on inventory and production.</p>
<p>Seasonal demand scenarios: demand fluctuations based on seasons, such as increased demand during peak sales periods. Assessing the model&apos;s ability to predict and manage inventory for specific periods.</p>
</sec>
<sec id="sec-11"><label>3.2</label><title>Parameter Configuration</title>
<p>Parameters used in these scenarios are summarized in <xref ref-type="table" rid="tab2">Table 2</xref> and include:</p>
<p>I. Demand levels: minimum, average, and maximum demand per period.</p>
<p>II. Production capacity: possible production at each stage of the supply chain.</p>
<p>III. Lead times: delays in transferring materials between supply chain stages.</p>
<p>IV. Associated costs: including production, inventory holding, and penalty costs.</p>
<table-wrap id="tab2"><label>Table 2</label><caption><p>Parameter arrangement for different supply chain scenarios.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:8:66,493,537.1,623.6"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<p>In the first scenario, a 4-stage supply chain with a constant demand of 4 units per period is tested over more than 12 time periods, starting with an inventory of 12 units at each stage and a 2-period lead time. This scenario aims to examine the model&apos;s basic performance under stable conditions. The second scenario introduces variable demand, uniformly distributed between 0 and 4 units per period, to assess the system&apos;s ability to manage fluctuating demand while maintaining efficient inventory levels. The third scenario further increases demand variability, with a uniform distribution between 0 and 8 units per period, and sets the sales and ordering costs at five units per period. This scenario tests the model&apos;s capacity to handle high variability and financial impacts. The fourth scenario simulates seasonal demand with a step pattern ranging from 4 to 8 units per period, while maintaining the same financial parameters as in the third scenario, to evaluate system performance under variable but predictable demand patterns. Finally, the fifth scenario involves normally distributed demand with a mean of 4 units and a standard deviation of 2 units per period, along with different lead times, initial inventories, sales prices, and ordering costs at all stages. This scenario examines system performance under more realistic demand fluctuations and varying operational constraints. Collectively, these scenarios provide a testbed for evaluating the efficiency and adaptability of our multi-agent system in dynamic inventory management within a multi-layered supply chain.</p>
</sec>
<sec id="sec-12"><label>3.3</label><title>Experimental Settings</title>
<p>The performance of our model, InvAgent, is evaluated by the cumulative reward across all stages and time periods within a single simulation (episode). The reported numbers for each experiment are averaged over five episodes to reduce uncertainty. For this evaluation, we utilize Python packages such as AutoGen <xref ref-type="bibr" rid="ref-10">[10]</xref>, Gymnasium <xref ref-type="bibr" rid="ref-11">[11]</xref>, and RLlib <xref ref-type="bibr" rid="ref-12">[12]</xref>. We also leverage LLMs, including GPT-4, GPT-4O, and GPT-4-Turbo <xref ref-type="bibr" rid="ref-13">[13]</xref>.</p>
<p>In the constant demand scenario, to improve InvAgent&apos;s performance, the final part of the prompt in <xref ref-type="fig" rid="fig4">Fig. 4</xref> is modified to &quot;([0], <xref ref-type="bibr" rid="ref-4">[4]</xref>, or just <xref ref-type="bibr" rid="ref-8">[8]</xref> D)&quot;.</p>
<p>The performance of the baseline models is evaluated using the episode reward, averaged over 100 episodes. In the reinforcement learning (RL) section, we explore different hyperparameter settings, including:</p>
<p>I. Number of hidden units: [128,128] and [256,256].</p>
<p>II. Activation function: ReLU.</p>
<p>III. Learning rate: 1e-4, 5e-4, 1e-3.</p>
<p>IV. Training batch size: 500, 1000, 2000.</p>
<p>V. Minibatch size in Stochastic Gradient Descent (SGD): 32, 64, 128.</p>
<p>VI. Number of SGD iterations: 5, 10, 20.</p>
<p>VII. Number of training iterations: 500, 800, 1000, 1500.</p>
<p>VIII. Discount factor: 1.0.</p>
<p>In each experiment, 20 random hyperparameter combinations are selected, and the best configuration is retained. The final hyperparameters used for all scenarios are provided in Appendix C. Reinforcement learning experiments were conducted on an NVIDIA A10 GPU.</p>
</sec>
<sec id="sec-13"><label>3.4</label><title>Experimental Results</title>
<p>The results of the experiments, presented in <xref ref-type="table" rid="tab3">Table 3</xref>, highlight the performance of various inventory management models under different demand scenarios. The InvAgent model, in particular, demonstrated remarkable and competitive performance in situations where demand is variable and unpredictable.</p>
<p>In the variable demand scenario, InvAgent (even without using manually designed strategies) achieved the highest average episode reward. Although reinforcement learning models such as MAPPO performed better in some scenarios, the adaptability and zero-shot capability of InvAgent provided unique advantages. This feature enables InvAgent to make reasonable decisions and understand complex concepts without the need for training examples or prior data, functioning much like human intuition.</p>
<sec id="sec-14"><label>3.4.1</label><title>Superiority of invagent compared to heuristic models</title>
<p>Compared to heuristic models such as the Base-Stock Policy and Tracking-Demand Policy, InvAgent shows significant Superiority. These traditional models rely on historical or static data and often perform inefficiently when demand patterns exhibit severe, unpredictable changes. In contrast, InvAgent dynamically adapts to real-time conditions and:</p>
<p>I. Minimizes inventory holding costs.</p>
<p>II. Prevents stockouts and supply delays.</p>
<p>The performance of InvAgent under variable-demand conditions was particularly notable, clearly demonstrating its ability to handle complex, unpredictable scenarios. These results indicate that InvAgent not only reduces costs compared to heuristic models but also provides better adaptability.</p>
</sec>
<sec id="sec-15"><label>3.4.2</label><title>Summary of experimental results</title>
<p>InvAgent demonstrates strong capabilities in reducing costs, managing variable demand scenarios, and preventing stock shortages. Compared to heuristic models, it offers higher flexibility and better performance under complex conditions. Compared to reinforcement learning models, it is simpler, more stable, and less costly to implement, though it may achieve lower precision in some cases. These characteristics make InvAgent a suitable and efficient solution for inventory management in Behpakhsh&apos;s supply chain, highlighting its ability to optimize supply chain processes and adapt to variable conditions.</p>
<table-wrap id="tab3"><label>Table 3</label><caption><p>Avg. episode rewards (±SD) for inventory models across demand scenarios.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:9:66,63.4,537.1,154.2"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<p>The comparison of InvAgent&apos;s performance in inventory management of BehPakhsh&apos;s supply chain indicates that the intrinsic strategy of the Large Language Model (LLM) is generally sufficient for many simpler scenarios, such as constant and variable demand. This capability stems from the LLM&apos;s inherent features, which enable dynamic, adaptive decision-making without the need for manually designed strategies.</p>
<p>However, in more complex scenarios, such as seasonal or patterned demands, incorporating human-designed strategies into the model significantly improves decision-making quality and overall performance. It highlights the importance of combining the LLM&apos;s intrinsic capabilities with specific strategies to address complex conditions in BehPakhsh&apos;s supply chain.</p>
</sec>
</sec>
<sec id="sec-16"><label>3.5</label><title>Attrition Studies in Behpakhsh Company: Examining the Impact of Prompt Components in the InvAgent Model</title>
<p>To evaluate the impact of different prompt components on the InvAgent model&apos;s performance in managing Behpakhsh Company&apos;s supply chain under a variable-demand scenario, ablation studies were conducted. Details of this study are presented in <xref ref-type="table" rid="tab4">Table 4</xref>.</p>
<p>Scenario study: demand randomly varies between 0 and 4 units per period. These variations are repeated over 12 periods to simulate demand dynamics and uncertainty.</p>
<sec id="sec-17"><label>3.5.1</label><title>Results of ablation studies</title>
<p>Prompt without strategy section: This performed best in this scenario. Other models were compared using this prompt as the reference.</p>
<p>Impact of different prompt components: this component of the prompt played a key role in improving model performance by providing precise information about demand fluctuations. This component optimized the model&apos;s performance in coordinating with downstream levels of the supply chain, thereby reducing delays. By utilizing agents&apos; historical activity, the model was able to make more informed decisions. This feature allowed the model to leverage all previous messages throughout the episode. Reasoning through the CoT made the model&apos;s decision-making more structured and transparent. This process played an important role in inventory management, helping prevent stockouts and overstocking.</p>
</sec>
<sec id="sec-18"><label>3.5.2</label><title>Prompt examples and model responses</title>
<p>An example of a prompt and the InvAgent model&apos;s response for a constant demand scenario using GPT-4 is shown in Fig. 9. The prompt included a detailed description of the current state, a demand description specifying expected retail demand, and a description of a strategy aligning open orders with expected downstream orders while considering lead times and the bullwhip effect. In response, the retail agent, given that the current inventory is sufficient to meet maximum demand for up to 3 periods with a 2-period lead time, decides not to place an order in this period to prevent excess inventory accumulation, as explained in the agent&apos;s reasoning.</p>
</sec>
<sec id="sec-19"><label>3.5.3</label><title>Analysis of the invagent application in behpakhsh</title>
<p>This example demonstrates how InvAgent can make intelligent decisions across various supply chain scenarios for Behpakhsh using precise prompts and logical analysis. In this example:</p>
<p>I. Prevention of inventory accumulation: the model&apos;s decision helps reduce holding costs and prevents resource wastage.</p>
<p>II. Consideration of lead times and bullwhip effect: By accounting for lead times, InvAgent aligns new orders with current conditions.</p>
<p>III. Logical and transparent response: transparency in decision-making logic increases trust in the model and enables review and evaluation of responses.</p>
<p>This approach not only demonstrates InvAgent&apos;s high adaptability but also highlights its role in improving inventory management and reducing costs in Behpakhsh&apos;s supply chain.</p>
<sec id="sec-20"><title>Evaluation of base exploratory variables results</title>
<p>The evaluation results of base stock policies and demand-tracking policies are presented in <xref ref-type="table" rid="tab4">Table 4</xref>. These evaluations show how different inventory policies perform under various demand conditions. In the first part of the table, the performance of the base-stock policy is shown for different desired inventory levels, based on production capacity. The results indicate that maintaining a lower inventory level generally performs better under varying demand conditions. In the second part, five types of demand-tracking policies are presented, defined using various formulas including sales, lead time, and backlog. While none of these policies consistently outperform the others, averaging sales is generally effective in managing variable demand in most scenarios.</p>
</sec>
</sec>
</sec>
<sec id="sec-21"><label>3.6</label><title>Case Studies at Behpakhsh: Evaluating InvAgent Performance under Different Demand Scenarios</title>
<p>This section presents two case studies of InvAgent&apos;s performance in managing inventory in Behpakhsh&apos;s supply chain. These studies examine variable demand scenarios without a strategy and seasonal demand with a strategy. The supply chain structure in both scenarios includes four stages: retailer, wholesaler, distributor, and manufacturer, flowing from downstream to upstream.</p>
<p>Variable demand scenario: innovative performance analysis in Behpakhsh&apos;s supply chain Under variable demand, InvAgent&apos;s performance in managing demand changes, inventory, accumulation, and profit in Behpakhsh&apos;s supply chain was examined. As shown in <xref ref-type="fig" rid="fig10">Fig. 10</xref>, the model responded to demand dynamics through real-time understanding and proper timing.</p>
<sec id="sec-22"><title>Supply chain response to demand changes</title>
<p>I. At the start of the simulation, demand suddenly increases, and the retailer, as the first point of contact with customers, faces inventory depletion.</p>
<p>II. Retailer action: to meet customer demand, the retailer places new orders with the wholesaler.</p>
<p>III. Inventory stabilization: due to supply chain lead times (from manufacturer to retailer), the retailer&apos;s inventory is not immediately stabilized.</p>
<p>IV. Wholesaler and distributor actions: as intermediary links, they fulfill orders for upstream customers and replenish their inventory after receiving orders from retailers.</p>
<p>V. Manufacturer: at the top of the supply chain, manufacturers process incoming orders and convert raw materials into products.</p>
</sec>
<sec id="sec-23"><title>Inventory accumulation at the distributor</title>
<p>Midway through the simulation, inventory accumulation at the distributor reached its peak due to:</p>
<p>I. Previous inventory depletion: In period 6, the distributor&apos;s inventory is exhausted because new orders were either not placed on time or delayed by transfer lead times.</p>
<p>II. High accumulation in period 7: Newly arrived inventory in period 7 causes accumulation at the distributor.</p>
</sec>
<sec id="sec-24"><title>Lessons learned and recommendations</title>
<p>I. Lead time management: to prevent accumulation or shortages, the distributor should place orders considering supply chain lead times, stabilizing inventory flow.</p>
<p>II. Demand forecasting: accurate forecasts from InvAgent can optimize inventory provisioning across supply chain levels.</p>
<p>III. Supply chain coordination: all levels, from manufacturer to retailer, must coordinate orders to ensure timely inventory transfer.</p>
<p>Seasonal demand scenario: Inventive performance analysis at Behpakhsh Under seasonal demand, InvAgent reacts to changing demand patterns and their impact on inventory, accumulation, and profit. This scenario is designed based on different demand patterns across time periods. Fig. 11 shows how the model places orders and manages inventory.</p>
</sec>
<sec id="sec-25"><title>Demand pattern in the scenario</title>
<p>I. Periods 1–4: demand follows a uniform distribution, ranging from 0 to 4 units per period.</p>
<p>II. Periods 5–12: demand shifts to a different uniform distribution, indicating a peak period.</p>
<p>Model performance across periods 1–4: increased downstream orders I. Retailers and wholesalers anticipate increased future demand and place larger orders with the distributor. II. Distributor and manufacturer: attempt to procure large amounts from upstream suppliers, quickly depleting manufacturer inventory and increasing new orders from the distributor.</p>
<p>Period 4: accumulation and reduced manufacturer profit I. Inventory accumulation: increased order volume in period 4 significantly reduces manufacturer inventory and increases supply chain accumulation.</p>
<p>II. Profit reduction: due to inventory management costs and poor coordination, the manufacturer&apos;s profit reaches a minimum.</p>
<p>Periods 5–12: restoring balance and flexibility Order management: the manufacturer starts ordering raw materials and gradually restores inventory and orders to balance.</p>
<p>Reduced accumulation: improved order management and better supply chain coordination reduce inventory accumulation and enhance profitability .</p>
<p>Example Reason: By forecasting future demand for the next two periods (considering lead time) and noting that current inventory is sufficient to meet maximum demand for three periods, I decided not to place any orders this period to avoid excessive inventory buildup.</p>
<p>Action: [0]</p>
<p>Currently, this is the first period, and you are at stage 1 of 4 in the supply chain. Based on your current status:</p>
<p>• Lead time: 2 periods • Current inventory: 12 units • Current backlog (your debt to downstream): 0 units • Upstream backlog (upstream debt to you): 0 units • Past sales (in recent periods, from oldest to newest): [0, 0] • Incoming deliveries (in this period and subsequent periods, from near to far): [0, 0] The forecasted demand at the retailer (stage 1) is a discrete uniform distribution U {0,4} for all 12 periods. What will be your action (order quantity) for this period?</p>
<p>Golden rule of this game: Open orders should always equal “expected downstream orders + backlog.” If open orders exceed this amount, inventory will increase (once orders arrive). If open orders are less than this amount, the backlog will not decrease and may even increase. Please consider lead time and pre-place your orders. Note that your upstream stage also has its lead time, so do not wait until your inventory runs out. Also, avoid placing large orders at once. Try to spread your orders over multiple periods to prevent the bullwhip effect. Forecast future demand changes and adjust your orders accordingly to maintain stable inventory levels.</p>
<p>First, state your reasoning in 1–2 sentences, then enter your action as a non-negative number in brackets (e.g., [0])</p>
<p>Retailer Agent (via User Interface):</p>
<p>Reason: By forecasting future demand over the next two periods (considering the lead time) and noting that the current inventory is sufficient to meet maximum demand for the next three periods, I decided not to place any order this period to prevent excessive inventory accumulation.</p>
<p>Action: [0]</p>
<p>Fig .9. Example of InvAgent input and response for a constant demand scenario in the company to broadcast using GPT-4.</p>
<table-wrap id="tab4"><label>Table 4</label><caption><p>Evaluation results (average episode rewards and standard deviations) for a variety of norm-based models in different demand scenarios for broadcasting.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:14:66,628.5,537.1,746"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<table-wrap id="tab5"><label>Table 5</label><caption><p>Hyperparameters for independent neighbor policy optimization (IPPO) with parameter sharing as a basis for comparison in broadcast.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:14:66,497.6,537.1,593.4"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<table-wrap id="tab6"><label>Table 6</label><caption><p>Hyperparameters for the basic multi-agent proximal policy optimization (mappo) model.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:14:66,356.4,537.1,455.4"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<fig id="fig10"><label>Figure 10</label><caption><p>Inventory, backlog, orders, and profit under variable demand (InvAgent, no strategy).</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:14:66,114.7,537.1,454.4"/><p content-type="note">This figure is shown in the PDF version of the article.</p></fig>
</sec>
</sec>
</sec>
<sec id="sec-26"><label>4</label><title>Conclusion</title>
<p>In this study, the effectiveness of using LLMs as autonomous agents in multi-agent inventory management for optimizing the Behpaksh supply chain was investigated. Our innovative model, InvAgent, was able to make adaptive and informed decisions without the need for prior training by leveraging the zero-shot learning capabilities of LLMs. One of the outstanding features of InvAgent was its integration of structured reasoning via the CoT method, which improved the model&apos;s explainability and transparency. This feature made InvAgent a more reliable system than traditional heuristic and reinforcement learning models.</p>
<sec id="sec-27"><title>Key results</title>
<p>I. Competitive performance: Invariant demonstrated superior performance and lower costs across various demand scenarios compared to heuristic policies.</p>
<p>II. Adaptability: the model adapted to complex, unpredictable demand changes and minimized shortages. III. High potential: the use of LLMs for intelligent SCM highlighted reductions in inventory costs and improved decision-making.</p>
</sec>
<sec id="sec-28"><title>Future outlook</title>
<p>To expand the capabilities of InvAgent and improve its performance in the Behpaksh Company&apos;s supply chain, the following axes will be considered in future research:</p>
<p>I. Use of reinforcement learning: tuning the model to improve decision-making capabilities through iteration and learning optimal strategies.</p>
<p>II. Evaluation with real-world data: 1) using real supply chain data, including seasonal and variable demand patterns, to practically evaluate the model&apos;s performance, and 2) decomposing data into level, trend, and seasonal components to improve forecast accuracy.</p>
<p>III. Combining human-designed strategies with the inherent capabilities of LLMs: improving the management of complex and unpredictable demand patterns by combining these two approaches.</p>
</sec>
<sec id="sec-29"><title>Final conclusion</title>
<p>The InvAgent model demonstrated how new technologies, such as LLMs, can make Behpaksh Company&apos;s supply chain more efficient and flexible. This research is an important step towards the digitalization and intelligence of SCM and enables the use of advanced solutions to manage future challenges.</p>
<table-wrap id="tab8"><label>Table 8</label><caption><p>Ablation of InvAgent prompts in variable demand; rewards averaged over 5 trials (±SD) with % change from first result.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:15:66,147.8,537.1,281.6"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
</sec>
</sec>
<sec id="sec-30"><title>Acknowledgments</title>
<p>The authors would like to express their sincere appreciation to all individuals whose valuable comments and support contributed to the successful completion of this study.</p>
</sec>
<sec id="sec-31"><title>Funding</title>
<p>This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.</p>
</sec>
<sec id="sec-32"><title>Data Availability</title>
<p>The data supporting the findings of this study are available from the corresponding author upon reasonable request.</p>
</sec>
</body>
<back><ref-list><title>References</title>
<ref id="ref-1"><label>1</label><mixed-citation>Quan, Y., Pothen, A., &amp; Montreuil, B. (2023). Predictive demand disruption signals for supply chain networks. IISE annual conference and expo. IISE. <ext-link ext-link-type="uri" xlink:href="https://www.researchgate.net/">https://www.researchgate.net/</ext-link></mixed-citation></ref>
<ref id="ref-2"><label>2</label><mixed-citation>Abaku, E. A., Edunjobi, T. E., &amp; Odimarha, A. C. (2024). Theoretical approaches to AI in supply chain optimization: Pathways to efficiency and resilience. International journal of science and technology research archive, 6(1), 92–107. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.53771/ijstra.2024.6.1.0033">https://doi.org/10.53771/ijstra.2024.6.1.0033</ext-link></mixed-citation></ref>
<ref id="ref-3"><label>3</label><mixed-citation>Yasmin, G. (2024). Supply chain management: ensuring seamless operations. Journal of management science research review, 2(1), 55–66. <ext-link ext-link-type="uri" xlink:href="https://www.jmsrr.com/index.php/Journal/article/view/25">https://www.jmsrr.com/index.php/Journal/article/view/25</ext-link></mixed-citation></ref>
<ref id="ref-4"><label>4</label><mixed-citation>Oroojlooyjadid, A., Nazari, M., Snyder, L. V, &amp; Takáč, M. (2022). A deep q-network for the beer game: Deep reinforcement learning for inventory optimization. Manufacturing &amp; service operations management, 24(1), 285–304. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1287/msom.2020.0939">https://doi.org/10.1287/msom.2020.0939</ext-link></mixed-citation></ref>
<ref id="ref-5"><label>5</label><mixed-citation>Goodwin, J. S., &amp; Franklin, S. G. (1994). The beer distribution game: using simulation to teach systems thinking. Journal of management development, 13(8), 7–15. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1108/02621719410071937">https://doi.org/10.1108/02621719410071937</ext-link></mixed-citation></ref>
<ref id="ref-6"><label>6</label><mixed-citation>Edali, M., &amp; Yasarcan, H. (2014). A mathematical model of the beer game. Journal of artificial societies and social simulation, 17(4), 2. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.18564/jasss.2555">https://doi.org/10.18564/jasss.2555</ext-link></mixed-citation></ref>
<ref id="ref-7"><label>7</label><mixed-citation>Mousa, M., van de Berg, D., Kotecha, N., del Rio Chanona, E. A., &amp; Mowbray, M. (2024). An analysis of multi-agent reinforcement learning for decentralized inventory control systems. Computers &amp; chemical engineering, 188, 108783. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.compchemeng.2024.108783">https://doi.org/10.1016/j.compchemeng.2024.108783</ext-link></mixed-citation></ref>
<ref id="ref-8"><label>8</label><mixed-citation>Kegenbekov, Z., &amp; Jackson, I. (2021). Adaptive supply chain: Demand--supply synchronization using deep reinforcement learning. Algorithms, 14(8), 240. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/a14080240">https://doi.org/10.3390/a14080240</ext-link></mixed-citation></ref>
<ref id="ref-9"><label>9</label><mixed-citation>Hubbs, C. D., Perez, H. D., Sarwar, O., Sahinidis, N. V, Grossmann, I. E., &amp; Wassick, J. M. (2020). Or-gym: A reinforcement learning library for operations research problems. ArXiv preprint arxiv:2008.06319. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.48550/arXiv.2008.06319">https://doi.org/10.48550/arXiv.2008.06319</ext-link></mixed-citation></ref>
<ref id="ref-10"><label>10</label><mixed-citation>Wu, Q., Bansal, G., Zhang, J., Wu, Y., Li, B., Zhu, E., ... &amp; Wang, C. (2024). Autogen: Enabling next-gen LLM applications via multi-agent conversations. First conference on language modeling. 1-46. <ext-link ext-link-type="uri" xlink:href="https://openreview.net/pdf?id=BAakY1hNKS">https://openreview.net/pdf?id=BAakY1hNKS</ext-link></mixed-citation></ref>
<ref id="ref-11"><label>11</label><mixed-citation>Towers, M., Terry, J. K., Kwiatkowski, A., Balis, J. U., de Cola, G., Deleu, T., Goulão, M., Kallinteris, A., KG, A., Krimmel, M., Perez-Vicente, R., Pierré, A., Schulhoff, S., Tai, J. J., Shen, A. T. J., &amp; Younis, O. G. (2023). Gymnasium. Zenodo. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.5281/zenodo.8127025">https://doi.org/10.5281/zenodo.8127025</ext-link></mixed-citation></ref>
<ref id="ref-12"><label>12</label><mixed-citation>Liang, E., Liaw, R., Nishihara, R., Moritz, P., Fox, R., Goldberg, K., ... &amp; Stoica, I. (2018). RLlib: Abstractions for distributed reinforcement learning. In International conference on machine learning (pp. 3053-3062). PMLR. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.48550/arXiv.1712.09381">https://doi.org/10.48550/arXiv.1712.09381</ext-link></mixed-citation></ref>
<ref id="ref-13"><label>13</label><mixed-citation>Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., ... &amp; McGrew, B. (2023). Gpt-4 technical report. arXiv preprint arXiv:2303.08774. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.48550/arXiv.2303.08774">https://doi.org/10.48550/arXiv.2303.08774</ext-link></mixed-citation></ref>
</ref-list></back>
</article>