← Blog

ERP, MES, WMS: Which Data Actually Powers Your AI Agents

ERP, MES or WMS: which one holds the data your AI agents need? How the three layers split, the data contract, and the 2026 pitfalls.

Three manufacturers out of four plan to deploy AI agents within two years, but only about one in five believes its data model is ready to feed them (source: Manufacturing Dive). That gap is not a model problem, nor a GPU budget problem. It is a plumbing problem: most projects plug the agent into the ERP, and the ERP does not know what actually happened on the shop floor.

ERP, MES, WMS: these three acronyms refer to systems that partly overlap, that vendors sometimes sell as interchangeable, and that in reality answer three different questions. Knowing which one answers what determines whether your AI agent produces a useful answer or a wrong one stated with confidence. This guide lays out the split, shows the four business questions that require all three layers, and describes the minimum data contract to expose before plugging in anything at all.

In brief

  • The ERP answers "what was planned": orders, bills of materials, standard costs, planned manufacturing orders. It is a management view, often consolidated by the day or by the week.
  • The MES answers "what actually happened on the shop floor": actual times per operation, stoppages, scrap, yield, lot-by-lot traceability. It is the only layer that knows the gap between the plan and reality.
  • The WMS answers "where the material physically is": locations, movements, order picking, receiving and shipping, by the pallet or by the unit.
  • An agent plugged into the ERP alone hallucinates by design: it reasons on plan data and presents it as actuals. 57% of companies have traced a wrong but confident agent answer back to missing or inconsistent business context (source: VB Pulse survey, June 2026, 101 companies).
  • The MES is the system most often forgotten in agent deployments, even though it holds cycle times, stoppages and scrap (source: OutcomeCatalyst).
  • The question is not "which software to choose" but "which entities to expose": five to seven well-timestamped business objects are enough to run a first useful agent, whatever vendor sits underneath.

The three layers, and the question each one answers

The reference model is old and still holds: the ISA-95 standard (IEC 62264) describes a functional hierarchy in which level 4 manages the enterprise (the ERP) and level 3 manages production execution (the MES). The lower levels belong to the machine and its control system — that is the automation engineer's job, and BCUB3 integrates above that layer, consuming the data it produces, with automation partners handling the measurement chain itself.

The ERP: the management view

The ERP (Enterprise Resource Planning, known in French as PGI) is the commercial and financial system of record. It holds the order book, items, bills of materials, theoretical routings, standard costs, purchasing and invoicing. When an executive asks "what is our margin on this deal," the ERP answers — with standard costs, that is, a forecast.

The limit is structural, not a matter of quality: the ERP records decisions and commitments, not physical events. A manufacturing order in it is "released" or "closed." What happened in between, the ERP does not know, unless someone keyed it in again.

The MES: the execution view

The MES (Manufacturing Execution System) runs and records shop-floor execution: operation reporting, actual times per workstation, stoppage causes, good and scrapped quantities, lot/serial traceability, product genealogy. It is the layer that makes it possible to calculate an actual OEE rather than an estimated one, and to compare theoretical routing time with observed time.

According to practitioners in the field, it is also the system most frequently missing from agent deployments (source: OutcomeCatalyst) — precisely because it is the most heterogeneous: many manufacturing SMEs have no MES at all, or have a "production tracking" module built into their ERP, whose granularity often stops at the day.

The WMS: the physical view

The WMS (Warehouse Management System) manages the warehouse: addressing, locations, movements, picking orders, receiving inspection, shipping. Where the ERP says "we have 240 parts in stock," the WMS says "180 in zone A, 60 in quality quarantine, 40 of which are reserved for an order that left yesterday."

This difference is the one that costs the most in customer promises. ERP stock is an accounting quantity; WMS stock is an available quantity, in a location, in a given state. To go deeper into the modeling side, we have detailed how to calculate the optimal stock level under demand variability.

Why an agent plugged into the ERP alone is confidently wrong

An AI agent does not flag that a source is missing. It answers with what it has. If the only connected source is the ERP, it will answer from plan data in the present tense — and nothing in its wording will indicate that the data is theoretical.

