FactorySemantics MES Open a demo
Manufacturing execution, agent-native

The MES that never invents production.

FactorySemantics MES is a modular manufacturing execution system built to be operated by people and by AI agents, and to be honest about every number it shows. Counters book production; a reset books nothing. OEE reports unknown, never a comforting zero.

Two simulated plants are running right now. Early access; no real plant has run this yet.

ACME Beverages · Kansas City · bottling sim time 30:12
10 12 4 20 9 Loader Rinser Washer Inspect Filler Palletiser LD01 RD01 WASH01 · 74.1 °C QI01 FILL01 · blocked PAL01 AlarmWord bit 2: quality excursion
LD01running3,312
RD01running3,247
WASH01running3,195
QI01running3,150
FILL01blocked3,104
PAL01running3,061
Breakdowns detected100%of scripted
Planned stops misbooked0as downtime
Fill-weight cause foundWASH01by an agent
Two plants, running now

Sign in and look around.

Both plants are driven by a deterministic line simulator with scripted faults: a motor that heats before it fails, a washer that runs hot and short-fills the bottles downstream, a changeover the MES must not book as downtime. The demo account can see everything and change nothing.

demo-bottling.factorysemantics.com

ACME Beverages, Kansas City: a six-station bottling line

  • Machine › WASH01 › Tags: a dozen live tags per machine, the setpoint beside the value it drives, the alarm word decoded.
  • Triggers: conditions as data, approved by a person, firing on the planned-stop bit at every changeover.
  • Adjustments: a recommendation the agent made, an engineer approved, and the PLC followed.
  • Certificates: a certificate of analysis issued at the end of the line, from the records, immutable.
demo-machining.factorysemantics.com

Northgate Machining, Cell A: a three-station machining cell

  • Line: work in progress between stations, with the cost center each stage books to.
  • Schedule: finite-capacity planning against the shift calendar, and a promise date for every order.
  • Trace: serial units, their containment tree, where-used and quarantine.
  • SPC: control charts with capability withheld while the process is out of control.

Sign in with user DEMO and password look-around. The account is a viewer: every write returns 403, and the audit trail stays true.

The difference

Three commitments most MES products do not make.

Plants that cannot afford a six-figure MES implementation stitch together Node-RED, Grafana and spreadsheets, and every one of those tools will happily show a number that is not true. This one is built around not doing that.

Honest numbers

Production is booked from counter deltas, so a PLC counter that snaps to zero after a power blip re-baselines and books nothing. Unlabelled downtime is reported as unlabelled. Every screen states where its data came from, and a value that cannot be known renders as unknown rather than 0.

The product scores itself. A scripted line with known faults is replayed and the MES is graded on whether it told the truth: breakdowns detected, planned stops kept out of downtime, and how many seconds late each fault was seen.

fsmes score bottling → breakdown recall 100%, misbooked planned stops 0

Agent-native by mechanism

Every capability is an API and an agent tool first, a screen second. A test in the suite fails the build when a route ships without a screen, and another fails it when a write route ships without an agent tool or a written reason. Agent-first is not a policy here; it is a red test.

Agents act on behalf of a named person, every command tool takes a dry run, and repeated commands carry an idempotency key so a retried request cannot create a second order.

80+ tools across orders, quality, maintenance, scheduling, trace, triggers, adjustments, certificates

Runs on your hardware

SQLite on a laptop, PostgreSQL in a plant, the same models either way. Each plant is a separate process with its own database, port and secret key: there is no multi-tenant code path to get wrong, so one plant cannot read another's data by construction.

The operator screens are plain HTML and JavaScript with no build step and no font, script or call fetched from outside the box, because a plant PC must render them for years without a toolchain.

OPC UA in, ERP out: REST, file (B2MML-flavoured), ERPNext
How AI is used

Deterministic first, model second, human approval always.

An AI agent in this system is an operator with a badge. It reads through the same API as a browser, proposes rather than acts, and everything it does is recorded under its own name and the name of the person it worked for. Nothing in the control path depends on a model being right.

TRIGGERS

Conditions are data, not code

A trigger is a row: a tag, a condition, a sustain time, a cooldown, and an action from a fixed catalogue such as opening a non-conformance or raising a maintenance order. An agent may draft one; a person approves it before it evaluates a single reading.

RECOMMENDATIONS

The agent proposes, an engineer approves, the PLC follows

A write to a setpoint passes three independent guards: the tag map must declare it writable, the value must sit inside declared bounds, and a human must approve it on screen. After the write, the process value is checked and the verdict is recorded.

EVALS

Agents are graded against known truth

The simulator scripts a fault and the eval asks a question with a known answer. The agent answers through the tools alone and is scored strictly: naming the symptom alongside the cause fails. Agent usability becomes a trend, the way honesty already is.

One loop, end to end, on the bottling demo

