BAML is Basically A Made-up Language BoundaryML has released BAML, a new programming language designed for AI agents, featuring an anti-slop type system with no 'any' or unchecked casts, built-in observability that traces every function, and support for multiple languages including Python, TypeScript, Java, C#, Go, Rust, and more. The language claims to be 6x faster than OpenTelemetry in Rust and 200x faster in Python, with traces 1000x smaller, and includes workflow primitives like concurrency and retries. Modern programming languages weren’t built for agents. BAML is Basically A Made-up Language. We designed it to fight slop. As you read the code, it should feel like TypeScript unions, generics, lambdas , but with no escape hatches like as any . BAML has the: - syntax and readability of TypeScript - correctness and tooling of Rust - compile times and concurrency of Go - dynamism and nothing else of Python The parts different from TypeScript are: Observability and profiling observability Every function traced and profiled, locally. Agents can read the traces. AI functions ai-functions Streaming, batching, websockets, voice, any provider. The anti-slop type system language No any , no unchecked casts, no imports. But we did add pattern matching. Agent-first toolchain tooling Compiles faster than Go, searches better than ripgrep, packs smaller binaries than Bun. Workflow primitives workflows Concurrency, retries, cancellation, codemode, sandbox. It’s a lot, just read the code. Better testing evals Generate tests from data or prod traces. Grade flaky AI functions over many runs. And, most importantly: Incremental adoption adopting BAML runs standalone on: - macOS - Linux - Windows or inside your existing projects in: - Python - TypeScriptNode - TypeScriptWeb - Java - C - .NET - C++ - Go - Rust - KotlinAndroid - SwiftiOS - PHPsoon - Rubysoon But not JavaScript. Never JavaScript. Plz stop. Type-safe like OpenAPI, but capable like FFI. Observability and profiling Agents write more code than any human can read. Telemetry is the only way to understand what happened. BAML traces every function instead of sampling a percentage. It’s 6x faster than OpenTelemetry in Rust, 200x faster in Python, and the traces 1000x smaller. The field forgets as fast as it learns. 147 events dropped since you opened this page. Nothing is forgotten. Read more → How BAML keeps tracing fast enough to always leave on /techdocs AI functions Calling a model should feel like calling a function, not wiring up an SDK. In BAML it’s a typed function: declare the input and output types, get structured data back. Malformed output gets repaired against your types by schema-aligned parsing, so every model gets better at structured output. Read more → AI functions in BAML /techdocs The anti-slop type system Every invariant you can’t enforce is one an agent will eventually violate. Start with type erasure: we don’t do it, so there’s no any or unchecked cast for a model to hide behind. In BAML, invalid states don’t compile. interface User { name: string; email: string;}// 'as' is an unchecked promise the compiler believesconst user = JSON.parse raw as User;user.email.toLowerCase ; Read more → The BAML language /techdocs Agent-first toolchain For decades, tooling was built for humans: LSPs, autocomplete, hover docs. It’s about time the real author of the code got fair treatment. An LSP for you, baml describe and friends for them. And a really fast compiler for both. bash $ baml run main Compiling 1 file s Compiled 1 file s in 1s"hi, world"$ baml run greet -- --name "hacker news"Greeting { message: "hi, hacker news" }$ baml run greet -- --helpfunction greet name: string - GreetingOptions: --name