Bret Taylor publishes Truss, a prototype language for AI-written code

Bret Taylor has published Truss on GitHub, a programming language he describes as optimized for agent-written software. The README says it aims to make software more reliable, secure and performant by building on the strengths of AI agents. Taylor calls it "just a prototype" and says he hopes to start a conversation about the platforms needed to reach the vision.
The starting premise is that traditional languages were designed for the ergonomics of human authors, optimizing for the convenience of writing code. Truss assumes code is no longer written by hand but by AI agents, and the README says that changes most design considerations. Instead of making authoring easy, Truss requires quite a bit of reasoning at authoring time to verify a program's correctness and performance. The README argues the tradeoff is sensible because it is not a burden to the software engineer, and a one-time token spend can produce software with enduring robustness. It names Rust as a small step in this direction, since compile-time memory safety makes Rust a bit harder for humans to write but a good target for AI. Truss, it says, goes a few steps further by formally verifying behaviors well beyond memory management.
Taylor also states his motivation: he thinks we will probably rewrite most software written before AI because it is imperfect, insecure and slow. He wants software that is provably correct, verifiably secure and very fast, and wants agents to produce such software at great scale and complexity.
The core idea is the contract. A contract is the atomic unit of a Truss package. It specifies data structures and functions along with their formally verified behaviors: what they return, what memory they can access, and what state they can change. Providers implement contracts. A Map contract, for example, could have several providers, such as a HashMap and a SortedMap. Each provider must provably satisfy every claim in the contract, and it carries evidence of that in a package.proof file that sits next to the implementation source.
This split is meant to make formal verification scale. When a program uses Map, the compiler generates a proof of the program's correctness from the claims in the Map contract, without independently verifying each provider. When the program binds Map to a specific provider such as InlineMap, Truss checks the supplied package.proof to confirm conformance. That check is a simple validation process that the README says can be an order of magnitude faster than constructing the proof. Most of the verification work is pushed to package authors: when you publish a package, you spend as many tokens generating proofs as you do writing the code, and programs that depend on it do not repeat that effort.
Verification also reaches code generation. A provider proves it implements the contract; the compiler proves its translation preserves the body's observable behavior; and a separate-compilation rule proves the guarantee survives linking against conforming implementations.
The README walks through a small example: a package that replaces one element in a slice of UInt64 words and returns the value it overwrote. The ReplaceElement contract requires index < words.len, which protects against buffer overflow. It ensures the result equals the old value at that index and that the slice afterward equals the old slice with the element updated. It also declares that the function terminates and that its effects are reading and writing the slice. The provider, InlineReplaceElement, is a three-line function that saves the old value, writes the new one and returns the old one. Running truss proof update in the provider directory emits package.proof. A program then declares a dependency with requires ReplaceElement from "replace-element" version "1.0.0" and binds it with bind ReplaceElement to provider "replace-element/inline" version "1.0.0".
The README lists examples in the included standard library to show what contracts can guarantee. Sort keeps every key's payload, even when keys repeat. SHA-256's streaming contract proves the digest covers exactly the bytes accepted, in order, however they are split across calls. HTTP response framing finds exactly where headers end even when the final blank line is split across reads. ZIP extraction reports file and byte counts that cover exactly the prefix whose publication was confirmed if extraction fails halfway. JSON strings proves which Unicode character an escape sequence represents and where the next character begins. Socket readiness ensures a delayed event for a closed connection cannot be accepted for a new connection reusing the same slot. CRC-32 shows that any split of the same bytes, including empty chunks, gives the same checksum as one pass. Owned byte buffers guarantee that a successful append keeps every original byte and adds exactly the bytes supplied, and a failed append returns the original allocation and contents. Truss is installed from source.
Key facts
- Truss is a prototype programming language from Bret Taylor, designed on the assumption that AI agents, not people, write the code.
- The atomic unit is a contract that specifies data structures and functions with formally verified behavior: what they return, what memory they access and what state they change.
- Each provider that implements a contract ships a package.proof file next to its source; checking that proof can be an order of magnitude faster than constructing it.
- Package authors carry the verification cost: the README says publishing means spending as many tokens generating proofs as writing the code.
- Verification extends to code generation, and the standard library includes contract examples such as SHA-256 streaming, CRC-32 and ZIP extraction.
Why it matters
Most languages optimize for how easy code is to write. Truss flips that: if an AI agent writes the code, the cost of heavy reasoning at authoring time is a one-time token spend rather than a burden on an engineer. The README builds on the idea behind Rust's compile-time memory safety and pushes it to formally verified behavior well beyond memory management. Taylor's stated view is that most pre-AI software will probably be rewritten because it is imperfect, insecure and slow. Truss is his proposal for what the platform for that rewrite might look like, and he presents it as a conversation starter.
Who it affects
Primarily people thinking about how software gets built when agents do the writing: language and tooling designers, and teams that care about provable correctness and security. Package authors would carry most of the verification burden, since they generate the proofs. Developers who depend on those packages would reuse the work instead of repeating it.
How to use it
Truss is installed from source. To write a package, you declare a contract (for example ReplaceElement in replace_element.truss), define a provider that implements it, and run truss proof update in the provider directory to emit package.proof. A program then declares requires ReplaceElement from "replace-element" version "1.0.0" and binds the contract to a provider with bind ReplaceElement to provider "replace-element/inline" version "1.0.0". The README points to a getting-started chapter for building a first program, and to a standard library with contract examples.
How solid is it
The source is the project's own README, written by Taylor, and it calls Truss a prototype. The claims are design-level: it describes how contracts, providers, proofs and the compiler fit together, but gives no benchmarks or measurements of proof generation time or token cost. The only figures are qualitative: proof checking "can be" an order of magnitude faster than construction, and proof generation costs as many tokens as writing the code. The README does not claim Truss is production-ready, and it does not name the proof system or solver behind verification.
Risks and caveats
Treat the performance and scaling claims as stated intent, not demonstrated results. The README does not say which AI models or agents were used to write Truss code or proofs, and it does not report any adoption. The token cost of proofs, equal to the cost of writing the code, is a real expense that falls on package authors. A proof only guarantees what the contract says, so the value of a package depends on how well its contract is written. The README does not discuss that limit; it is an inference from how contracts work, not a claim by the author.
“Truss is just a prototype, but I was hoping to start a conversation about the platforms we need to design to achieve that vision.”
— Bret Taylor, Truss README