MachinaCheck: Building a Multi-Agent CNC Manufacturability System on AMD MI300X

MachinaCheck: Building a Multi-Agent CNC Manufacturability System on AMD MI300X

MachinaCheck:在 AMD MI300X 上构建多智能体 CNC 可制造性系统

The Problem We Solved 我们解决的问题

Walk into any small CNC machine shop and ask the manager how they decide whether to accept a customer job. The answer is almost always the same: they print the drawing, read every dimension by hand, walk around the shop checking which tools are available, estimate whether their machines can hold the required tolerances, and write notes on a clipboard. The whole process takes 30 to 60 minutes per drawing. 走进任何一家小型 CNC 加工车间,问问经理他们是如何决定是否接受客户订单的。答案几乎总是千篇一律:他们打印出图纸,手工读取每一个尺寸,在车间里走来走去检查有哪些可用工具,估算机器能否达到要求的公差,然后在剪贴板上做笔记。整个过程每张图纸需要 30 到 60 分钟。

For a busy shop receiving 10 to 20 RFQs per week, that is 5 to 20 hours of skilled manager time spent on feasibility analysis alone. Sometimes they get it wrong. They accept a job, start production, and discover halfway through that they don’t have the right tap or that their mill cannot hold the tolerance on a critical feature. The part gets scrapped. The customer is unhappy. The machine time is lost. We built MachinaCheck to eliminate this problem entirely. 对于一家每周收到 10 到 20 份询价单(RFQ)的繁忙车间来说,仅可行性分析就要耗费熟练经理 5 到 20 小时的时间。有时他们还会出错。他们接下订单,开始生产,结果中途发现没有合适的丝锥,或者铣床无法达到关键特征的公差要求。零件报废了,客户不满意,机器工时也浪费了。我们构建 MachinaCheck 就是为了彻底消除这个问题。

What MachinaCheck Does MachinaCheck 的功能

MachinaCheck is a multi-agent AI system. You upload a STEP file — the standard CAD format that customers send to machine shops — along with three simple inputs: material type, required tolerance, and any thread specifications. Thirty seconds later you have a complete manufacturability report telling you exactly whether you can make the part, what tools you need, what is missing, and what actions to take before starting production. No manual drawing reading. No walking around the shop. No guesswork. MachinaCheck 是一个多智能体 AI 系统。你只需上传一个 STEP 文件(客户发送给加工车间的标准 CAD 格式),并输入三个简单的参数:材料类型、所需公差和任何螺纹规格。30 秒后,你就能得到一份完整的可制造性报告,明确告诉你是否能制造该零件、需要什么工具、缺少什么,以及在开始生产前需要采取什么行动。无需手动阅读图纸,无需在车间走动,无需猜测。

Why We Built It on AMD MI300X 为什么我们选择在 AMD MI300X 上构建它

Before explaining the architecture, this point deserves its own section because it is not just a technical choice — it is a business requirement. Manufacturing customers sign NDAs. Their STEP files contain proprietary geometry representing years of engineering work and millions of dollars in R&D. The hole pattern on a medical device or the pocket geometry on an aerospace component is confidential intellectual property. Sending that data to OpenAI, Anthropic, or any commercial API endpoint is a confidentiality violation. Full stop. 在解释架构之前,这一点值得单独说明,因为它不仅仅是一个技术选择,更是一项业务需求。制造业客户通常会签署保密协议(NDA)。他们的 STEP 文件包含代表多年工程成果和数百万美元研发投入的专有几何结构。医疗设备上的孔位模式或航空航天部件的型腔几何结构都属于机密知识产权。将这些数据发送给 OpenAI、Anthropic 或任何商业 API 端点都属于违反保密规定。毫无疑问。

The AMD Instinct MI300X changes this equation completely. With 192GB of HBM3 VRAM and 5.3 TB/s of memory bandwidth, we run Qwen 2.5 7B Instruct entirely on-premise. No data leaves the shop’s infrastructure. No STEP geometry is transmitted to a third-party server. The customer’s IP stays where it belongs. This is what “privacy by design” actually means in a manufacturing context — not a checkbox, but a fundamental architectural decision that makes the product viable for real enterprise customers. AMD Instinct MI300X 完全改变了这一局面。凭借 192GB 的 HBM3 显存和 5.3 TB/s 的内存带宽,我们可以在本地完全运行 Qwen 2.5 7B Instruct 模型。没有任何数据会离开车间的基础设施,也没有任何 STEP 几何数据会被传输到第三方服务器。客户的知识产权始终留在原处。这就是制造业背景下“隐私设计”的真正含义——它不是一个勾选项,而是一个让产品对真实企业客户具有可行性的根本性架构决策。

