What you need
Data sources
- ERP system (SAP, Oracle, or similar) — Work order headers with planned costs, posted cost transactions (labor, material, overhead), and BOM details
- General ledger — Cost center postings for overhead allocation validation
Knowledge spaces
- Cost accounting procedures — Upload your standard costing methodology and variance investigation guidelines
- Work order templates — Reference documents for standard cost structures by product type
| Component | Name | Definition |
|---|---|---|
| Object | Work Order | Maps to the ERP work order header table. Represents a single production order with planned and actual costs |
| Object | Cost Transaction | Maps to posted cost line items. Represents individual labor, material, or overhead charges against a work order |
| Metric | Cost Variance | Actual total cost minus estimated total cost, expressed in currency and as a percentage |
| Metric | Variance by Category | Cost variance broken down by labor, material, and overhead components |
| Dimension | Product Type | Categorizes work orders by finished good type (assembly, fabrication, packaging) |
| Dimension | Cost Center | Groups transactions by the responsible department or production area |
Agent setup
Create the agent
Go to Agent Space > New agent.
| Field | Value |
|---|---|
| Name | Production Cost Monitor |
| Role | Production order analyst |
| Goal | Surface cost overruns and variance issues before they escalate |
Set the description
You are a production cost analyst. Monitor work orders and flag any where actual costs deviate significantly from estimates. Lead with the numbers — show the variance first, then explain the likely cause. Use direct, factual language. When a variance exceeds 10%, always recommend a specific next step (review labor entries, check material pricing, audit overhead allocation). Do not speculate about root causes you cannot verify from the data.
Scope data access
Grant access to:
- ERP system data source (work order and cost transaction tables)
- General ledger data source (cost center postings)
- Cost accounting procedures knowledge space
- Work Order and Cost Transaction objects in the semantic layer
Add skills
Calculate work order variance
Calculate work order variance
Trigger: User asks about production cost variance or work order costs
- Identify the work order number from the user’s request.
- Pull the estimated cost from the work order header, including planned labor, planned materials, and planned overhead.
- Pull the actual cost by summing all posted transactions against the work order.
- Calculate the total variance as actual cost minus estimated cost.
- Break the variance into labor, material, and overhead categories.
- If the total variance exceeds 10%, flag it and list the top three contributing line items.
- Present results in a table with estimated, actual, and variance columns for each cost category.
Compare work orders by product type
Compare work orders by product type
Trigger: User asks to compare costs across work orders or product types
- Identify the product type or date range from the user’s request.
- Pull all completed work orders matching the criteria.
- Calculate the average cost variance percentage for each product type.
- Rank product types from highest to lowest average variance.
- Highlight any product type with an average variance above 5%.
- Present a summary table with order count, average estimated cost, average actual cost, and average variance.
Automation
Playbook: Daily cost variance alert
Set the trigger
Schedule the playbook to run every weekday at 6:00 AM, before the morning production meeting.
Build the workflow
The playbook queries all work orders with transactions posted in the last 24 hours, calculates the variance for each, and filters for any exceeding the 10% threshold.
- Query step — Pull all work orders with new cost postings since yesterday.
- Python code step — Calculate variance percentage for each work order and categorize by labor, material, and overhead.
- Condition step — Filter to only work orders where total variance exceeds 10%.
- Format step — Build a summary table with work order number, product, estimated cost, actual cost, variance amount, and variance percentage.
The Python code step uses a Python code block to compute variance percentages and categorize overruns by cost type. You can customize the threshold (default 10%) and add additional calculations like rolling averages.
Configure delivery
Send the report via email to the production manager and cost accounting team. Include the summary table and a count of flagged work orders in the subject line.
What’s next
Shift performance reporting
Automate OEE calculations and downtime tracking at the end of every shift.
All manufacturing use cases
See the full list.

