top of page
Search

Agent-Based AI for Warehouse Management: A Practical Human-in-the-Loop Application

  • Mar 29
  • 9 min read


Agent-based Artificial Intelligence (Agentic AI, AAI) has become a prominent focus for organizations and technology enthusiasts alike. Can tasks be delegated to autonomous agents? Which types of work can be effectively handled by such agents? And where do large language models fit within this paradigm? Should agents operate based on predefined logical rule sets, or should they be capable of autonomous decision-making? We are currently in a period where many experts are navigating these questions while re-evaluating established ways of working.

When I asked myself what I could do to contribute to a better understanding of this technology, the idea of applying an agent-based architecture to warehouse management came to mind. To explore this, I designed a use case and developed a corresponding workflow. Assuming that organizations are at a critical juncture in their technological transformation, I believe this solution can serve as a source of inspiration. Through a design that closely reflects real-world conditions, I seek to answer the question: Can this technology be effectively adapted to business operations? It is clearly a challenging question. Let me pose another difficult one:

How can Agentic AI be applied to real-world problems? How can the transition from theory to practice be achieved?Where does the human fit within this workflow—or will there be a role at all?

In this article, I address these questions through the solution I have developed, approaching it from a product-oriented design perspective. I build upon my previous work, “How Can LLM Agents Be Used in Warehouse Operations?”, and take it a step further. Using the same problem definition, I extend the scope to incorporate compliance with regulatory requirements and design a use case that operates within a human-in-the-loop framework.

With this design, I aim to provide a reference framework demonstrating how AI agents can generate solutions across industries and domains, given well-defined processes, workflows, and problem formulations, and to illustrate how such systems can be practically implemented.

From this perspective, I want to emphasize that the design I have developed is not merely a prototype but a decision support system that is implementable in real-world settings.


Before describing the structure I have designed, I am sharing the GitHub link containing all the code. You can also explore and experiment with it on your local machines.

📜 License: MIT License


Problem Statement

The problem addressed in this study is the task assignment process encountered in the warehouse operations of a retail company. The problem definition, which I have detailed in the referenced article, is as follows:

A warehouse manager struggles daily with the problem of assigning work orders to the right personnel. Consider the effort required to maintain employee satisfaction and ensure fair distribution. Each day, the manager asks themselves the following questions:

"Which operator should take which task?"

"Should I make someone work overtime, or postpone the task?"

"Should I call in an additional operator?"


Every decision has a consequence: either additional costs, incomplete task completion, or employee dissatisfaction…

I summarize below the data and information available to warehouse management.

  • A daily total of 74 work orders (shifts) must be assigned to operators.

  • 6–8 operators are on duty (some may be on leave or sick).

  • Each shift includes a specific number of items and volume (dimensional weight).

  • Workload balance must be maintained (everyone receives a fair share of tasks and carries products of similar weight, etc.).

  • Compliance with legal working hours must be monitored.

Based on this information, warehouse management manually performs hours of calculations, visually checks balances, and monitors legal limits. But can this process be automated? Can the final decision still be made by a human while leveraging the power of analytics and AI? Absolutely. With analytical capabilities, the proper deployment of Agentic AI, and a defined role for humans in the system, this problem can be effectively solved.

Assumptions of the System

To simulate a real-world warehouse environment, I made the following assumptions.

Operational Parameters:

  • Shift duration: 40 minutes (picking + packing + transport)

  • Daily working time: 435 minutes (7.25 hours of productive work, excluding breaks)

  • Maximum shifts per operator: 10 shifts/day (435 ÷ 40 ≈ 10)

Legal Compliance:


  • 0–10 shifts: COMPLIANT (within legal limits)

  • 11+ shifts: CRITICAL VIOLATION (risk under labor law; overtime required)

Test Verisi:

  • Total work orders: 74 shifts

  • Total items: 5,177 units

  • Total volume: 14,491 dimensional units

  • Operators: 8 in total (6 active, 2 on leave/sick)

Assignment Algorithm:

