01 / Overview
"The policy was trained once. The rules changed live, in plain English." Interlock is a runtime safety shield for a reinforcement learning agent, with a human on the loop. A Stable-Baselines3 DQN drives in highway-env on task reward alone and has never seen a rule. At every step, Jev, TypeSafe's calibrated decision model, judges each of the agent's five candidate actions against operator rules typed in plain English, and code then allows the action, falls back to the agent's next-best safe action, or pauses and asks a person. Docs at sequenzia.github.io/interlock.
The central design choice is the boundary between code and model. Code computes all the geometry (gaps, closing speeds, time to collision, closed zones ahead) and sends it as typed facts with units, so the model only judges and never calculates. Physical limits stay in code as a 2-second time-to-collision floor that no rule can override, rules belong to the model, and judgment calls go to the operator through a React console with a live road view, an approval queue, and a decision inspector that shows the exact model exchange behind every step.
02 / System capabilities
What the system does
- Two thresholds turn one calibrated violation probability into allow, fallback, or escalate, so the uncertainty band sets operator load and only uncertain calls reach a person
- Measured, not assumed: across 20 seeded episodes with seven standing rules, violations fell from 105 to under 4 per episode and the crash rate from 40% to 0%, backed by calibration over 240,000+ labeled checks and a head-to-head baseline against chat LLMs
- One JSONL decision record per step drives the console, replay, and evaluation; ground-truth checkers score but never decide, and an unreachable judge escalates instead of inventing an answer