Bend is a new programming language positioned as a way to ensure AI-generated code is correct and trustworthy. According to its documentation, the language combines three core capabilities: C-speed native compilation, GPU parallelism via CUDA, and formal proofs inspired by languages like Lean and Rocq.

The language addresses a key concern in AI-assisted development: how to verify that AI agents have implemented intentions correctly. Bend does this through a two-part system. First, developers write laws in a file called LAWS.bend that declare invariants—rules that code must never break. Second, before code is committed, developers run a proof checker that mathematically verifies the implementation satisfies those laws.
According to the documentation, Bend’s type checker doubles as a proof checker but operates much faster than similar systems. While proof checkers in Lean and Rocq can take minutes on mid-sized codebases, Bend completes checks in approximately one second, enabling AI agents to verify their work after each change.
On performance, Bend compiles to native code and runs nearly as fast as C on a single core. The same binary can automatically parallelize across multiple cores or GPU devices without explicit thread management, locks, or kernel code. According to the documentation, this can result in performance improvements up to one hundred times faster than single-core execution on GPUs.
The documentation includes an example where an AI agent was asked to add wrapping to a game board. Without LAWS.bend, the modification introduced a bug that went live. With the law-checking system enabled, the AI was forced to retry its implementation until it proved the wrapping law held mathematically—making merging buggy code impossible.
Developers can integrate Bend into AI agent workflows by adding instructions to their AGENTS.md files, telling agents to write laws for critical functionality and to parallelize performance-sensitive code. The language is based on BendTT, an affine dependent type theory, and uses BendRT as its parallel runtime for CPUs and GPUs.
Bend is described as still evolving, with the project acknowledging potential bugs and requesting community issue reports. The language is optimized for backend systems on Linux and macOS.
Key facts
- Bend uses mathematical proofs to verify AI-generated code meets declared laws and invariants
- The language achieves near-C performance on single cores while supporting automatic GPU parallelization up to 100x faster
- Proof checking in Bend completes in approximately one second, compared to minutes in similar systems like Lean
- Laws are declared in LAWS.bend files that prevent code violating specified rules from being merged
- Bend requires no explicit thread management, locks, or kernel code for parallelization