Option 1: Mathematical Optimization (PuLP)

  • Objective: Maximize workload balance

  • Constraints: Each task assigned to one person; shift and volume limits

Option 2: Heuristic Algorithm (Fallback)

  • Balanced round-robin distribution

  • Guaranteed solution (always works)


System Architecture Overview: Four Expert Agents

In my previous work, I solved the balanced assignment problem using two LLM agents. Now, I have expanded this to four. Each agent operates autonomously within its area of expertise, following the directives and assumptions I have defined:

  1. Workforce Agent (Labor Analysis): Analyze the status of operators and provide a summary using GPT-4.

  2. Assignment Agent (Task Allocation Engine): Assign work orders to operators.

    • Optimization (PuLP) Mathematical model

    • Heuristic Simple but guaranteed solution

  3. Compliance Agent (Regulatory Check): Verify adherence to legal limits.

    If any operator is assigned 11+ shifts:

    • NON-COMPLIANT

    • Risk: CRITICAL

Otherwise:

  • COMPLIANT

  • Risk: LOW

  1. Inventory Agent (Outcome Analysis): Analyze the assignments, visualize results, and generate a final summary using GPT-4.

    • Metrics per operator (shifts, items, volume)

    • Four different visualization

    • Excel report


System Workflow: Keeping the Human in the Loop


The key distinction of the system is that it does not make fully autonomous decisions. Instead, it involves a human at critical points.


Step 1: Automatic Summary (GPT-4): As soon as the application is launched, the Workforce Agent activates and provides a summary of the current situation using GPT-4.



As shown in the visual above, dynamic progress bars (currently at 0%—no assignments yet) and the LLM provide the warehouse manager with a summary of the current workload: “74 work orders, 5,177 items, 6 active operators…” At this stage, the manager can see the real-time status without needing to review the data in Excel.

Step 2: Initial Assignment: The manager clicks the “Start Assignment” button, activating the Assignment Agent. It first attempts to solve the problem using the optimization model. If successful, the results are adopted; if not, the system falls back to the heuristic algorithm. In either case, a solution is always guaranteed.


In a live system, any failure is unacceptable, as it would halt operations and incur costs. Therefore, the system must always provide a guaranteed solution.


The new assignment results are updated in the visual below. The progress bars now fill dynamically according to the assignments, providing a real-time view. Ultimately, it reflects that all 74 shifts have been successfully assigned to the 6 operators.


Now it’s time to verify the appropriateness of these assignments.


Step 3: Compliance Check: Once the initial assignment is complete, the Compliance Agent activates to assess adherence to the organization’s regulations and rules. After the check, the assignments are marked as “NON-COMPLIANT” because all 6 personnel have been assigned more than 11 shifts.


So what does the system do at this point? It does not make autonomous decisions. Instead, it presents options to management. This is precisely where the human is placed in the loop.

Step 4: Human-in-the-Loop (Decision Point): At this stage, as shown in the visual below, the system prompts management to make a decision to resolve the non-compliance. The options presented are: “Add an Additional Operator” or “Reduce Work Orders.” Management can choose to absorb extra cost by adding an operator to reduce the number of shifts per person, or accept that some work orders may remain unassigned while maintaining compliance with the available personnel.


The system waits for a decision. Once the choice is made, it runs again. Why is this important? Because some decisions cannot be made purely with numbers.

“Which customer has priority?”

“How sensitive is cost?”

“What are the expected demands for next week?”

and many others influence the decision. Management, based on experience and operational knowledge, is best positioned to make the optimal choice. AI may not fully make this judgment, but it can ask the right questions.


Step 5: Decision Implementation: Suppose the manager chooses the “Add Additional Operator” scenario. The system activates one inactive operator, and the Assignment Agent reruns, assigning all 74 work orders across 7 operators.



In the visual above, the progress bars clearly show that all work orders have been assigned and all items have been picked. However, the compliance-checking agent reports four violations, indicating that four operators have been assigned 11 shifts (as shown in the visual below).



In the visual below, the summary provided by the LLM clearly alerts management to the existing risk, leaving the decision in human hands. In this scenario, the manager makes a new decision accordingly.



