Auto compiles recorded LLM-agent behavior into verified WASM binaries RightNow AI released Auto, a compiler that records LLM-agent behavior and compiles it into verified, capability-confined WASM binaries. The system uses a tiered runtime that falls back to a frontier model for novelty and recompiles, achieving 6.4x cost reduction and 96.9% accuracy on witnessed inputs. The project demonstrates that most agent cognition is secretly symbolic, with 87.1% of recorded effectful spans being deterministic. Paper: arXiv:2607.04542 https://arxiv.org/abs/2607.04542 · Built by RightNow AI https://www.rightnowai.co · Apache-2.0 Auto compiles recorded LLM-agent behavior into verified, capability-confined wasm binaries, with a tiered runtime that falls back to a frontier model for novelty and recompiles the result. It records what an agent does, proves which parts are secretly symbolic, extracts those, distills the rest into small specialists, verifies the whole against a behavioral contract, and emits a cognition binary .cbin : code plus small models plus a measured manifest. The idea in one line: treat the frontier model as an interpreter, and build the compiler that has always followed interpreters. The plain-language story, with every measured number and its provenance, is in docs/why-agi-compiler.md /RightNow-AI/auto/blob/main/docs/why-agi-compiler.md . CLAUDE.md records the engineering norms we held ourselves to while building this; spec/ is written for external readers. - The compiler: auto record attaches to a live agent and captures traces, auto compile --contract lowers them to a typed IR, runs the passes, and verifies against the contract before emitting a .cbin . - The runtime: tier-1 is the compiled fast path. tier-0 is a frontier model as interpreter, for inputs the guard flags as novel. A guard trip deopts to tier-0, captures the trace, and recompiles. This is the ratchet: nothing is figured out twice. - The artifact: content-addressed .cbin with a manifest that reports eval scores, cost and latency bounds, capability requirements, and provenance. The manifest reports measured numbers or null , never aspirational ones. Capability confinement is physical: emitted artifacts declare zero wasm imports and the loader refuses anything else, so a binary cannot exceed its declared effects. Every number below is traceable to paper/bench-results.md which carries the eval-run ids and ledger lines or paper/claims.md . - Determinism census: 488 of 560 recorded effectful spans were witnessed-deterministic 87.1% pooled , with three families at 100.0% and free-text generation as the residue. This is the measured form of the claim that most agent cognition is secretly symbolic. - The ratchet, on a 300-item novelty stream with three scheduled distribution shifts positions 50, 120, 200 : marginal cost per item fell from about 59 µ$ pure frontier to 2 µ$/item steady-state, 6.4x cheaper end-to-end, with three recompile generations each landing one cycle behind a shift, zero errors, and every recompile passing the same contract gate. Tier-1 answers matched the reference agent on witnessed inputs 124 of 128 times 96.9% . - Latency ladder on the compiled path: 736 ms frontier to about 21 ms serve over HTTP to 290 µs stdio to 54.1 µs in-process python, pyo3 to 18.2 µs in-process node, napi . The in-process figures measure the call boundary on trivial fixtures, not inference. The same stream run at a deliberately loose guard measured the failure mode the architecture exists to prevent: 48.9% of tier-1 answers silently wrong. Calibration, not model capability, decides whether cheap stays correct. frontend IR passes backend -------- -- ------ ------- trace SDK -- typed task graph -- extract -- verify -- task.cbin prompts, capability and distill contract wasm code tool calls, memory effects, optimize gate + small models args, results uncertainty, + manifest resource bounds run: input -- guard -- in-distribution -- tier-1 compiled, guarded \- novel -- deopt -- tier-0 frontier -- capture \- recompile -- tier-1 the ratchet: nothing figured out twice The passes, in order: symbolic extraction enumerative search or LLM-guided CEGIS, candidates checked in a wasmtime sandbox with no network , distillation residual fuzzy nodes into small tree or MLP specialists , verification the contract is the type checker; differential testing against the reference model; a failing or unmeasurable contract blocks emit , and optimization. Guards use trigram-Jaccard distance with split-conformal calibration for calibrated abstention. Requirements: - rust 1.96.1 edition 2024 , pinned in rust-toolchain.toml . flatc 25.12.19 exactly. It must match the pinned flatbuffers crate; the IR build fails on a mismatch. crates/auto-ir/build.rs resolves flatc in this order: the FLATC env var, then tools/flatc/flatc .exe gitignored , then PATH . Install it from the official release, for example on Windows extract flatc.exe from Windows.flatc.binary.zip at github.com/google/flatbuffers/releases/download/v25.12.19/ into tools/flatc/ . Linux uses Linux.flatc.binary.clang++-18.zip from the same release. The gates CI runs on every pull request: cargo fmt --all --check cargo clippy --workspace --all-targets -- -D warnings cargo test --workspace Build the CLI, then run the end-to-end script. It records the toy agent through the real python SDK, checks the measured determinism report, compiles a .cbin through the verification gate, runs it, and proves the negative paths: a wrong implementation is blocked, a far input abstains, a deopt is ingested and recompiled to tier-1, and a tampered registry artifact is refused. cargo build -p auto-cli bash evals/toy-agent/e2e.sh The same steps by hand, one task, record to run: record the toy agent twice, then read the measured determinism report cargo run -p auto-cli -- record --store store.db -- python evals/toy-agent/agent.py cargo run -p auto-cli -- record --store store.db -- python evals/toy-agent/agent.py cargo run -p auto-cli -- report --task toy-agent --store store.db verify a contract against the recorded spans writes a content-addressed eval run cargo run -p auto-cli -- verify --contract evals/toy-agent/fake-frontier.contract.toml --store store.db compile the span into a .cbin; without --module the implementation is synthesized from the recorded observations, and emit is verification-gated cargo run -p auto-cli -- compile --contract evals/toy-agent/fake-frontier.contract.toml --store store.db --out fake-frontier.cbin run the compiled artifact cargo run -p auto-cli -- run --artifact fake-frontier.cbin \ --input '{"prompt":"The quick brown fox jumps over the lazy dog near the riverbank."}' inspect the artifact and its manifest cargo run -p auto-cli -- inspect fake-frontier.cbin The paid paths LLM-guided CEGIS at --synth llm , and a frontier model as tier-0 via --tier0 "frontier: