AWS Builder Center
An AI Agent on the Factory Floor: Predictive Maintenance with Amazon Bedrock and AWS IoT

An AI Agent on the Factory Floor: Predictive Maintenance with Amazon Bedrock and AWS IoT

How to build an agentic predictive maintenance workflow on AWS using Bedrock, IoT SiteWise and Lookout for Equipment, from anomaly detection to a decision-ready work order, plus the OT security and trust pitfalls to avoid.

Senior Manager - Industrial AI - Accenture Solutions Pvt Ltd

An AI Agent on the Factory Floor: Predictive Maintenance with Amazon Bedrock and AWS IoT

Ask a plant manager what keeps them awake at night and the answer is rarely dramatic. It is a bearing that fails on a Sunday, a compressor that trips during a production run, or a maintenance backlog nobody can prioritise. Unplanned downtime in heavy industry routinely costs lakhs per hour, and the data needed to prevent it usually exists. It is just scattered across historians, CMMS tickets, sensor streams, and the heads of two senior technicians who are close to retirement.
This is a problem shape that agentic AI fits unusually well, because the job is not one prediction. It is a workflow: detect an anomaly, pull context, reason about the likely failure mode, check spares and schedules, and then recommend an action a human can approve. In this article I will walk through how I structure that workflow on AWS, and where the sharp edges are.

Why a single ML model is not enough

Classical predictive maintenance stops at a score: "bearing 4 has an anomaly probability of 0.87". Useful, but the score is where the real work begins. Someone still has to ask: What changed? Has this asset done this before? Is the part in stock? Can we wait until the planned shutdown on Friday?
An agent can carry the workflow past the score. The anomaly model stays exactly where it belongs, as a specialised detector, and the agent becomes the investigator that turns a detection into a decision-ready recommendation.

The reference architecture

Here is the stack I use as a starting point, layer by layer:
Data plane
  • AWS IoT SiteWise ingests and models equipment telemetry (vibration, temperature, current draw) against an asset hierarchy
  • Amazon Timestream or SiteWise's own store holds the time-series history
  • The CMMS (work orders, failure history) and the spares inventory remain in their existing systems
Detection plane
  • Amazon Lookout for Equipment, or your own model on SageMaker, watches the streams and raises anomaly events
  • Events land on Amazon EventBridge, which is the trigger point for the agent
Reasoning plane
  • Amazon Bedrock provides the model (I typically use Claude for the reasoning-heavy investigation steps)
  • A Bedrock Knowledge Base indexes maintenance manuals, OEM documentation, and past incident reports for retrieval
  • The agent's tools are exposed as MCP servers: one wrapping SiteWise queries, one wrapping the CMMS, one wrapping the spares inventory
Action plane
  • The agent never actuates anything. Its terminal action is creating a draft work order and a briefing note, routed to a human planner for approval

The investigation loop in practice

When an anomaly event fires, the agent runs a loop that looks remarkably like what a good reliability engineer does:
  1. Characterise the anomaly. Query SiteWise for the affected tags over the last 72 hours and compare against the asset's baseline. Is this a step change, a drift, or intermittent spikes?
  1. Pull the asset's history. Query the CMMS: when was this asset last serviced, what failed before, and what did the technician write in the closure notes? Those free-text notes are gold, and large language models finally make them searchable.
  1. Consult the documentation. Retrieve the relevant sections of the OEM manual from the knowledge base. A rising vibration signature at a specific frequency band often maps to a documented failure mode.
  1. Check operational constraints. Is the required spare in stock? When is the next planned stoppage? What is the production schedule impact of an immediate intervention versus a deferred one?
  1. Recommend and justify. Produce a structured recommendation: suspected failure mode, confidence, evidence trail, proposed action, and timing. Every claim links back to the data that supports it.
The output is not "anomaly detected". It is "likely outer-race bearing wear on Compressor C-102 based on the 4.2 kHz band trend and the March 2024 incident on the sister unit; spare is in stock; recommend replacement during Friday's planned stop; deferring beyond Friday carries elevated risk". That is a sentence a planner can act on in thirty seconds.

The sharp edges nobody mentions in the demo

OT/IT separation is non-negotiable. The agent lives on the IT side. It reads from SiteWise and the historian through tightly scoped, read-only MCP tools. Nothing in this architecture opens a write path to a PLC or SCADA system, and any design that does should fail its safety review.
Hallucinated confidence is worse than no answer. Force the agent to cite: every recommendation must reference the specific tags, work orders, and manual sections it used. If the evidence is thin, the correct output is "insufficient data, flag for manual review", and you should test for that behaviour explicitly.
Latency budgets are generous, so use them. Unlike a chatbot, a maintenance investigation can take two minutes. Spend that budget on more retrieval and cross-checking rather than racing to a fast, shallow answer.
Evaluate against history before trusting the future. Replay the last twelve months of failures through the pipeline offline. If the agent would have caught eight of ten with sensible recommendations, you have a business case. If not, you have found out cheaply.
The human is the point, not a fallback. Framing the agent as a junior reliability engineer that prepares briefs for a senior planner gets organisational buy-in that "autonomous maintenance AI" never will. Adoption is a people problem wearing a technology costume.

Start smaller than you think

You do not need the full plant. Pick one asset class with a painful failure history, wire up the loop end to end for just those assets, and run it in shadow mode alongside the existing process for a month. The comparison between the agent's briefs and what the planners actually did is the most persuasive slide you will ever present to a steering committee.
Industrial AI does not fail for lack of models. It fails in the last mile between a prediction and a confident human decision. Agents, done carefully, are the best tool I have found for closing that mile.
If you are working on agentic systems in manufacturing, energy, or any other operational environment, I would genuinely like to compare notes. What is blocking you right now: data access, trust, or integration with legacy OT systems? Tell me in the comments.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article