Truss
A prototype programming language for agent-written software that uses formally verified contracts and proofs, with a truss CLI.
At a Glance
Truss language and compiler (truss CLI) released under the Apache License 2.0; install from source.
Engagement
Available On
Alternatives
Listed Dec 2026
About Truss
Truss is a prototype programming language from Bret Taylor, designed for software written by AI agents rather than by hand. It centers on contracts with formally verified behaviors, and it ships a truss command-line compiler and toolchain. The source is published on GitHub under Apache-2.0, and the README describes it as a prototype meant to start a conversation about the platforms needed for this vision.
What It Is
Truss is a language and compiler toolchain that assumes code is authored by AI agents. Its README says it optimizes for human verification and correctness rather than authoring convenience, spending tokens at authoring time to improve lasting correctness and performance. Programs are built from packages whose atomic unit is a contract, which specifies data structures and functions along with their verified behavior: what they return, what memory they can access, and what state they can change.
How Contracts, Providers and Proofs Work
Providers implement contracts, and each provider ships a proof (package.proof) showing it satisfies the contract. A contract such as Map can have several providers, for example a HashMap and a SortedMap. When a program binds a contract to a provider, the compiler replays the supplied proof to check conformance, which the README says can be an order of magnitude faster than constructing the proof. This pushes most verification work to package authors, so dependent programs do not repeat it. The README also describes verification extending to code generation and to linking against conforming implementations.
Using the truss CLI
The CLI covers dependency resolution (lock, fetch --locked), proof handling (proof update|check|inspect), type, contract and proof checking (check), building native executables (build), running (run), pinned test cases (test), source formatting (format), and independent verification of a self-hosted build (verify). Truss is installed from source. The bundled standard library includes contract examples for sorting, SHA-256, HTTP response framing, ZIP extraction, JSON strings, socket readiness, CRC-32 and owned byte buffers.
Collections
Popular collections
- UI Design Skills for Coding Agents
Collection by @mayachen
- Find the Ways Your AI App Can Fail Before Launch
Collection by @samirhaddad
- Give Your AI Agent the Meaning Behind Your Database
Collection by @danielokafor
- Black Friday 2026: Learn with AI
Collection by @evtuff
Add Truss to one of your collections.
Community Discussions
Be the first to start a conversation about Truss
Share your experience with Truss, ask questions, or help others learn from your insights.
Pricing
Open Source
Truss language and compiler (truss CLI) released under the Apache License 2.0; install from source.
- Apache License 2.0 (Apache-2.0)
- truss CLI: lock, fetch, proof, check, build, run, test, format, verify
- Bundled standard library
- Install from source
Capabilities
Key Features
- Contracts with formally verified behaviors (returns, memory access, state changes)
- Providers that implement contracts with accompanying proofs
- Proof generation and independent replay via truss proof update/check/inspect
- Native executable builds
- Package dependency locking and fetching
- Pinned test cases via package.tests
- Source formatter
- Verifier for linked code in self-hosted builds
- Standard library with verified contract examples