This time, warehouse management chooses the “Reduce Work Orders” scenario. The system calculates the maximum compliant assignment. Knowing that each operator can take a maximum of 10 shifts, it assigns a total of 60 shifts. The Assignment Agent assigns only these 60 work orders, and the remaining 14 are postponed. The results can be read dynamically from the progress bars in the visual below: 81% of the work orders are assigned, and 77% of the items will be picked…


The compliance-checking agent also confirms that the assignments are now compliant.



Step 6: Final Results: The assignments are finalized, and compliance has been verified—no issues remain. The process now moves to the Inventory Agent, which provides the warehouse management with an LLM-generated summary of the completed assignments:

60 work orders have been assigned to 6 operators, and 14 work orders have been postponed. All operators received 10 shifts, ensuring legal compliance. A total of 3,997 items will be picked.

It presents a summary table of the assignments (shown in the visual below), providing management with data for analysis, including the number of shifts per operator, as well as total items and volume.



It doesn’t just present the data in a table; as shown in the visuals below, it also provides visualizations. Warehouse management can review these operator-level insights and make decisions based on the real-time status of operations. Additionally, the system offers the option to download the assignments in Excel format, allowing them to intervene as needed. In this way, the human remains actively in the loop.




Why This Approach Matters?

With this system design, complexity is simplified. Tasks that would normally be handled manually by warehouse management, such as:

2 hours of manual Excel calculations, worrying about whether assignments are balanced, and checking legal limits by hand are now safely handled by the system, requiring only management’s approval.
This system completes the summary, assignment, and compliance checks in just 30 seconds, dynamically updates progress bars in real time, performs automatic compliance verification, and visualizes the results. It empowers the human operator. The system does not tell you “what to do”; instead, it presents options: “Option A or B—your choice.

In other words, it simply provides the opportunity to assess the real-time situation as shown below:


Agentic AI: “There are 74 work orders, but 6 operators are not enough. Two options: A) Add 1 operator (500 TL) or B) Postpone 14 work orders (0 TL). Which do you choose?”


Manager: “Tomorrow is Black Friday; I don’t want to lose customers. Option A.”


Agentic AI: “Understood. Additional operator is being assigned…”


I believe this system demonstrates its practical applicability in the logistics sector. I also consider it scalable and industry-independent. Therefore, many of my colleagues working in different sectors could adapt it to their own problems and systems. A few examples include:


  • In manufacturing: shift assignment and resource planning

  • In healthcare: bed allocation and staff assignment…


Conclusion

In the system designed for this study, four expert agents worked autonomously within their areas of expertise to solve a complex warehouse management problem. The Workforce Agent analyzed the workload, the Assignment Agent performed balanced task allocation, the Compliance Agent monitored legal compliance, and the Inventory Agent visualized the results. But the most critical point is:

The system never made decisions on its own. The human remained at the center of the loop.

Let’s not forget: the system provides answers, but who asks the right questions? The human. Who chooses which answer to act on? Again, the human. Technology is a tool; strategy, priorities, and risk assessment are still determined by people. This work may seem simple, but what it demonstrates is far from simple:

With well-defined processes, workflows, and problem-solving, AI agents can be applied across any domain or industry

Industry doesn’t matter, be it manufacturing, healthcare, finance, or logistics… The formula for success is always the same: clarify the process, define the constraints, specialize the agents, leave the decision to humans, and explain the outcome. Agentic AI isn’t a “hype”; it’s a real paradigm shift and the key to technological transformation.


After reading this, ask yourself:

  • “Which processes in my field could be solved with agents?”

  • “At which points should I keep humans in the loop?”


Once you find the answers, you’ll have discovered the true power of agentic AI.


Dr. Şükrü İmre


Notes:


About AI Assistance:


The code used in this project was developed in collaboration with Claude AI (Anthropic). The system design, architecture, and workflow were defined by me, while the coding was carried out by Claude AI following detailed instructions I provided. All code has been tested and verified.


Links:



 
 
© 2026 Şükrü Orcun İmre. All rights reserved.
bottom of page