Bend is a programming language built on the premise that as AI agents increasingly generate software, humans need a way to verify that the resulting code correctly implements their intentions. The language introduces a mechanism where developers declare 'laws'—precise, unambiguous rules that the application must never violate. For example, a developer might declare a law stating that a specific game state is impossible to reach. When an AI agent attempts to modify the code, the Bend compiler acts as a gatekeeper: it will block any merge that violates these laws unless the AI can also provide a mathematical proof that the new code satisfies them.

This visual illustrates the concept of declaring 'laws' to prevent impossible game states.

This image demonstrates the type of bug that the Bend compiler's 'laws' are designed to prevent.

This visual shows the successful enforcement of a mathematical law to maintain game integrity.
The technical core of Bend is its compiler, which functions as a high-speed proof checker. While traditional proof assistants like Lean or Rocq can take minutes to verify a mid-sized codebase, Bend is designed to perform these checks in under a second. This speed allows AI agents to verify correctness after every incremental change. Furthermore, Bend is designed for high performance, compiling to native code that runs nearly as fast as C on a single CPU core. It also supports massive parallelism, allowing code to run on thousands of GPU cores without the need for manual thread management or kernel writing, as the language handles the distribution of work automatically.

This chart supports the claim that Bend performs checks in under a second, much faster than traditional tools.

This graph illustrates Bend's ability to run nearly as fast as C and its support for massive GPU parallelism.

This animation demonstrates the language's ability to handle massive parallelism without manual thread management.
Despite its promise of 'bug-free' code, using Bend involves specific trade-offs and practical hurdles. Because the language requires formal proofs, even basic arithmetic operations may require the developer or the AI to define foundational properties. For instance, a user reported that an AI agent struggled with certain arithmetic laws because the base library lacked a full order theory, requiring the AI to write structurally recursive proofs for basic functions like maximum values. Additionally, while Bend provides a robust framework for verifying intent, the complexity of defining these 'laws' for highly intricate systems remains a significant consideration for developers moving away from natural language specifications. The project is currently in an early stage, and its lack of a public commit history has been noted as a point of consideration for those evaluating its long-term development and reliability.