The phenomenon has been measured: in a June 2026 VB Pulse survey of 101 companies with more than 100 employees, 57% traced a confident but wrong agent answer back to missing or inconsistent business context, and 31% saw it happen more than once. The same survey indicates that only 25% of companies run a governed context layer in production, 34% are building one and 41% have not started.

This is not a flaw of the language model: it is a scoping flaw. The ranking of causes of failure for agentic pilots confirms it — lack of interoperability comes second, right after data quality, and 87% of the IT leaders surveyed by UiPath (500+ respondents) consider interoperability important or crucial to success. The same study anticipates that more than 40% of agentic projects will be canceled by 2027.

Therein lies the paradox of the moment: adoption is moving fast — Gartner estimated that fewer than 5% of enterprise applications embedded agentic capabilities in 2025, with a projection of 40% in 2026, and KPMG found as early as the first quarter of 2025 that 65% of organizations had moved from experimentation to pilot, versus 37% the previous quarter — while the data layer has not moved at all.

The four business questions that require all three layers

"Can we meet this delivery date?"

The ERP knows the order and the promised lead time. The MES knows whether the bottleneck workstation has held its routing times over the last three weeks or is drifting by 18%. The WMS knows whether the raw material is actually at the dock. Answering with the ERP alone means repeating the original promise instead of assessing it.

"Why did this margin melt away?"

This is the question of tracking material cost indicators, and it cannot be solved on a single layer. The ERP gives the standard cost and the selling price. The MES gives scrap, rework and the time actually spent. The WMS gives inventory discrepancies and unvalued movements. The margin gap lives in the difference between these three views, not in any one of them.

"Should we release this manufacturing order now?"

A scheduling decision: it requires the planned load (ERP), the actual state of the workstations and the disruptions under way (MES), and the physical availability of components (WMS). This is typically the use case where an agent adds value, because manually synthesizing the three screens takes twenty minutes and is redone ten times a day.

"Where is the stock the customer is asking for?"

A customer service question, trivial in appearance, in practice the most revealing: it fails as soon as ERP stock and WMS stock diverge, which is the norm and not the exception in a multi-site SME.

The data contract: what to expose before plugging in an agent

The right question is not "which MES to buy," it is "which entities must my agent be able to read." A useful first scope fits in a handful of objects:

  • Manufacturing order — identifier, item, quantity, status, planned and actual dates.
  • Operation — link to the work order, workstation, theoretical time, observed time, good quantity, scrapped quantity.
  • Stoppage event — workstation, start and end timestamps, coded cause.
  • Item and bill of materials — part number, unit, standard cost, components.
  • Stock location and movement — part number, quantity, location, state (available, reserved, quarantine), timestamp.
  • Customer order — lines, promised dates, shipping status.

Three cross-cutting requirements determine whether the whole thing is usable:

Timestamps. Data without a point in time is useless to an agent that reasons on gaps. A daily aggregate cannot detect a micro-stop; we have detailed elsewhere how the choice of aggregation window destroys or preserves the signal.

Shared identity. The same item must carry the same part number in all three systems, or have a maintained cross-reference table. It is the least rewarding work in the project and the one that decides its outcome.

The right to write. Reading is reversible; writing is not. An agent that consults the MES and proposes a rescheduling is a decision-support tool; an agent that modifies the schedule in the ERP is an actor in the process, and must be treated as such — logging, restricted scope, human validation on actions with irreversible effects. We develop this split in our analysis of architectures for integrating AI agents with an ERP.

Renting the integration layer or owning your connectors

Once the entities are identified, they still have to be exposed. Two paths exist, and the trade-off is first and foremost economic.

The first is to subscribe to an integration platform that offers ready-made connectors to the ERPs, MESs and WMSs on the market. It is fast, and it introduces a recurring subscription proportional to the number of connections, plus a third party in the path of your production data. We have costed this trade-off in detail on the accounting scope, where public pricing is available: see Unified accounting API: choosing well before plugging in your AI agents.

The second is to develop and host your own connectors, exposed through a standard interface — a self-hosted MCP server, for example — that your agents query. The cost is upfront rather than recurring, the data does not leave, and the asset stays within the company. That is the meaning of the "your AI, on your premises, owned by you" approach: the implementation principles are detailed in our guide to custom ERP connector development.

