Developer and creative tools

bendlang/

bend

Bend 2 is a Python-like language with dependent types. Agents write proofs that your LAWS.bend rules hold, and code compiles to C, CUDA, Metal or JS.

What’s new here

Bend 2 treats AI-written code as something to check by proof. You declare rules in LAWS.bend, the agent writes proofs in PROOF.bend, and the compiler rejects any edit that breaks a rule. The README calls this “AGENTS.md backed by proof”. Bend 2 is a new language. Bend 1 programs and HVM do not carry over.

What it does

The syntax is Python-like with dependent types. Laws are statements such as “winning is impossible” or “list_sort() must always return ascending numbers”. Proofs are ordinary defs. The README’s example proves a law by induction, with one rewrite per step. There are no tactics or proof search, so proving a theorem takes effort.

The language is also built for speed. The README says it compiles to C, Metal, CUDA and JavaScript, and that parallelism comes from divide-and-conquer calls with no threads or locks to write. The README’s own charts show benchmark comparisons against C and several proof assistants. It also says it does not yet have as many benchmarks as the team would like, especially for the checker.

The limitations list is long and honest. Everything is annotated and nothing is inferred, values are affine, there are only Nat, U32 and F32 numbers, and strings are linked lists. The compiler (not the kernel) is 99% AI-written and not fully audited. The checker itself has no proof, and --verdict uses a proven kernel.

Who it’s for

People who let coding agents write back-end code and want a hard check on rules that must never break, such as balances summing to zero or bounds checks. It also suits people curious about dependent types and GPU-parallel code. If you need Windows, a mature standard library, TLS or HTTP, or an editor with full diagnostics, expect to wait or write your own.

Try it

A prebuilt release exists, with tarballs for macOS and Linux on arm64 and x64. The README’s install is one line:

curl -fsSL https://bend-lang.com/install.sh | sh

Then tell your agent to use it by adding this to your AGENTS.md:

When using Bend:
- run `bend guide` to learn it
- use `LAWS.bend` to keep important rules
- run `bend PROOF.bend` before committing
- parallelize the code whenever possible

Then say “use Bend”. A native binary needs clang 14+. The ! GPU call needs clang 19+, Metal or CUDA 12. There is no Windows support (WSL works). The README says it works best on the back-end, on Linux or macOS.

How mature is it

The repo has 25,431 stars, 810 forks and 97 contributors. It was created on 2023-08-29 and last pushed on 2026-11-17. There are 33 releases, the latest being v2.0.40 on 2026-11-06, and at least 100 commits in the last 90 days (the count is capped). 91 issues and 65 pull requests are open. The license is Apache-2.0. The README says “Bend is young. Expect bugs”, and the long limitations list backs that up.