> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wayak.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Maintenance scheduling

> Monitor equipment service dates, flag overdue maintenance, and alert teams before failures occur

Unplanned downtime is one of the most expensive problems in manufacturing. A single critical equipment failure can shut down a production line for hours or days. Most plants track maintenance schedules in a CMMS, but the data often sits there until someone remembers to check it. By then, the equipment is already overdue — or already broken.

This use case connects your CMMS data to a Wayak agent that answers maintenance questions on demand and a daily playbook that scans for overdue items and sends alerts sorted by criticality. Critical equipment overdue by more than 7 days triggers an urgent Slack notification so nothing falls through the cracks.

***

## What you need

<CardGroup cols={2}>
  <Card title="Data sources" icon="database">
    * **CMMS (Computerized Maintenance Management System)** — Equipment master records, scheduled maintenance dates, work order history, and criticality ratings
    * **Production database** — Equipment runtime hours for condition-based maintenance tracking
  </Card>

  <Card title="Knowledge spaces" icon="book-open">
    * **Equipment maintenance guides** — Upload manufacturer maintenance manuals and recommended service intervals
    * **Safety checklists** — Lockout/tagout procedures and safety protocols for each equipment class
  </Card>
</CardGroup>

**Semantic layer:** Define these in your ontology before setting up the agent.

| Component | Name             | Definition                                                                                            |
| --------- | ---------------- | ----------------------------------------------------------------------------------------------------- |
| Object    | Equipment        | Maps to the CMMS equipment master. Represents a single asset with type, location, and criticality     |
| Object    | Maintenance Task | Maps to scheduled maintenance records. Represents a planned service activity with due date and status |
| Metric    | Days Overdue     | Current date minus scheduled service date, for tasks that have not been completed                     |
| Metric    | MTBF             | Mean time between failures, calculated from historical work order completion dates                    |
| Dimension | Criticality      | Classifies equipment as critical, important, or standard based on production impact                   |
| Dimension | Equipment Type   | Groups assets by class (CNC, press, conveyor, HVAC, electrical)                                       |

<Tip>
  See [building a semantic layer](/quickstart/build-semantic-layer) for a step-by-step guide.
</Tip>

***

## Agent setup

<Steps>
  <Step title="Create the agent">
    Go to **Agent Space** > **New agent**.

    | Field    | Value                                                                                     |
    | -------- | ----------------------------------------------------------------------------------------- |
    | **Name** | Maintenance Monitor                                                                       |
    | **Role** | Equipment maintenance analyst                                                             |
    | **Goal** | Prevent unplanned downtime by tracking maintenance schedules and flagging overdue service |
  </Step>

  <Step title="Set the description">
    > You are an equipment maintenance analyst. When asked about maintenance status, always sort overdue items by criticality first, then by days overdue. Include the equipment name, last service date, days overdue, and criticality rating for each item. For critical equipment that is more than 7 days overdue, clearly mark it as urgent. Reference the manufacturer's recommended service interval from the knowledge space when available. Use direct language and always recommend a specific action: schedule the service, escalate to the maintenance supervisor, or order parts.
  </Step>

  <Step title="Scope data access">
    Grant access to:

    * CMMS data source (equipment master and maintenance task tables)
    * Production database data source (runtime hours)
    * Equipment maintenance guides knowledge space
    * Safety checklists knowledge space
    * Equipment and Maintenance Task objects in the semantic layer
  </Step>

  <Step title="Add skills">
    <AccordionGroup>
      <Accordion title="Flag overdue maintenance">
        **Trigger:** User asks about overdue maintenance or equipment status

        1. Query the maintenance schedule for all equipment with upcoming or past-due service dates.
        2. Identify any items where the scheduled service date has passed without a completed work order.
        3. Calculate days overdue for each item.
        4. Sort by days overdue, highest first, with critical equipment at the top.
        5. For each overdue item, include equipment name, last service date, days overdue, criticality rating, and recommended service type.
        6. If any critical equipment is more than 7 days overdue, add an urgent flag and recommend immediate escalation.
      </Accordion>

      <Accordion title="Summarize equipment health">
        **Trigger:** User asks about equipment health or reliability

        1. Pull the maintenance history for the specified equipment or equipment class.
        2. Calculate MTBF from the last 12 months of failure records.
        3. Compare current runtime hours against the recommended service interval.
        4. List the last three completed maintenance tasks with dates and outcomes.
        5. Provide a health status: green (on schedule), yellow (approaching due date), or red (overdue).
      </Accordion>
    </AccordionGroup>
  </Step>
</Steps>

***

## Automation

### Playbook: Daily maintenance scan

<Steps>
  <Step title="Set the trigger">
    Schedule the playbook to run every day at 5:30 AM, before the maintenance team's morning standup.
  </Step>

  <Step title="Build the workflow">
    The playbook scans all scheduled maintenance, identifies overdue items, and routes alerts based on severity.

    1. **Query step** — Pull all maintenance tasks with a scheduled date of today or earlier that have not been completed.
    2. **Loop step** — For each overdue task, calculate days overdue and look up the equipment's criticality rating.
    3. **Condition step** — Split overdue items into two groups: critical equipment overdue by 7+ days (urgent) and all other overdue items (standard).
    4. **Format step** — Build a summary table for each group with equipment name, task type, scheduled date, days overdue, and criticality.
  </Step>

  <Step title="Configure delivery">
    Send the standard overdue report via email to the maintenance supervisor. For urgent items (critical equipment 7+ days overdue), also send a Slack message to the #maintenance-urgent channel with the equipment name and days overdue.
  </Step>

  <Step title="Test and activate">
    Click **Run now** to test with live data, then toggle to **Active**.
  </Step>
</Steps>

***

## What's next

<CardGroup cols={2}>
  <Card title="Material usage variance" icon="arrow-right" href="/use-cases/manufacturing/material-usage-variance">
    Track actual material consumption against BOMs to catch waste and pricing issues.
  </Card>

  <Card title="All manufacturing use cases" icon="list" href="/use-cases/manufacturing">
    See the full list.
  </Card>
</CardGroup>
