We once branded mes-line as an "AI Agent". Looking back, that was a beautifully executed directional mistake. mes-line should expose its capabilities through MCP so AI can call it — not pretend to be a chatbot. This post is both a correction and a crash course in the 5 AI concepts we learned along the way.
A Confession: We Made a Directional Mistake
We once branded mes-line as the "mes-line Intelligent Agent" — wrapping it in an LLM chat shell. Looking back, this was a beautifully executed directional mistake. About 12 developer-days, roughly 5% of total effort, spent slapping a "chatty" face onto a mature, battle-tested product. Small investment, outsized narrative damage.
This post is both a correction and a crash course. We want to explain what mes-line actually is, why the Agent wrapper was wrong, and share the 5 AI concepts — Ontology, Vector KB/RAG, Skills, MCP, Agent — that we learned the hard way.
What mes-line Actually Is
To explain what it shouldn't be, we first need to explain what it is. mes-line is Tsingley's line-side MES, sitting at the Edge layer of our architecture: one deployment per production line, fully offline-capable; a Recipe Hub that connects data acquisition, work order scheduling, OEE dashboards, and CPK quality analysis; a Tsingley DAQ engine that solves the "protocol hell" of Mitsubishi, Siemens, Modbus, and Fanuc CNCs; and upstream integration with the Online platform for plant-wide management.
Its core value is one word: determinism. The factory floor doesn't need a system that "thinks" — it needs precise commands, auditable results, millisecond response times, and resilience through power and network outages. You don't have to use our upper-layer MES, but device connectivity and line-level execution? That's non-negotiable.
mes-line's correct position: the "hands" — exposing DAQ, work orders, OEE queries, and quality traceability as standard MCP tools for external AI agents to call.
Why the "Agent Wrapper" Was a Trap
Wrapping mes-line as an "Agent" sounded sexy. Three real-world problems killed it:
- Performance regression: Every work order dispatch and device status read is a millisecond-level deterministic command. The wrapper added an LLM inference round-trip — turning deterministic operations into probabilistic ones.
- UX regression: Natural language is ambiguous. Manufacturing needs precision. Asking users to say "how's that line doing?" instead of looking at a clear OEE dashboard meant re-creating problems we'd already solved.
- Positioning dilution: mes-line's sharpest value proposition — "you don't need our MES, but mes-line is essential" — got buried under a layer of AI theater that didn't improve the actual product one bit.
The Right Path: Don't Be the Agent. Serve the Agent.
The corrected strategy is clean: enable Agents, don't become one.
Give mes-line an MCP (Model Context Protocol) endpoint: package its core capabilities as a standard tool set — get_device_status, dispatch_work_order, query_quality_trace, pull_oee_dashboard.
Any AI assistant (Cursor, Claude Desktop, enterprise agents) can now directly call mes-line through MCP. A user says "reorder the night shift work orders on Line 3 by priority" — the Agent drives mes-line via MCP. Natural language in, deterministic execution out. Zero performance loss. Zero reliability loss.
The Agent is the brain. mes-line is the hands. Our job is to make the hands excellent, and let any brain hold them.
5 AI Concepts, One Thread
This detour forced us to fill in the full AI engineering picture. Here it is as a single chain: ontology defines the world → vector KB stores knowledge → skills package workflows → MCP connects tools → agent orchestrates execution.
The five-layer stack: Ontology is the skeleton (defining domain concepts), Vector KB is memory (grounding LLMs), Skills are appliances (reusable workflows), MCP is the socket (standard interface), Agent is the brain (orchestration).
Ontology: The Skeleton That Makes AI "Understand" Industry
Ontology answers: "what concepts exist in this domain, and how do they relate?" Tsingley's Three-Loop Control Model — Equipment Loop (PHM) ↔ Efficiency Loop (OEE) ↔ Work Order Loop (W), with triangular coupling and cross-loop direct paths — is itself an industrial ontology. When this relationship model is clear, an Agent knows it must check OEE and equipment health A[H(t)] before reordering work orders. Without ontology, even the smartest Agent is just an outsider guessing.
Vector KB / RAG: The Fix for "Confident Nonsense"
Chunk documents, embed them as vectors, retrieve semantically relevant content at query time, and have the LLM answer based on that retrieved material. Our mes-line Agent actually used KB RAG to assist HMI page generation — this part had real value. It just got buried under the "Agent" narrative instead of being highlighted on its own merits.
Skills: The "Appliances" That Plug Into MCP
If MCP is the power socket, Skills are the appliances you plug in: pre-packaged modules containing a task's workflow, prompts, and tool dependencies, ready for any Agent to use. Future mes-line deployments could ship as a set of Skills that the customer's own Agent simply picks up and runs.
MCP: The "USB-C" of the AI World
MCP is an open protocol from Anthropic that solves a simple problem: how should a model standardly connect to external tools and data? Define once, plug-and-play with any MCP-compatible client. This is exactly where mes-line belongs — as the standard endpoint being called, not the brain doing the calling.
Agent: Tool-Using, Not Chat-Simulating
An Agent's essence is the "perceive → decide → act" loop, and its watershed capability is calling external tools (querying databases, firing APIs, running scripts). We confused "has a chat window" with "is an Agent" — that was a category error. A real Agent stands outside mes-line, commanding it through MCP.
What Stays. What's New.
After the reckoning, mes-line's mission is clearer:
- Deterministic execution (unchanged): Three-loop control, A[H(t)] capacity signal, deterministic transport, offline resilience.
- MCP endpoint (new): Standard tools for any AI assistant to drive mes-line.
- Reusable Skills (new): Packaged implementation experience, lowering delivery cost — through configuration, not conversation.
The promise to customers also got simpler: You need determinism, not a performance.
Grateful for the Mistake
It cost us almost nothing and taught us the full AI engineering stack — from ontology to agent — in one real project. mes-line no longer pretends to be an agent. It focuses on being the best "hands" it can be, waiting for every kind of brain to pick it up. If you're building industrial software + AI, we'd love to hear: how do you handle the "should our product become an Agent?" question?