The Agent Architecture 智能体架构

MachinaCheck uses a five-component pipeline built with LangChain and orchestrated via FastAPI. MachinaCheck 使用由 LangChain 构建并通过 FastAPI 编排的五组件流水线。

Component 1 — STEP File Parser (Pure Python, No LLM) 组件 1 — STEP 文件解析器(纯 Python,无 LLM)

We use cadquery, a Python library built on OpenCASCADE, to parse STEP files directly. This gives us mathematically exact feature extraction: All cylindrical holes with diameter and depth, flat surfaces and their areas, chamfers and fillets, bounding box dimensions, total volume and surface area. This extraction is 100% accurate because it reads the mathematical geometry directly — no vision model, no OCR, no approximation. A Ø6.0mm hole is exactly Ø6.0mm in the output. 我们使用基于 OpenCASCADE 的 Python 库 cadquery 直接解析 STEP 文件。这使我们能够进行数学上精确的特征提取:所有圆柱孔的直径和深度、平面及其面积、倒角和圆角、包围盒尺寸、总体积和表面积。这种提取是 100% 准确的,因为它直接读取数学几何结构——没有视觉模型,没有 OCR,没有近似值。输出中的 Ø6.0mm 孔就是精确的 Ø6.0mm。

Agent 1 — Operations Classifier (Qwen 2.5 7B) 智能体 1 — 工艺分类器(Qwen 2.5 7B)

The extracted geometry plus user inputs — material, tolerance, threads — are passed to Qwen 2.5 7B running on AMD MI300X via vLLM. The agent answers: “What CNC operations and tools are required to manufacture this part?” It applies manufacturing domain knowledge: Steel 304 needs carbide tooling. A cylindrical hole needs a drill, not an end mill. A tolerance of ±0.005mm requires a precision machine, not a standard mill. 提取的几何数据加上用户输入(材料、公差、螺纹)被传递给通过 vLLM 在 AMD MI300X 上运行的 Qwen 2.5 7B。该智能体回答:“制造该零件需要哪些 CNC 工艺和工具?”它应用了制造领域知识:304 不锈钢需要硬质合金刀具;圆柱孔需要钻头,而不是立铣刀;±0.005mm 的公差需要精密机床,而不是标准铣床。

Agent 2 — Tool Matcher (Pure Python) 智能体 2 — 工具匹配器(纯 Python)

This agent does not use an LLM. It queries the shop’s tool inventory database and checks each required tool against what is available. Pure deterministic logic — database lookup, comparison, result. LLMs are not needed for database queries and using them here would add unnecessary latency and hallucination risk. 该智能体不使用 LLM。它查询车间的工具库存数据库,并将每个所需工具与现有库存进行比对。这是纯确定性的逻辑——数据库查找、比较、得出结果。数据库查询不需要 LLM,在这里使用 LLM 只会增加不必要的延迟和幻觉风险。

Agent 3 — Feasibility Decision Agent (Qwen 2.5 7B) 智能体 3 — 可行性决策智能体(Qwen 2.5 7B)

The match results go back to Qwen. The agent reasons about the overall situation and produces a structured decision. 匹配结果返回给 Qwen。该智能体对整体情况进行推理,并生成结构化的决策。

Agent 4 — Report Generator (Qwen 2.5 7B) 智能体 4 — 报告生成器(Qwen 2.5 7B)

The final agent synthesizes everything into a professional manufacturability report with an overall status, executive summary, part analysis, tools status, machine status, and final recommendation. 最后一个智能体将所有信息综合成一份专业的可制造性报告,包含整体状态、执行摘要、零件分析、工具状态、机器状态和最终建议。

The AMD Stack AMD 技术栈

Running Qwen 2.5 7B on AMD MI300X via ROCm and vLLM was straightforward. The vLLM Quick Start image on AMD Developer Cloud has everything pre-configured. With gpu-memory-utilization 0.5 we use approximately 96GB of the available 192GB, leaving plenty of headroom. Inference latency for our agent calls averages under 3 seconds. 通过 ROCm 和 vLLM 在 AMD MI300X 上运行 Qwen 2.5 7B 非常简单。AMD Developer Cloud 上的 vLLM 快速启动镜像已经预配置好了一切。通过设置 gpu-memory-utilization 0.5,我们使用了 192GB 可用显存中的约 96GB,留下了充足的余量。我们智能体调用的推理延迟平均在 3 秒以内。