Rank Bins -> Count -> Compare -> Explain Variance -> Post Adjustment

Cycle-Count Prioritiser and Variance Explainer

This agent ranks which bins and items to count next by stock value and error risk, instead of working through a flat calendar. When a count throws a variance, it reads the transaction trail and suggests the likely cause in plain words. It recommends and explains; your team decides what to count and which adjustment to post.

The Problem

The count calendar said aisle 4. The costly error was three aisles over.

A counter works the calendar bin by bin, spending the morning on low-value packaging while a high-turnover raw material with a shaky transaction history goes uncounted for another month. When a variance does turn up, it lands as a bare number with no clue why. The team either posts the adjustment blind or spends an hour tracing the trail by hand.

What Changes

Count by value and risk, and get a reason for every variance

The agent ranks items by stock value, movement frequency, and count and adjustment history, so the bins most likely to hide a costly error rise to the top. When a variance appears, it reads the transaction trail and names a likely cause, a unit-of-measure error, a wrong bin, or a batch mix. It also flags dead stock that has not moved. Your team picks the list and posts the adjustments.

Humans stay in control: the agent ranks the count list and suggests a cause for each variance, but your inventory controller decides what to count and which adjustment to post.

HOW THE AGENT WORKS

TRIGGERLLMAPIDECISIONACTIONWAIT
TRIGGERCount cycle dueFires on the count schedule or when a controller asks for the next list.
APIPull stock and movement dataReads stock value, movement frequency, and count and adjustment history.
LLMRank by value and riskScores each item and orders the count list by likely error and value at stake.
APIRead variance resultsTakes back the counted figures and compares them to system stock.
DECISIONVariance found?
LLMExplain likely causeReads the transaction trail and names the probable cause of each variance.
ACTIONSend list and explanationsDelivers the ranked count list and variance reasons to the controller.
The agent does not post adjustments or change stock records. Your inventory controller does. The agent removes the flat calendar and the manual trace behind each variance.

HOW TO BUILD IT

Three levels of depth. Pick the one that matches where you are.

For the ops person who needs to understand what's involved and brief their team.

ERP Stock and Movement DataValue, movements, count and adjustment history
The AgentWorkflow engine + LLM
Inventory ControllerRanked count list and variance reasons

WHAT YOUR TEAM PROVIDES ONCE

  • Stock value export - quantity and value per item and bin
  • Movement frequency - how often each item moves in and out
  • Count and adjustment history - past counts and the corrections posted
  • Transaction trail - the movement log the agent reads to explain a variance
  • Notification channel - where the ranked list and explanations reach the controller
What happens day-to-day: when a count cycle is due, the agent posts a ranked list of the bins most worth counting. After counting, it reads each variance against the transaction trail and suggests why it happened, so the controller decides the adjustment with a reason in hand.

For the IT person or technical lead who needs to scope the integration.

INQUIRY SOURCES

ERP or warehouse stock export with quantity and value per item and bin
Movement history giving frequency and the transaction trail
Count and adjustment history from past cycles

WORKFLOW ENGINE (N8N)

Count cycle due
Fetch stock and movement data
Rank items by value and risk
Read counted variance results
Route items with a variance
Explain likely variance cause
Send list and explanations

CONNECTS TO

ERP inventory (SAP / Oracle / Microsoft Dynamics)Read: stock value, quantities, adjustment history. Write: none
Warehouse management (SAP EWM / Manhattan / Blue Yonder)Read: movements, transaction trail, bin data. Write: none
Count entry (barcode app / spreadsheet import)Read: counted quantities. Write: none
Notification (Slack / Microsoft Teams / Email)Read: none. Write: ranked count list and variance explanations
WITHOUT PMS API

Without API access, the team shares a stock and movement export and enters counts in a sheet the agent reads. It still ranks and explains, but the list and the variance reasons are only as current as the last export.

WITH PMS API

With API access to the ERP and warehouse, the agent reads stock value, movements, and the transaction trail directly, ranks the list, and pulls the trail behind a variance in seconds. Counters get a live list and controllers get an instant reason. Best experience.

