Bret Taylor Built Truss, a Programming Language Where AI Agents Ship Mathematical Proofs With Their Code
The Apache-2.0 prototype trades human typing convenience for formal verification, pushing heavy compute to publish time so downstream builds check contracts fast.

Every programming language you have ever cursed at was built around human thumbs. We got shorter keywords, forgiving syntax, and ergonomic shortcuts because typing hurt and nobody wanted to write three pages of ceremony just to swap a number in an array. Bret Taylor just tossed that entire premise out the window with Truss, an Apache-2.0 prototype language designed specifically for AI agents.
If an agent is doing the typing, ergonomics stop mattering and verification becomes the whole game. Rust nudged the industry that direction by making memory safety a compile-time hurdle (which humans grumble through and bots sail right past). Truss pushes the idea past memory management into full formal verification of what a program actually does.
Every Truss package starts with a contract. That contract spells out the data structures, functions, return values, accessible memory, and allowed state changes. Separate providers then implement that contract. A Map contract, for instance, can sit in front of both an InlineMap and a SortedMap provider, and each one has to prove it satisfies every claim in the contract.
Here is the clever part that keeps compile times from turning into a geological event: each provider ships a package.proof file right alongside its source code. Running truss proof update burns the heavy compute at authoring time, letting the package author spend as many tokens generating the proof as writing the implementation. When your own project binds to that provider, the Truss compiler replays package.proof to validate conformance roughly an order of magnitude faster than generating the proof from scratch. Call it structural engineering for software — you might say the whole architecture rests on a solid truss.
Even the sample code makes the philosophy obvious. A tiny ReplaceElement contract for swapping a single UInt64 value in a slice explicitly requires the index to stay in bounds, guarantees the return value matches the old slot, confirms termination, and declares exact read and write effects. The verification chain runs all the way through code generation, with the compiler proving its translation preserves observable behavior and a separate-compilation rule ensuring the guarantee survives linking. There is even a truss verify command that invokes a Rust verifier to independently check linked executables and host bindings against the pinned package.
Taylor is not hiding his ambition, either. Writing in the repository, he said, “we will probably rewrite most software written before AI because that software is imperfect, insecure, and slow.” He also kept expectations grounded, adding that “Truss is just a prototype, but I was hoping to start a conversation about the platforms we need to design to achieve that vision.”
To prove the idea stretches beyond toy math, the bundled standard library already packs formally verified examples for real systems plumbing. The sorting contract guarantees every key keeps its original payload even when keys repeat. Streaming SHA-256 and CRC-32 proofs confirm that splitting input across arbitrary chunks—even empty ones—produces the exact same result as a single pass. HTTP response framing proves the parser locates the end of headers even when the final blank line splits across reads, while owned byte buffers prove a failed append hands back the original allocation untouched. There are also verified contracts for JSON Unicode escape sequences, partial ZIP extraction counts, and socket readiness so a delayed event from a closed connection can never hijack a reused slot.
Most prototypes on GitHub fade out after a weekend of attention, and Truss itself still requires building the toolchain from source before you can run a single file. Even so, the underlying trade-off is likely to stick around long after this specific syntax evolves. Every engineering org letting agents crank out pull requests is already discovering the same bottleneck: generating code got cheap, while proving that the code will not corrupt a buffer or leak a socket at scale got painfully expensive.
Expect future package registries and enterprise build pipelines to borrow this exact split—heavy, token-hungry verification paid once by the publisher, paired with fast, deterministic proof checks in CI. Humans are terrible at writing formal proofs by hand, which is why formal verification spent decades trapped in aerospace and kernel research. Handing the proof-writing chore to tireless agents while keeping a fast independent verifier at the gate turns a nice academic dream into something an ordinary ops team could actually enforce.
Trust the code, verify the receipt.