Build a Maintenance Technician Spare-Parts and Service-Visit Planner — implementation
Linked challenge: Build a Maintenance Technician Spare-Parts and Service-Visit Planner
Prompt source
implementation121 lines11 sectionsNo variables1 code block
## Build
Correlate machine runtime telemetry with scheduled maintenance interval thresholds. Generate an integrated service visit itinerary and spare-parts reservation manifest.
## User
Field Service Maintenance Planner
## Workflow
1. Ingest simulated open62541 OPC UA machine operating hours and motor bearing vibration registers.
2. Compare accumulated telemetry values against manufacturer maintenance thresholds.
3. Match overdue tasks with warehouse spare-parts inventories and technician skill rosters.
4. Generate a structured field service visit plan and parts reservation request.
## Interface
Multi-equipment maintenance planner calendar with kit reservation drawers and PDF export.
## Data
Mock equipment operating hour logs and warehouse parts inventories in local CSV/JSON fixtures. No external authentication required.
Starter examples below are synthetic. They are not downloaded records.
## Source
[open62541 OPC UA](https://raw.githubusercontent.com/open62541/open62541/master/README.md)
Information model server nodes monitoring operational machine runtime and condition telemetry from open62541.
## Tools
agno, pydantic, fastapi.
Agno provides structured execution for multi-step data retrieval and catalog inventory reconciliation.
Instruction-tuned model with reliable structured JSON schema output adherence.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Correctly flags assets exceeding operational hour thresholds.
- Verifies spare-parts stock availability before creating technician reservation requests.
- Generates sequenced service visit itineraries matching technician certifications.
## Starter Examples
```json
[
{
"input": {
"machine_telemetry": [
{
"machine_id": "CNC_01",
"run_hours": 2150,
"service_interval_hours": 2000,
"required_skill": "Spindle_Mech"
}
],
"warehouse_stock": [
{
"part_id": "BRG_4401",
"name": "Spindle Bearing Set",
"compatible_machine": "CNC_01",
"available_qty": 4
}
],
"technicians": [
{
"tech_id": "TECH_8",
"name": "Elena R.",
"skills": [
"Spindle_Mech"
],
"available_hours": 8
}
]
},
"expected_output": {
"planned_visits": [
{
"machine_id": "CNC_01",
"assigned_tech": "TECH_8",
"reserved_parts": [
{
"part_id": "BRG_4401",
"qty": 1
}
],
"estimated_duration_hours": 4
}
],
"stockout_alerts": []
}
},
{
"input": {
"machine_telemetry": [
{
"machine_id": "CNC_02",
"run_hours": 3200,
"service_interval_hours": 3000,
"required_skill": "Hydraulics"
}
],
"warehouse_stock": [
{
"part_id": "SEAL_09",
"name": "Hydraulic Seal Kit",
"compatible_machine": "CNC_02",
"available_qty": 0
}
],
"technicians": [
{
"tech_id": "TECH_9",
"name": "Samir K.",
"skills": [
"Hydraulics"
],
"available_hours": 8
}
]
},
"expected_output": {
"planned_visits": [],
"stockout_alerts": [
{
"machine_id": "CNC_02",
"missing_part_id": "SEAL_09",
"action_required": "Procure replacement seal kit prior to visit scheduling."
}
]
}
}
]
```
## Safety
Generates advisory work orders and stock reservation requests. No automated execution against physical inventory or ERP.
Use mock external writes. Require human review before any real deployment.