Manufacturing & Supply Chain Templates
Four templates for the physical economy: production scheduling, quality, maintenance, and warehouse operations.
create-leafmesh my-project --template production-planning # or:
create-leafmesh my-project --template quality-yield
create-leafmesh my-project --template predictive-maintenance
create-leafmesh my-project --template warehouse-supply-chainproduction-planning — Demand → Released Schedule
14 agents · 2 crons
| Agent | Type | Role |
|---|---|---|
demand_sensor_agent | LLM | Forecast + actuals → planning-ready demand picture |
capacity_model_agent | Programmatic | Line / shift / equipment capacity for the window |
scheduler_agent | LLM | Re-optimises the production sequence |
constraint_flagger_agent | Programmatic | Unresolvable shortages, deadline misses, safety-stock breaches → planner |
release_agent | Programmatic | Clean schedules auto-release to MES |
rolling_reopt_orchestrator_agent | Programmatic | Every 4 hours — scheduled re-optimisation |
material_requirements_agent | Programmatic | Demand × bill-of-materials → raw-material shortages |
supplier_signal_agent | LLM | Supplier delay/quality signals → schedule adjustment *before the floor feels it* |
planning_analytics_agent | Programmatic | Planning analyst — per-shift OEE / availability / performance / quality tracking plus the weekly forecast backtest (error stats → model recommendations) |
capacity_what_if_agent | LLM | Scenario simulator: add a shift? lose a line? demand +30%? |
planner / plant_manager / ops_director | Human | Conflict decisions → safety/quality tier → strategic |
planning_audit_logger_agent | External | Immutable log of every release and intervention |
How it works. Every 4 hours — or on any demand, capacity, or supplier event — the schedule re-optimises. Clean re-optimisations release to MES with no human touch; conflicts stop at the planner. Two intelligence loops surround the core: the what-if simulator answers planning questions in minutes instead of spreadsheet-days, and the planning analyst's weekly backtest keeps the demand model honest.
Value. Planners spend loaded hours rebuilding schedules every disruption — and disruptions are constant. Auto-releasing routine re-plans returns those hours; flagging supplier slips pre-impact converts firefights into adjustments.
quality-yield — Inspection → CAPA → Release
10 agents · 1 cron
| Agent | Type | Role |
|---|---|---|
inspection_intake_agent | LLM | Inspection intake — vision / SPC / complaint signals → canonical QA event, with defect class + severity classified on arrival |
quality_engineer_agent | LLM | Quality engineer — correlates the defect to root cause (process / supplier / batch), then drafts the CAPA |
corrective_action_tracker_agent | Programmatic | CAPA register: open / update / effectiveness verification |
spc_monitor_agent | Programmatic | Daily cron — 3-sigma excursions plus X-bar/R charts with Western Electric out-of-control rules |
recall_traceability_agent | LLM | Recall & traceability officer — traces complaints/audits to batch/line/shift, and coordinates recalls: regulator routing by product class (FDA/NHTSA/CPSC/EU), filing deadlines, related-batch freeze, exec escalation |
regulatory_compliance_agent | LLM | Per-framework audit readiness (21 CFR 11, ISO 13485, EU MDR, GMP, ISO 22000): evidence present / missing / stale |
qa_inspector / qa_manager / plant_engineer | Human | Verification → batch-release authority → process-side root cause |
qa_audit_logger_agent | External | Immutable log — every batch decision and CAPA |
How it works. Any inspection signal arrives classified → the quality engineer runs root cause and drafts the CAPA, with the human chain sized to severity. Safety-critical defects take the hard path: quarantine is forced, and if units are in the market, the recall officer computes which regulators, by when, and which sibling batches freeze. Proactively, the audit-readiness agent inventories your evidence before the auditor does.
Value. Scrap and rework burn material and labour; a botched recall burns the company. The mesh catches defects in-line at machine speed, makes every batch decision audit-proof by construction, and turns recall response from panic into a checklist with deadlines.
predictive-maintenance — Sense → Predict → Repair
11 agents · 2 crons
| Agent | Type | Role |
|---|---|---|
condition_sensor_agent | Programmatic | Vibration / temperature / pressure / current aggregation |
failure_predictor_agent | LLM | Remaining useful life + failure mode + safety-critical flag |
work_order_scheduler_agent | Programmatic | Work-order scheduler — picks the maintenance window + work-order type, confirms parts availability (lead-time longer than remaining life → engineer), and dispatches the technician |
maintenance_records_agent | Programmatic | Maintenance records analyst — work-order ledger (MTBF, downtime), PM-compliance tracking vs target, and the daily repeat-unscheduled-work sweep → reliability engineer |
spare_parts_forecaster_agent | LLM | Weekly cron — parts demand from failure trends → procurement |
equipment_lifecycle_agent | LLM | Age vs design life + cost-to-keep vs replace → continue / overhaul / replace (capex gate) |
safety_incident_reporter_agent | LLM | OSHA severity classification + filing windows (8h serious / 7-day recordable) |
technician / reliability_engineer / ops_manager | Human | Repair → shutdown authority → production-impact tier |
maint_audit_logger_agent | External | Immutable audit |
How it works. Sensors stream → anomalies trigger remaining-useful-life prediction → the scheduler books the right window, confirms parts (the killer check: parts lead-time vs predicted failure time), and dispatches the technician in one role. Chronic offenders surface via the records analyst's daily recurrence sweep; the lifecycle agent eventually answers the real question — stop fixing this and replace it — with cost math attached.
Value. Unplanned downtime costs 5–10× planned maintenance. Predicting failure is only half the job — the mesh also wins the race between part lead-time and failure time, and knows when an asset's repair bill argues for capital replacement instead.
warehouse-supply-chain — Order → Ship
16 agents · 2 crons
| Agent | Type | Role |
|---|---|---|
allocation_agent | Programmatic | Pick path, batching, priority — with the travel-minimised pick route computed in the same pass |
inventory_agent | Programmatic | Stock confirm + reserve |
exception_agent | LLM | Short-pick / damage / wrong-item / safety → supervisor |
carrier_selector_agent | Programmatic | Cheapest carrier meeting SLA; outage failover |
returns_handler_agent | Programmatic | Inspect → restock or dispose |
inventory_control_agent | Programmatic | Inventory controller — nightly cycle counts, count ingest, physical-vs-system reconciliation, systematic-shrink zone detection |
replenishment_planner_agent | Programmatic | Reorder points + recommendations |
supplier_relations_agent | LLM | Supplier relationship manager — onboarding gates (KYC + tax + banking + insurance + ESG), alternate sourcing with ESG floor and lead-time × reliability ranking, and quarterly scorecards |
ops_supervisor / warehouse_manager | Human | Floor + safety decisions → procurement |
warehouse_audit_logger_agent | External | Immutable log — every pick, pack, ship |
How it works. Order → allocate (route included) → reserve → pick → pack → ship, with the exception agent watching every step; anything abnormal — damage, safety — goes to the human supervisor instantly. The inbound side mirrors it: the supplier relationship manager owns onboarding, sourcing, and scorecards to keep the supply base healthy; nightly cycle counts keep system inventory truthful.
Value. The agent layer pays: carrier optimisation alone typically recovers 5–15% of freight, and systematic-shrink detection finds losses cycle counts only average away.