BAML

BAML

โ˜… 4 ๐Ÿ”– 2500 saves ๐Ÿ’ฐ Free GitHub

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.

Overview

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.

Key Features

  • Typed LLM functions with declared input and output schemas, validated at compile time
  • Resilient structured-output parsing that fixes common model mistakes automatically
  • Works with every major model provider and local models, with retries and fallbacks built in
  • Streaming support for structured data, so UIs can render partial results safely
  • Excellent developer tooling, including a VS Code extension with a live prompt playground
  • Fast Rust-based compiler and runtime with minimal overhead

๐Ÿ’ณ Pricing

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.

Who Is It For

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.

๐Ÿš€ Visit BAML Official Site

๐Ÿšฉ Report an issue