
A three-person team built an MCP-native agent called CruxAI that takes one photo of a damaged part and returns a defect diagnosis, a root cause, and a maintenance recommendation, with NitroStack's SDK structuring the workflow as typed prompts, resources, and tools.
What this enables
- Turns a single uploaded image into a defect diagnosis with a heat map overlay.
- Retrieves similar historical defects and guidelines before proposing a root cause.
- Keeps a human approval step between the agent's report and the saved record.
- Exports the finished inspection as a PDF for engineering handoff.
- Separates the vision pipeline from the reasoning agent through MCP boundaries.
Where manual inspection runs out of road
Most manufacturing quality inspection is still done by eye, and even where computer vision has been added, it usually stops at a label: crack, scratch, dent. That tells an engineer something is wrong, not why it happened or what to do next. Answering those questions normally means pulling up maintenance logs, checking whether a similar defect occurred before, and cross-referencing technical guidelines, all outside whatever tool flagged the image in the first place.
The project, a computer vision and root cause agent built by a three-person team led by developer Batchu Jatadhar, targets that gap directly. Instead of stopping at classification, the system is designed to localize the defect, pull comparable historical cases, reason about the probable cause, and generate a maintenance recommendation, all from one uploaded image.
The constraint: one photo, several kinds of reasoning
A single inspection touches at least four different problems that don't share a natural interface. Detecting and localizing a defect is a vision task. Finding comparable past cases is a retrieval task over embeddings and guideline documents. Estimating a root cause, such as material fatigue or thermal stress, is a reasoning task that needs the vision output and the retrieved context together. Deciding what to do about it, and whether a human should sign off before it's logged, is an operational task with real consequences if the agent gets it wrong.
Chaining these by hand inside one script tends to produce a brittle pipeline where a change to the vision model or the guideline index quietly breaks the reasoning step downstream. The project's own repository documentation frames this explicitly as a modular, production-style application in which each stage communicates through defined interfaces rather than shared internal state.
Building the inspection flow on MCP primitives
Rather than writing one large application, the team exposed the system's capabilities as MCP prompts, resources, and tools, with an agent built on NitroStack's SDK deciding which to call and in what order. The server exposes three prompts (inspect component, root cause investigation, and preventive maintenance) that frame the different reasoning tasks the agent can be asked to perform, and six resources covering industrial vision data, diagnostic reports, RAG context, the FAISS vector index, and model benchmark data. Tools handle the actions the agent can take, including retrieving historical guidelines, verifying report claims, generating an inspection PDF, checking machine health, and looking up support information for a given machine.
The underlying pipeline that these primitives sit on top of follows a fixed sequence: an uploaded image is validated and preprocessed, then passed to a detection model (the repository lists YOLOv11/v8, ResNet, and ViT as candidate backbones) that localizes the defect and produces a Grad-CAM heatmap. A classification step assigns a defect category, an embedding step generates a feature vector for FAISS similarity search against prior cases, and a multi-agent chain, perception, then diagnostic, then verifier, turns the detection output and retrieved context into a grounded root cause and recommendation. The verifier agent's job is specifically to catch claims the diagnostic step made without supporting evidence, which matters because the diagnostic agent is reasoning from retrieved text rather than from the image directly.
Where NitroStack fits
NitroStack's contribution here is structural rather than cosmetic. Instead of the perception, retrieval, and diagnostic steps being tightly coupled function calls, each is reachable as a typed MCP primitive, and the orchestrating agent decides the call sequence rather than having it hard-coded into a single script. That boundary is what lets the team swap or extend one stage, a new defect classifier, a different guideline index, without rewriting how the agent talks to the rest of the system. The prompts (inspect component, root cause investigation, preventive maintenance) give the agent distinct entry points for different inspection intents instead of one generic "analyze this" instruction, which keeps the reasoning task explicit at the protocol level rather than buried in a prompt string.
The detail that matters more than the AI label
The interesting part of this build isn't that it uses a language model to explain a defect. It's the approve or revise gate sitting between the agent's generated report and the database. The dashboard lets an engineer review the diagnosis, the cited evidence, and the recommendation, and either approve it into the historical record or revise it before it's saved. Because later inspections retrieve from that same historical record through the RAG resource, an unreviewed bad diagnosis wouldn't just be wrong once, it would resurface as false precedent for the next similar defect. Gating writes to that store behind human approval is a small design choice with a real downstream consequence.
What the build demonstrates
As a creator project rather than a deployed production line, this doesn't prove factory-floor adoption or measured downtime reduction. What it does demonstrate is that a defect classification pipeline, a retrieval layer, and a multi-agent reasoning chain can be composed through MCP primitives with a clear read and write boundary, and that a human approval step can sit inside that boundary without breaking the automated flow. The team's own repository frames the goal as a decision-support system for engineers rather than a replacement classifier, and the architecture backs that framing up.
The reusable pattern
The transferable idea isn't "AI diagnoses defects." It's that a workflow spanning vision, retrieval, and reasoning doesn't need to be one monolithic model call. Splitting it into typed prompts, resources, and tools gives each stage an interface a developer can test, replace, or audit independently, and gives a verifier agent something concrete to check before a claim reaches a human reviewer.
Explore how NitroStack's SDK structures multi-step agent workflows as prompts, resources, and tools, or view the project's source on GitHub to see the full detection-to-report pipeline.