Moving a Legacy Rules Engine Behind an Agentic Layer Without Losing the Car When the Model Fails
The planner is the least trustworthy component you will put on a vehicle network, so the migration plan has to start from the moment it stops answering. Most programs begin with a signal-based rules engine on the infotainment or zone controller, hand-written intent handlers wired directly to CAN or SOME/IP services, and a test matrix that took years to close. Moving to a language-model planner that routes tool calls through MCP into Wasm sandboxes buys flexibility. Each line of that budget should be defended as a specific failure the new stack contains better than the old one did.
Keep the old path as the degraded mode
Do not delete the legacy intent handlers. Demote them. In the target architecture the agent proposes a plan, a deterministic constraint verifier decides whether it runs, and the old rules engine answers whenever the planner times out, the Wasm instance traps, or the verifier rejects a plan twice in a row. This is the hardest line in the budget, because you now maintain two behavioural paths and must prove they never command the same actuator at the same time. That needs an arbitration layer with its own requirements, its own tests and its own place in the safety case. What you get back is availability, measured as the share of user requests served by either path during fault injection rather than by the agent alone, because a feature that used to vanish when the voice stack crashed now falls back to fixed phrases and fixed actions.
Where the deadline lives
The verifier sits on the critical path, so give it a hard budget: on programs where this has worked, that budget is 20 ms from receiving a proposed tool call to an allow or deny on a safety-relevant actuation. The planner may be slow and unpredictable, but the verifier may not. It runs outside the sandbox on a partition with fixed memory and no heap growth, checks each call against typed preconditions such as vehicle speed, gear and door state, and fails closed when it cannot read a fresh value. Wasm only contributes here if you configure fuel metering or epoch interruption, so that a runaway tool module is stopped at a known instruction count instead of whenever a watchdog finally notices. The cost is direct, since every millisecond given to the verifier comes out of end-to-end response, but our estimate is that a well-built verifier adds roughly a tenth of the latency users already perceive from the planner, and that is why the case for it rarely loses on user experience.
The failure that pays for the verifier
The failure mode that justifies the whole verifier is not a malformed tool call, which schema validation already catches, but a well-formed call built on stale context, such as the planner requesting a window or tailgate actuation based on a vehicle state it read before the car started moving, and only a check against fresh signal values at execution time stops it.
Paying for qualification, and the rule for what crosses the line
The part that hurts most is not engineering but evidence. Functional safety standards such as ISO 26262 have no category for a nondeterministic planner, so the only defensible argument keeps the agent at QM and places the whole ASIL claim on the verifier, the arbitration layer and the legacy fallback. Those three components therefore carry the full cost of qualification, even though the visible feature work happens somewhere else. One decision rule keeps that cost bounded: a tool gets a qualified verifier only if its worst outcome involves moving mass, changing vehicle dynamics or defeating a closure, and every other tool gets schema checks, rate limits and a log. Applied honestly, the rule puts only a small minority of the tool catalogue behind ASIL-rated checks, under a fifth on a typical body and comfort domain by our estimate, and that ratio is the number to show whoever signs the budget. That leaves the question of how long to run shadow mode, where the agent plans but the legacy path executes: each extra month gives you more disagreement data from real routes, and each extra month you pay for two stacks.
Technical FAQ: Can the Wasm sandbox carry the safety claim on its own?
No. Sandboxing limits the memory and execution time of a tool module, which gives you freedom from interference. It says nothing about whether the command the module emits is safe for the current vehicle state, so it supports the verifier's argument but cannot replace it.