The washer drifts three degrees hot. Scrap climbs at the washer and, with no alarm of its own, the filler downstream starts short-filling by nine grams. Fill-weight checks fail.

An agent, asked which machine caused the failures, reads the alarm history and the tag trends and answers WASH01, not the filler where the checks were taken.

It proposes lowering the wash temperature setpoint from 71 to 68 with the evidence attached. An engineer approves on screen. Six seconds later the agent writes 68.0 to the simulated PLC. Four and a half minutes later the verification runs, and the receipt on the right is what it recorded.

Recorded verification, adjustment ADJ-00001, tag WASH01.WashTempSP
{
  "proposed_by": "AGENT on behalf of scott",
  "approved_by": "ADMIN",
  "written_after_approval_s": 6,
  "setpoint": 68.0,
  "pv_before": 71.6,
  "pv_after": 67.6,
  "followed": true
}
Eval: "Which machine caused the failed fill-weight checks?" → answer WASH01, pass. The filler was a distractor.
Floor assistantRoutes a question, quotes the approved procedure, points at the right guide. Runs on a local model; falls back to plain text matching when the model is down.
Instruction draftingDrafts work instructions from facts the plant already holds. Every draft arrives unapproved and stays that way until a supervisor signs it.
Nightly narrationOne note a day. The model is handed computed numbers and asked only what changed; it never computes a number itself.
No cloud requiredThe local model runs on an ordinary GPU on the same box. A hosted model is optional, and the control path never depends on either.
Security and data

Built for the questions an IT lead will ask first.

Where does the data live, who can change it, and what happens when an agent is wrong. The answers are in the design, not in a policy document.

Where data livesOn your hardware. One database per plant, SQLite or PostgreSQL, in a directory you choose. Nothing leaves the box unless you configure an ERP adapter or a tunnel. The operator screens fetch nothing from the internet.
Identity and rolesA role ladder of viewer, operator, supervisor, admin, plus an agent role that can propose and draft but never approve, never manage users, and never edit master data. The list of tools an agent sees is filtered by what its account may do.
Agent identityAn agent token never earns a role by itself. Every agent action records the person it acted on behalf of, and lands in the same audit trail as a human action, under both names.
Audit trailAppend-only, with before and after values on every change. It is the same spine the honesty scoring reads, so the evidence the product is judged on is the evidence you keep.
SessionsSigned tokens in an HttpOnly cookie, with a secret key per plant, so no plant accepts another plant's session. Passwords are hashed with PBKDF2 from the standard library.
IsolationPlants are separate processes with separate databases and separate machine connections. There is no tenant column to forget in a query.
Writes to machinesOnly tags the tag map declares writable, only inside declared bounds, only after a human approval on screen. Every write is verified afterwards and the result recorded, followed or not.
IdempotencyCommand tools carry a client reference; a retried request returns the original result instead of creating a second order, lot or check.
RetentionRaw tag samples are evidence and are pruned on a stated schedule; bookings, states, checks and the audit trail are kept. The policy is shown on the Ops screen so a trend that ends at the window's edge reads as pruned, not as a silent machine.
StandardsISA-95 names for the data model, PackML for machine states, ISO 22400 for KPIs, and B2MML only at the ERP border. Never a word the industry already has a word for.
Run it yourself

From a laptop to a line in five steps.

The same commands run a five-person shop and a plant with a fleet of machines. Each step below is what a plant engineer does, in the order they do it.

1

Install

Python 3.12 or newer on Windows or Linux. No database server, no build tools, no container required to start.

python -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/fsmes info
2

Run a plant

A plant is an entry in a registry file: its database, its dashboard port, its machine endpoint, its tag map. Adding a plant is never a code change. The two demo plants ship as examples.

fsmes plant bottling init
fsmes plant bottling run      # API, OPC UA agent, simulator, shop-floor activity
3

Describe your machines

A tag map names each machine's OPC UA tags and what they mean: the state word and how it maps to running, down and planned stop; the counters that book production; the process values; the setpoints that may be written and their bounds. Point it at Kepware, an OPC UA server, or the built-in simulator.

4

Connect the ERP

Orders in, confirmations out, per operation, with cost center and component consumption. Adapters for REST, a file drop, and ERPNext. Messages that fail are retried with backoff, then parked where a person can see and retry them.

5

Give an agent the tools

One MCP server per site exposes the plant to any agent that speaks the protocol. Reads are free; writes take a dry run and an approval. What the agent can do is exactly what its account may do.

fsmes-mcp                      # tools: orders, quality, maintenance, trace, triggers, adjustments ...
fsmes agent-eval bottling      # grade an agent against the plant's known truths

Early access

The code is running two simulated plants and has not yet run a real one. If you have a line and want to be the first, or you build agents and want a plant to point them at, write and say so.

Request early access