Aye

Pre-release

A systems language for code written by AI agents

Aye compiles to C and builds one native binary with clang. It has no garbage collector, no borrow checker, no exceptions and no macros. Memory comes from explicit allocators and is released with defer.

Aye is not released yet. There is no download and no public repository. The source will be published under MIT OR Apache-2.0. The command is aye and source files end in .aye.

Why a new language for agents

A new language has no training data. Aye makes up for that in three ways:

The design rules follow from the same goal: no hidden allocation (a function that allocates takes an Allocator), no hidden control flow (no exceptions, no operator overloading, no destructors), generics as plain compile-time code instead of a macro language, and C as a first-class citizen. Integer overflow, out-of-bounds access, bad casts and division by zero trap in debug and safe builds.

One toolchain

aye spec
Print the language reference. Every example program in it is type-checked by the test suite, and so is every example it says the compiler rejects.
aye check --json
Run the front end only: no C, no clang. Each diagnostic has a file, line, column, error code and machine-applicable fixes.
aye explain <code>
Explain an error code, with a wrong and a fixed example.
aye fix
Apply the fix-its of aye check in place.
aye fmt
The one format. Idempotent, keeps every comment, never changes the tokens.
aye test
Run the test blocks of every module, with --json output.
aye doc --signatures
Print the public API of a module, or of std, with its doc comments: context for an agent next to the spec.
aye cimport
Show the declarations that @cimport makes of a C header. Headers are read at compile time with libclang; C functions are called directly, with no wrapper.
aye build, aye run
Build one native executable in debug, safe or fast mode.

Example

A small tokenizer: a tagged enum, an error set, an allocator passed in explicitly, and defer for cleanup. The debug allocator reports any memory that was not freed.

tokens.aye
import std.heap.General
import std.list.List

enum Token {
    Num { value: i64 }
    Op { text: []u8 }
}

error LexError { Unexpected }

fn lex(list: *mut List(Token), src: []u8) !void {
    var i: usize = 0
    while i < src.len {
        let c = src[i]
        if c >= '0' && c <= '9' {
            var n: i64 = 0
            while i < src.len && src[i] >= '0' && src[i] <= '9' {
                n = n * 10 + (src[i] - '0') as i64
                i += 1
            }
            try list.append(Token.Num { value: n })
        } else if c == '+' || c == '*' {
            try list.append(Token.Op { text: src[i..i + 1] })
            i += 1
        } else if c == ' ' {
            i += 1
        } else {
            return LexError.Unexpected
        }
    }
}

pub fn main() !void {
    var gpa = General.init()
    defer gpa.deinit()
    var toks = List(Token).init(gpa.allocator())
    defer toks.deinit()

    try lex(&mut toks, "12 + 3 * 4")
    for t in toks.items() {
        match t {
            .Num { value } => @println(value),
            .Op { text } => @println(text)
        }
    }
}

Delete the first line and check the file. The checker names the missing import and offers a fix; aye fix applies it:

$ aye check tokens.aye
tokens.aye:33:15: error[E0084]: `General` is not declared: it is `std.heap.General` (add `import std.heap.General`)
tokens.aye:2:1: help: add `import std.heap.General`
$ aye fix tokens.aye
tokens.aye:2:1: fixed: add `import std.heap.General`
$ aye check tokens.aye
$ aye run tokens.aye
12
+
3
*
4

Tested on a fresh agent

The language has a standing gate: a fresh AI session gets only the output of aye spec and the checker, and writes a small command-line tool. In the latest run, the agent wrote wc and a JSON tokenizer. Both passed the checker in the first round. wc matched the system wc on four inputs, and the tokenizer rejected eleven invalid inputs with positioned errors. The agent found four places where the spec was silent or loose; the spec now covers them.

It scales: a web browser

The anyknown browser is written in Aye: HTML and CSS parsing, a JavaScript engine, layout and painting, plus an interface for AI agents (pages as Markdown or as an accessibility tree, and an MCP server). It calls C libraries such as SDL2, FreeType and libcurl directly.

104,795 lines of Aye in 185 files, measured on 8 October 2026.

The browser will be open source too, released after the language.

Roadmap

Work in progress, in no fixed order and with no dates: