AI agents burn expensive inference on invalid plans, repeated replanning, tool retries, and self-critique loops. Invariant moves failure detection out of the GPU loop and into deterministic CPU verification.
This is the agent application of the Invariant verification stack.
Generated is not verified. Same engine. Different evidence. Same receipt.
A deployment workflow with 10 actions and explicit preconditions. The agent skipped a required artifact-signing step. The plan looks correct in natural language but violates a structural precondition before execution.
The verifier stepped through the actions, checked preconditions against the evolving state, and rejected the plan at the first impossible transition. Validation time: 19.6 microseconds. 7 downstream actions blocked before any tool call or GPU replan.
The receipt is application/vnd.svr.receipt+json, cryptographically signed, Ed25519-verifiable, and cacheable. The platform does not need to ask another model whether this plan is good. It already has a structural proof that the plan is impossible.
The same invalid deployment plan, three approaches. Aggregate across three failure modes: missing artifact signature, premature production deploy, and missing backup before schema update.
Lane B (LLM self-check) shows the optimistic case where the critic catches the issue. When it misses, the numbers match the baseline. Invariant's 3 GPU calls are the planner itself, which still synthesizes. The verifier runs on CPU.
The agent may spend unbounded compute synthesizing a plan. But validating a proposed plan against a formal transition model is polynomial-time: check the preconditions, apply the effects, verify the goal. That gap creates the margin-recovery layer.
In the general case, finding a valid plan is computationally explosive. The agent explores, backtracks, retries, self-critiques, and burns GPU the whole way.
Step through the actions. Check preconditions. Apply effects. Verify the goal. Deterministic. Reproducible. Cacheable. Runs on CPU in microseconds.
Invariant does not replace the agent. It gates the agent. The agent proposes. Invariant checks. Bad plans die cheaply. Good plans move forward with receipts.
The deployment-precondition demo runs locally. One command validates all plans and produces signed receipts. Another prints the three-lane margin comparison.