Pull Variance -> Join Yield & BOM -> Explain -> Flag Repeats -> Analyst Reviews
Batch Cost Variance Explainer
This agent takes the price, usage, yield, and lot-size variance splits from your costing system and writes a plain-language story of why a batch cost more than standard. It ties the numbers to the batch event and the bill of materials so the reason is clear without hours of cross-referencing. It also tracks which products keep over-consuming so the pattern gets attention.
The Problem
The variance report said usage was up. It did not say why.
The costing system split the batch variance into price, usage, yield, and lot size, and left it there. The analyst spent the afternoon cross-referencing the batch yield, the bill of materials, and the purchase price history just to learn that the yield ran low and solvent had gone up. Multiply that by every off-standard batch in the month and the explanation never gets done. The recurring over-consumers hide in the noise.
What Changes
Say why the batch cost more, in one paragraph, per batch.
The agent reads the variance splits alongside the batch yield, the bill of materials, and the purchase price history, and writes a short narrative with the numbers, for example yield four points below standard and solvent price up nine percent. It ties each variance to the batch event so the analyst starts from an explanation, not a spreadsheet. It also surfaces products that over-consume month after month.
Humans stay in control: the agent writes the explanation and flags the repeat offenders, but your cost analyst confirms the story and decides whether a standard or a process needs to change.
HOW THE AGENT WORKS
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.
WHAT YOUR TEAM PROVIDES ONCE
- Variance narrative - a plain paragraph per off-standard batch
- The numbers - yield points and price moves, named
- Batch tie-in - the variance linked to the batch event
- Repeat offenders - products that over-consume month after month
- Trend view - how a product's variance moves over time
For the IT person or technical lead who needs to scope the integration.
INQUIRY SOURCES
WORKFLOW ENGINE (N8N)
CONNECTS TO
Without API access, finance exports the variance, yield, and price files to CSV. The agent still writes the narratives and ranks offenders, but the join is only as fresh as the last export and some steps stay manual.
With API access to the costing, MES, and purchasing data, the agent explains every batch the day the export closes and keeps the offender trend current. Best experience.
For the person who wants to build this agent step by step. Each node below maps to an n8n workflow node.
You are a cost variance analyst assistant. Given the variance splits, batch yield, bill of materials, and purchase price history below, write a one-paragraph plain-language explanation of why the batch cost more than standard, naming the numbers, and state whether this product is a recurring over-consumer. Variance: {variance}. Yield: {batch_yield}. BOM: {bom}. Prices: {prices}. History: {history}. Respond ONLY with valid JSON. No explanation.{"variance": {"price": 900, "usage": 300, "yield": 1200, "lot_size": 100}, "batch_yield": {"actual": 88, "standard": 92}, "bom": [{"material": "solvent", "share": 0.6}], "prices": {"solvent_change_pct": 9}, "history": {"solvent_over_months": 4}}{"batch_id": "B-2207", "narrative": "This batch ran 2500 over standard, driven mostly by yield. Actual yield was 88 versus a standard of 92, four points low, which added 1200. Solvent price rose 9 percent, adding 900 on the price bucket. Usage and lot size were minor.", "primary_driver": "yield", "numbers": {"yield_gap_points": 4, "solvent_price_up_pct": 9}, "recurring_offender": true, "recurring_note": "solvent has over-consumed on this product for 4 straight months"}- Start with one product family and a single variance export
- Join batch yield and the bill of materials by batch id
- Write one narrative per off-standard batch with the numbers
- Send the batch stories to the analyst in one report
- Have the analyst confirm each story before anything is acted on
- Track over-consuming products in a simple running list
- =+ Connect costing, MES, and purchasing by API for close-day explanations
- =+ Add purchase price trends to separate market moves from usage
- =+ Rank recurring offenders by total cost impact across periods
- =+ Tie each variance to the batch record event for a direct link
- =+ Draft a standard-review note for the analyst when a product drifts
- =+ Feed confirmed narratives into a Power BI trend for the costing team
Full Video Walkthrough Coming Soon
Watch the agent explain a batch overrun in one paragraph and flag a product that over-consumes every month.
Register to be notifiedEverything 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
Frequently asked questions
This is 1 of 1 agents in Finance & Costing. → · Explore all 15 departments →