BAML is a programming language designed specifically for building LLM functions and agents, created by the BoundaryML team. Its GitHub repository has accumulated more than 9,400 stars across dozens of trending appearances, and the language is under intense active development, with commits landing through October 2026.
Prompting from raw strings makes LLM code brittle: outputs drift, parsing breaks, and nothing is type-checked. BAML treats an LLM call like a typed function. You declare the function’s signature, its prompt and the structured schema you expect back, and BAML’s compiler, written in Rust, generates client code for Python, TypeScript, Go, Ruby and other languages. A tolerant parsing layer repairs near-miss outputs into valid structured data, so schemas hold up even when a model is sloppy. The result is agent code that feels like ordinary software engineering: autocompletion, compile-time errors and testable functions.
BAML is free and open source under the Apache License 2.0. The language, compiler and client libraries cost nothing; you only pay your model provider for tokens.
BAML is for developers building agents and LLM-powered features who are tired of prompt strings and regex parsing. If your application depends on structured outputs from models, BAML gives you the type safety and tooling of a real language instead of a pile of format instructions.