The choice depends mainly on the number of connections and the time horizon. Below two or three systems and over a short horizon, renting is defensible. Beyond that, and as soon as production data is involved, owning quickly becomes cheaper and safer. If you are still at the stage of choosing the building blocks themselves, our comparison of ERP, MES, WMS and e-invoicing solutions lists vendors by category along with their integration capabilities.

A realistic path for a manufacturing SME

Step 1 — Map, two to three weeks. For each of the six entities above: which system is its source of truth, at what granularity, with what timestamp, accessible by what means (API, database, export). The exercise almost always reveals two or three entities with no clear owner. That is the real deliverable.

Step 2 — One flow, one agent, one question. Pick the business question that costs the most human time among the four listed above, expose only the entities it requires, and deliver a read-only agent. The goal is not coverage; it is to prove the chain end to end and to measure the gap between the agent's answer and the business expert's.

Step 3 — Extend by entity, not by system. Add one entity at a time to the data contract, checking with each addition that answers remain traceable to their source. This is also when predictive models become relevant on the data thus normalized — for example for predictive maintenance.

On truly connected data, the orders of magnitude published by integrators put the gains at a 15 to 30% reduction in stoppages for predictive maintenance and 40 to 60% on manual inspection time in quality control (source: Customertimes benchmarks drawn from their own deployments, 2026). These figures come from a vendor and describe its best cases: they indicate a potential, not an expected result.

What this approach does not solve

It does not replace an MES where there is none. If the shop floor reports nothing, no agent will guess the actual times: you first need data entry, even minimal, even on a tablet. Nor does it fix inconsistent item master data — an agent amplifies data quality, in both directions. Finally, it does not remove the need for human arbitration on binding decisions: promising a delivery date remains a commercial decision.

Frequently asked questions

What is the difference between an ERP and a WMS?

The ERP manages the company as a whole — orders, purchasing, production, accounting — and treats stock as an accounting quantity. The WMS manages only the warehouse and reasons in terms of physical locations, movements and states (available, reserved, quarantine). An ERP knows how many parts you own; a WMS knows where they are and which ones can actually be picked.

Is an MES built into the ERP enough?

It depends on the granularity. A production tracking module built into the ERP is fine if all you need is a daily total per manufacturing order. It becomes insufficient as soon as you want to analyze micro-stops, scrap causes or time variances per operation, because these modules rarely timestamp to the minute and rarely code stoppage causes.

What is a vendor-agnostic WMS?

A vendor-agnostic WMS is a warehouse management system independent of the ERP vendor, able to work with several different ERPs through standardized interfaces. The benefit is being able to change ERP without changing your logical warehouse, and vice versa. The drawback is that integration becomes a project in its own right, to be budgeted as such.

Which system should you start with to plug in AI agents?

With the business question, not the system. Identify the question that costs the most human time each week, list the data it requires, and connect only those systems. In most production cases, that leads to the MES-ERP pair; in customer service and logistics cases, to the WMS-ERP pair.

Do you need a data lake before deploying agents?

No, not to get started. A data lake is useful when several analytical consumers share the same historical data. For a first agent, exposing the required entities directly through an API or an MCP server is faster, cheaper and easier to audit. The data lake becomes justified later, as the number of consumers grows.

Does production data have to leave the company?

That is not necessary. Routing times, scrap rates and bills of materials are a sensitive industrial asset. An architecture that hosts the connectors and, if needed, the model in-house lets agents work on this data without passing it to a third party. It is an architectural choice, not a technical constraint.

In summary

ERP, MES and WMS are not three competitors from which to elect the best: they are three answers to three distinct questions — what was planned, what happened, where it physically is. An AI agent is only relevant within the scope it has actually been given access to, and the gap between projects that succeed and the others comes down to this data contract far more than to the model chosen.

BCUB3 works above the instrumentation layer, on this data and agent tier: mapping entities, developing connectors that you own, putting agents and models into production on your data. If you want to test your situation against this split, let's talk.