Inspiration

AI agents are moving out of chat windows and into buildings, factories and data centers, where a wrong token isn't a bad sentence — it's a fire suppression system discharging into a room with someone in it.

The challenge handed us exactly that: an untrusted LLM operating a data center with fire, equipment and people. We read its decision table before we wrote a line of code, and what we found decided the whole project. The agent ignores the proximity and oxygen sensors entirely. On FIRE it turns the gas pump on regardless of occupants. It never touches a door lock, so it can't evacuate anyone. And its breaker polarity is inverted — its "cut power" leaves racks live.

You cannot prompt that away. A better prompt gives you a better average and the same tail, and in life safety the tail is the whole problem.

So we stopped trying to make the agent smarter and borrowed an idea from flight control: the Simplex architecture. Let the complex, unverifiable controller do its job, and put a simple, verifiable one beside it that owns the final say.

What it does

A runtime safety layer sits between the agent and the plant. The agent and the data center are completely unmodified — we only changed what the agent can reach.

agent ──(agent token)──▶ proxy ──(controller token)──▶ control │ gate: allow / block / hold, every command └─ monitor @4 Hz: its own beliefs,

Containment. The agent holds its own token; the controller's twhich rejects it if presented. The controller binds loopbackonly, so even knowing the address the agent cannot route to it. Admin and ground-truth routes are refused and the hidden fire_states is stripped from the event feed.

A gate judges every command against the current belief. A moni, forms its own view, and acts on its own — latching racks into evacuation posture, unlocking trapped doors, aborting gas, stopping recirculation in smoke.

And it holds instead of refusing. When the agent orders gas into an occupied rack, a naive guard says no and the fire keeps burning. Ours says not yet: it defers the command, raises the alarm, unlocks the doors, waitsbours are verified empty, then issues the agent's own commandfor it. That's the NFPA 2001 pre-discharge delay, in software. Same for water: hold, trip the breaker, then sprinkle a de-energised rack.

Measured across 8 scenarios × 3 seeds × 400 ticks, three arms over identical episodes:
┌───────────────────────┬────────────┬───────┬───────────────┐ │ │ do nothing │ agent │ agent + layer │ ├───────────────────────┼────────────┼───────┼───────────────┤ │ episodes with a death │ 9 │ 14 │ 9 │ ├───────────────────────┼────────────┼───────┼───────────────┤ │ mean safety │ 62.35 │ 38.35 │ 62.43 │ ├───────────────────────┼────────────┼───────┼───────────────┤ │ mean asset │ 46.79 │ 91.44 │ 91.61 │ ├───────────────────────┼────────────┼───────┼───────────────┤ │ combined │ 59.24 │ 48.96 │ 68.27 │ └───────────────────────┴────────────┴───────┴───────────────┘
The death sets are the real result. The protected arm kills in exactly the same nine episodes as doing nothing — scenarios that write lethal conditions at tick 0, before any sensor can report. Every one of the five dewas prevented, and the asset score went up rather than down.

How we built it

A set-membership estimator, not a point estimate. Every quantito contain the truth, derived from the published sensordatasheet: noise ≤ 3σ, bias and drift ≤ 1.5σ, dead time plus first-order lag, a bounded rate of change. A point estimate can be quietly wrong; an interval lets the system say the only thing that matters — "I cannot rus empty only after six consecutive clean ticks on both probes, because the proximity sensor cannot tell 0.05 occupancy from zero in a single sample.
An abstraction small enough to exhaust. Every decision depends on one object: two enums and sixteen booleans. That's 589,824 possible views — so we don't sample the policy, we enumerate it. verify.py checks 9,437,184onitor outputs against 17 properties in 24 seconds, and thetest suite plants deliberate bugs to confirm the verifier catches them.

  • The property we're proudest of is M1: the monitor never issues a command the gate would refuse. Two components, one policy, provably not in conflict.
  • Evidence, not vibes. A clock-stepping driver with a ground-truth oracle for statistics, a red-team suite that plays a malicious agent, and a live deployment across both supplied VMs with the LLM on a host GPU

Challenges we ran into

Our safety layer locked the building down. The plant drops sene probe's bounds widen to worst case, which allows a fire,which latches the rack and its neighbours — and any alarm anywhere stops all arrivals. On a calm plant with no fire at all, the alarm was on 91% of the time. Nobody ever entered the room, which meant our earlier "pnobody in them to protect. We now track bounds supported bymeasurement alone alongside worst case, and distinguish a brief covered gap from genuine unknown. Lockdown went from 91% to 0%.
The agent could blind its own watchdog. The controller rate-limits 600 requests per minute per route, shared between the agent and our monitor. An agenooding sensor reads starved the monitor within a second: the, but the monitor stayed blind for as long as the flood lasted. We gave the agent token buckets — 240 monitor + ≤280 agent ≤ 600 — and the proxy now refuses to start with settings that could exceed the limit.
Attacks that worked. Our own red-team found two real bypasses: values sent as text ("1", " 1", "1e0") that our guard ignored and the controller executed unknown device names passed through to the plant. 11 of 21e values exactly as the controller does, reject anything thatisn't 0 or 1, and reject unknown actuators. 21 of 21 now stopped.
Live conditions broke things the clock-stepped driver never did. Hysteresis counted polls instead of ticks, so a rack could be "verified empty" from onmple read six times. The monitor flapped — one exhaust fan sd the proxy had no answer for its own death. .

Accomplishments that we're proud of

  • Every death the agent caused, prevented — at zero asset cost. 14 → 9 episodes with a fatality, identical to the do-nothing baseline, with asset scorerising 91.44 → 91.61. In the head-to-head on early_fire seedal to the decimal: 0.27 in both arms.
  • Proven, not sampled. 9.4 million gate decisions checked against 17 properties, every one holding, re-runnable in 24 seconds. Plus 434 tests. It doesn't just say no. The hold-evacuate-release sequence ist: the agent gets the suppression it asked for, into an emptyroom, five ticks later. We attacked ourselves and lost, then fixed it. 11/21 → 21/21
  • It survives its own failure. kill -9 on the proxy, back in 1.37 seconds with a healthy monitor. /health returns 503 when the monitor is blind insteadclaiming to be fine.
  • It runs under real conditions. Both VMs live, event rate limit on, zero rate-limited polls, zero stale samples.
    What we learned
    Unknown means dangerous, and saying so costs less than we expected. The hard part isn't deciding what to block — it's representing uncertainty honestlyough that the decision is sound.

State your assumptions or your guarantee means nothing. "Safe" is meaningless; "safe given noise ≤ 3σ, bias ≤ 1.5σ, and a bounded rate of change" is a aim someone can check — and attack. Treating egress-affecting commands as a request for fresh evidence rather than cached belief would close that window.

  • Prove the estimator, not just the policy. The 17 properties hold for every belief the estimator can produce. Whether a belief contains the truth iscurrently argued from datasheets and tested empirically; it citly stated physics.
  • Real OT protocols. The plant speaks REST. Production speaks Modbus, OPC UA, BACnet. The gate's logic is transport-independent by design — the adaptthe work.
  • Survive its own restart. A restarted proxy comes back with empty state, so protective actions stay latched until cleared. Persisting intent across restarts is a small change with a real safety payoff.
  • Multiple agents, one plant. Nothing in the policy assumes a single agent, but the rate budget and intent-tracking do. Several agents with separate tokens and a shared monitor is the obvious next architecture.

Built With

Share this project:

Updates

Submission history