<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions-dqezzs38y" -->

---
title: Building an Agentic Warehouse Management System — Part...
description: This tutorial concludes a three-part series on building an agentic warehouse management system (WMS) using Java and Spring AI. It covers how the agent executes...
canonical: https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions-dqezzs38y
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building an Agentic Warehouse Management System — Part 3: Tools, Decisions, and Actions | daily.dev
og:description: This tutorial concludes a three-part series on building an agentic warehouse management system (WMS) using Java and Spring AI. It covers how the agent executes...
og:url: https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions-dqezzs38y
og:image: https://api.daily.dev/og/posts/DQezzS38Y.png
og:image:alt: Building an Agentic Warehouse Management System — Part 3: Tools, Decisions, and Actions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building an Agentic Warehouse Management System — Part 3: Tools, Decisions, and Actions

**[Foojay.io](https://daily.dev/sources/foojayio)** · 8 min read · 0 upvotes · 0 comments

## Summary

This tutorial concludes a three-part series on building an agentic warehouse management system (WMS) using Java and Spring AI. It covers how the agent executes tasks with capability-scoped tools, retrieves operational data (inventory, stock movements) and depositor policies via semantic search (RAG with Voyage AI embeddings and a vector store), makes a replenishment decision based on gathered context, and acts by creating replenishment requests and drafting notification emails. Code snippets show the AgentRunner loop, tool selection by capability, the decision token pattern (REPLENISHMENT_REQUIRED/NOT_REQUIRED), and how skipped tasks are handled. The piece closes with ideas for adding cross-execution memory and links to a live demo and the full MongoDB JVM Showcase source code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://foojay.io/today/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions>

## Questions this post answers

### How do you restrict which tools an AI agent can use for a specific task in Spring AI?

Tools are scoped by capability: each AgentCapability defines a list of tools, and before executing a task the runner filters the agent's capabilities to find the one matching the task's capability name, then extracts only that capability's tools and passes them to the prompt via .tools(tools). This means an ANALYSIS task cannot access tools that create a replenishment request, enforcing clear boundaries between read and write operations.

_See how developers on daily.dev track patterns for scoping tool access in agentic Java systems._

### How can an AI agent retrieve business policies stored as natural language using semantic search in a Java application?

Policies are stored as natural-language documents, converted into embeddings using a Voyage AI embedding model, and added to a vector store. During a policy-lookup task, the agent poses a question, and a similarity search retrieves the top 3 relevant policies filtered by depositor ID and knowledge type (REPLENISHMENT, INBOUND, GENERAL), giving a simple retrieval-augmented generation flow.

_Developers comparing RAG approaches for business rules can follow ongoing coverage on daily.dev._

### How does an agent decide whether to skip remaining tasks in a multi-step workflow?

The decision task's output ends with either the token REPLENISHMENT_REQUIRED or REPLENISHMENT_NOT_REQUIRED. The AgentRunner checks if the capability is the decision capability and the result contains REPLENISHMENT_NOT_REQUIRED; if so, it marks all remaining tasks (like replenishment and notification) as SKIPPED and finishes the run with a summary instead of executing further steps.

_Teams designing agent workflows can find similar orchestration patterns curated on daily.dev._

## Similar posts on daily.dev

- [Building an Agentic Warehouse Management System — Part 2: Java and Spring AI](https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-2-java-and-spring-ai-gxhonjnvr) · Foojay.io · 2 upvotes · 0 comments
- [Agentic WMS — Part 1: Where AI Agents Add Value](https://daily.dev/posts/agentic-wms-part-1-where-ai-agents-add-value-73kx1uz9g) · Foojay.io · 2 upvotes · 0 comments
- [Multi-Agent Warehouse AI Command Layer Enables Operational Excellence and Supply Chain Intelligence](https://daily.dev/posts/multi-agent-warehouse-ai-command-layer-enables-operational-excellence-and-supply-chain-intelligence-93wlhzghe) · NVIDIA Developer · 1 upvotes · 0 comments
- [Agent-as-a-Tool: A New Era of AI Orchestration](https://daily.dev/posts/agent-as-a-tool-a-new-era-of-ai-orchestration-vxph42s1s) · DEV · 2 upvotes · 0 comments
- [Building an Agent-Ready Data Warehouse: What Traditional Architectures Do Wrong](https://daily.dev/posts/building-an-agent-ready-data-warehouse-what-traditional-architectures-do-wrong-hkkilhuso) · Towards Data Science · 1 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#ai-agents](https://daily.dev/tags/ai-agents), [#mongodb](https://daily.dev/tags/mongodb), [#rag](https://daily.dev/tags/rag), [#spring-ai](https://daily.dev/tags/spring-ai)

[View this post on daily.dev](https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions-dqezzs38y)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building an Agentic Warehouse Management System — Part 3: Tools, Decisions, and Actions","url":"https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions-dqezzs38y","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions-dqezzs38y"},"datePublished":"2026-09-03T16:57:40.553Z","dateModified":"2026-09-03T18:51:29.952Z","description":"This tutorial concludes a three-part series on building an agentic warehouse management system (WMS) using Java and Spring AI. It covers how the agent executes...","image":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","thumbnailUrl":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","isAccessibleForFree":true,"articleSection":"Foojay.io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Foojay.io","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1820f6a6ae944760aa322b67ed85f848","url":"https://daily.dev/sources/foojayio"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions-dqezzs38y","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,ai-agents,mongodb,rag,spring-ai","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Foojay.io","item":"https://daily.dev/sources/foojayio"},{"@type":"ListItem","position":3,"name":"Building an Agentic Warehouse Management System — Part 3: Tools, Decisions, and Actions"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/building-an-agentic-warehouse-management-system-part-3-tools-decisions-and-actions-dqezzs38y#faq","mainEntity":[{"@type":"Question","name":"How do you restrict which tools an AI agent can use for a specific task in Spring AI?","acceptedAnswer":{"@type":"Answer","text":"Tools are scoped by capability: each AgentCapability defines a list of tools, and before executing a task the runner filters the agent's capabilities to find the one matching the task's capability name, then extracts only that capability's tools and passes them to the prompt via .tools(tools). This means an ANALYSIS task cannot access tools that create a replenishment request, enforcing clear boundaries between read and write operations. See how developers on daily.dev track patterns for scoping tool access in agentic Java systems."}},{"@type":"Question","name":"How can an AI agent retrieve business policies stored as natural language using semantic search in a Java application?","acceptedAnswer":{"@type":"Answer","text":"Policies are stored as natural-language documents, converted into embeddings using a Voyage AI embedding model, and added to a vector store. During a policy-lookup task, the agent poses a question, and a similarity search retrieves the top 3 relevant policies filtered by depositor ID and knowledge type (REPLENISHMENT, INBOUND, GENERAL), giving a simple retrieval-augmented generation flow. Developers comparing RAG approaches for business rules can follow ongoing coverage on daily.dev."}},{"@type":"Question","name":"How does an agent decide whether to skip remaining tasks in a multi-step workflow?","acceptedAnswer":{"@type":"Answer","text":"The decision task's output ends with either the token REPLENISHMENT_REQUIRED or REPLENISHMENT_NOT_REQUIRED. The AgentRunner checks if the capability is the decision capability and the result contains REPLENISHMENT_NOT_REQUIRED; if so, it marks all remaining tasks (like replenishment and notification) as SKIPPED and finishes the run with a summary instead of executing further steps. Teams designing agent workflows can find similar orchestration patterns curated on daily.dev."}}]}
```

