What is Alef?

Alef is a programming language.

It includes:

Alef is AI-native because AI provider calls and agent-era protocols are part of the standard library story. That does not make Alef an app framework. The framework-like examples exist to prove that the language and runtime can build real programs.

The default execution story is:


alef run main.alef

That command runs an Alef program on the native runtime. Public examples should target this path unless they are specifically documenting the TypeScript interpreter or Go codegen.

Design Goals

Alef optimizes for language-level outcomes:

A Tiny Program


fn greet(name) {
    return "hello, {name}"
}

fn main() {
    println(greet("Alef"))
}

A Tiny Backend Using The Language


import std.http { json_response }

fn with_state(response, state) {
    return { "response" => response, "state" => state }
}

fn health(request, state) {
    return with_state(json_response(json_encode({
        "ok" => true,
        "runtime" => "native"
    })), state)
}

fn app() {
    let app = std.http.with_state(std.http.app(), {})
    return std.http.route(app, "GET", "/health", health)
}

fn main() {
    std.http.listen_options("127.0.0.1:8090", app(), {
        "shutdown_path" => "/__shutdown"
    })
}

What Alef Is Not

Alef is not a web framework. It can build web servers because the standard library has HTTP primitives.

Alef is not an AI wrapper. It can call AI providers because the standard library has AI provider primitives.

Alef is not just examples. TicketDesk and Agent Ticket Router are example programs written in the language.

Alef is also not a promise that every mature Go, Rust, Python, or .NET library already has an equivalent. The current strength is a compact, integrated language and runtime path for useful programs.