Factory Operations Shift Copilot
Outcome
Give a shift supervisor a single grounded view of the running shift by fusing MES production events, downtime reasons, quality alerts, and handover notes into prioritized actions and an auto-drafted handover the supervisor signs.
| Portfolio attribute | Value |
|---|---|
| Primary persona | Shift supervisor |
| Primary aggregate | ProductionShift |
| Cosmos DB containers | 1 |
| Grounding data | MES events, downtime, alerts, shift notes |
| Development estimate | USD 60-220 monthly dev estimate |
| Runtime options | Python FastAPI and C# ASP.NET Core |
Productivity hypothesis
These measures reflect the workflow, evidence, decision boundary, and industry risk for this use case.
| Impact type | Measure | Conservative internal assumption | Customer measurement |
|---|---|---|---|
| Productivity | Handover or recovery cycle time | 8-15% reduction | (baseline median handover or recovery minutes - assisted median minutes) / baseline median minutes * 100 |
| Quality or risk | Evidence discovery time | 10-20% reduction | (baseline median evidence-search minutes - assisted median evidence-search minutes) / baseline median evidence-search minutes * 100 |
| Business outcome | On-time recovery or schedule attainment | 3-8% relative improvement | (assisted on-time shifts per eligible shift - baseline rate) / baseline rate * 100 |
Important: Conservative internal pilot assumptions only; not public benchmarks, commitments, or expected customer results. Validate against a comparable baseline or matched control cohort with mandatory human review.
Rationale: MES, PLC, ERP, QMS, and CMMS reconciliation supports faster shift decisions and a cautiously measurable recovery outcome.
Pilot guardrail: Do not bypass supervisor sign-off, safety controls, or source-system authority.
Customer validation plan
- Baseline the current workflow with representative users and tasks.
- Run the accelerator on the same task mix with human review retained.
- Measure handover or recovery cycle time and evidence discovery time with the documented formulas.
- Replace internal assumptions with customer-observed results before a business case.
Why Azure Cosmos DB
This AI solution needs an operational data plane, not only a vector index:
- Hybrid vector and full-text retrieval combines semantic recall with exact identifiers, codes, names, and domain language.
- Hierarchical partition keys and metadata predicates keep tenant and domain boundaries in the normal query path.
- Operational JSON, source chunks, workflow and agent state, feedback, and audit records remain together for low-latency reads and governed writes.
- Change feed reacts to source and operational updates without polling.
- Autoscale throughput, configurable consistency, and multi-region distribution support variable demand and enterprise availability.
Domain workflow

| Stage | Actor | Input → output | Approval |
|---|---|---|---|
| 1. Open the shift and load the plan | Shift supervisor | Shift schedule, crew roster, and order sequence → ProductionShift with targets and constraints | Policy controlled |
| 2. Stream production and downtime events | MES integration service | Machine counts, stoppages, and reason codes → Live output and downtime event stream | Policy controlled |
| 3. Rank losses and quality risks | Analytics agent | Downtime minutes, scrap, and quality alerts → Prioritized loss list with probable causes | Policy controlled |
| 4. Recommend the next line actions | Shift copilot | Loss ranking, order due times, crew availability → Cited action list such as changeover resequencing | Policy controlled |
| 5. Sign the shift handover | Shift supervisor | Drafted handover with open issues and commitments → Signed ShiftHandoverNote passed to the next crew | Human required |
Technical architecture

Cosmos DB data model
| Container | Hierarchical partition key | Documents | Search paths |
|---|---|---|---|
productionShifts | /tenantId, /plantLineId | ProductionShift, DowntimeEvent, ProductionOrderStatus, QualityAlert, ShiftHandoverNote | /operatorCommentVectorEmbedding, /narrativeVectorEmbedding, /operatorCommentVector, /narrativeVector |
Query contract
| Query | Container | Scope | Purpose |
|---|---|---|---|
| Live shift dashboard | productionShifts | single-partition | Read shift state, orders, downtime, and alerts for the line in one partition query. |
| Top downtime reasons this shift | productionShifts | single-partition | Rank stoppage reason codes by lost minutes to focus the crew. |
| Orders at risk of missing due time | productionShifts | single-partition | Flag orders whose remaining quantity cannot finish before the due time at current rate. |
| Undispositioned quality alerts | productionShifts | single-partition | List open quality alerts that must be resolved before handover. |
Python and C# services route each document type to its declared container and hierarchical partition key. ETag-based writes protect mutable aggregates, while append-only records and bounded cross-partition queries preserve scale.
Azure deployment

Clone the source repository, authenticate with Azure, and run:
Set-Location accelerators/manufacturing/factory-operations-shift-copilot
az login
./Deploy.ps1 -Runtime python -Location eastus2
Change python to csharp to deploy the .NET implementation.
Explore the implementation
- Launch signed-in demo
- Implementation article
- Domain data model
- Workflow and API contract
- Python application
- C# application
- Domain container Bicep
- Platform Bicep
- Cost and configuration
- Source repository