For the person who wants to build this agent step by step. Each node below maps to an n8n workflow node.

TRIGGERNode 1
Schedule Trigger - fires the count cycle
Set a Cron node for the start of each count cycle, or trigger on demand.
Output: A trigger event marking the cycle.
APINode 2
HTTP Request - pull stock and movements
GET items with value, movement frequency, and count and adjustment history.
Output: A JSON array of items with stock and history.
LLMNode 3
LLM - rank by value and risk
Send the items with value, movement, and past adjustment counts.
Output: A ranked count list with a risk reason per item.
You prioritise cycle counts for a chemical warehouse. For each item in {items}, use stock value, movement frequency, and the number of past adjustments to score how worth counting it is, highest first. Give a short reason per item. Respond ONLY with valid JSON. No explanation.
INPUT
{"items":[{"item":"Solvent X","value":42000,"movements_per_month":120,"past_adjustments":4},{"item":"Pallet wrap","value":600,"movements_per_month":10,"past_adjustments":0}]}
OUTPUT
{"ranked":[{"item":"Solvent X","score":95,"reason":"High value and heavy movement with four prior adjustments."},{"item":"Pallet wrap","score":12,"reason":"Low value, little movement, clean history."}]}
APINode 4
HTTP Request - read counted results
Take counted quantities back and compare them to system stock.
Output: A list of items with any variance.
LLMNode 5
LLM - explain the variance
Send each variance with the item's recent transaction trail.
Output: A likely cause per variance.
You explain a stock count variance for a chemical warehouse. Given the item {item}, the system quantity {system_qty}, the counted quantity {counted_qty}, and the recent transaction trail {trail}, suggest the single most likely cause: unit-of-measure error, wrong bin, batch mix, or unexplained. Respond ONLY with valid JSON. No explanation.
INPUT
{"item":"Solvent X","system_qty":1000,"counted_qty":100,"trail":[{"type":"receipt","qty":900,"note":"entered in L, item is kg"}]}
OUTPUT
{"likely_cause":"unit-of-measure error","detail":"A 900 receipt was entered in litres against a kilogram item, inflating system stock roughly tenfold.","confidence":"high"}
ACTIONNode 6
Send - post list and reasons
Format the ranked list and the variance explanations and post them.
Output: A delivered message for the controller.
MVP vs Advanced — Where To Start
MVP — START HERE
  • Start with one stock and movement export.
  • Rank items by value and movement with a simple score.
  • Post the top bins to count to one channel.
  • Enter counts in a sheet the agent can read.
  • Explain any variance from the recent transaction trail.
  • Check one explanation against a variance you already understand.
ADVANCED — ADD LATER
  • Pull stock, movements, and the trail live from the ERP and WMS.
  • Feed counted results back automatically to trigger explanations.
  • Add dead-stock flags for items with no movement in a set period.
  • =+ Weight the ranking with a per-item error rate learned from past adjustments.
  • Group variances by cause to spot a recurring unit-of-measure problem.
  • =+ Add a suggested adjustment value for each variance, for the controller to approve.

Full Video Walkthrough Coming Soon

Watch the agent rank a count list by risk and explain a variance from the transaction trail.

Register to be notified

Everything on this page is free to learn.

When you're ready to build — do it yourself or bring us in.

OTHER AGENTS IN LEASING & MARKETING

Daily list of batches nearing retest or expiry, in FEFO order
Checks a material against its bin neighbours before put-away confirms
Checks gate weights against the PO before goods receipt posts

Frequently asked questions

Cycle-Count Prioritiser and Variance Explainer is an AI agent that ranks what to count by value and error risk, explains each variance.
The count calendar said aisle 4. The costly error was three aisles over. The Cycle-Count Prioritiser and Variance Explainer addresses this: ranks what to count by value and error risk, explains each variance.
No. Your team stays in control. The agent does not post adjustments or change stock records. Your inventory controller does. The agent removes the flat calendar and the manual trace behind each variance.