Python library for running agent evals and guardrails on hosted or local Jev-style decision models, with all checks for a trace sent in one request.
BoundaryML/baml
BAML is a programming language for building AI agents, with typed functions, a Rust-based compiler, and callable from TypeScript, Python, Go and other languages.
- Stars
- 9,492
- Forks
- 514
- Open issues
- 366
- Last commit
- 6 hours ago
What is it?
BAML is a programming language aimed at building agents. Its syntax resembles TypeScript, and it adds a type system that persists at runtime, typed and statically analyzed errors, and a filesystem-based module layout. The goal is to reduce the mistakes that agents make when producing or handling structured data.
The language includes a built-in test and evaluation framework, a standard library for agent tasks, and green-thread style concurrency. The compiler is written in Rust. BAML can run standalone, or be adopted incrementally by calling BAML functions from existing TypeScript, Python, Go, C#, Java and other codebases.
The project provides a CLI with commands for installing the agent tooling, initializing a project, and installing an IDE extension, with installation available via Homebrew.
Key features
- 01Typed functions and errors that are checked statically
- 02Types preserved at runtime, with no need for casting to any
- 03Built-in test and evaluation framework
- 04Standard library for agent tasks
- 05Callable from TypeScript, Python, Go, C#, Java and other languages
Use cases
- Defining structured LLM outputs with typed schemas
- Adding BAML functions to an existing TypeScript or Python codebase
- Writing and running evals for agent behavior
- Building new agent applications in a dedicated language
Quick start
- 1
Install BAML with Homebrew
brew install baml - 2
Install the agent integration
baml agent install - 3
Initialize a new BAML project
baml init - 4
Install the IDE extension for VS Code
baml ide install --code
Things to know
- The README does not document a Windows install path, so platform support is unclear from it.
- Setup is a multi-step CLI flow, and the README points to an external quickstart for details.
In collections
Topics
FAQ
- What is baml?
- BAML is a programming language for building AI agents, with typed functions, a Rust-based compiler, and callable from TypeScript, Python, Go and other languages. BAML is a programming language aimed at building agents. Its syntax resembles TypeScript, and it adds a type system that persists at runtime, typed and statically analyzed errors, and a filesystem-based module layout. The goal is to reduce the mistakes that agents make when producing or handling structured data.
- Is baml free to use? What license does it have?
- baml is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is baml still maintained?
- Actively maintained. The last commit to baml was on Nov 7, 2026.
- What can I use baml for?
- Defining structured LLM outputs with typed schemas Adding BAML functions to an existing TypeScript or Python codebase Writing and running evals for agent behavior Building new agent applications in a dedicated language
- How do I install baml?
- Install BAML with Homebrew: brew install baml Install the agent integration: baml agent install Initialize a new BAML project: baml init Install the IDE extension for VS Code: baml ide install --code
- Where can I get baml?
- The source code and installation instructions are on GitHub: https://github.com/BoundaryML/baml
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Python framework that adds input and output guards to LLM applications and generates validated structured data from LLM outputs.
A statically typed programming language and calculator for scientific computations with built-in physical dimensions and units.
A robustly typed language from the ML family that compiles to fast, readable JavaScript, with TypeScript type generation and easy JS interop.
An experimental compiled programming language designed for AI-generated code that people review, with explicit syntax and no garbage collector, compiling to C.
A TypeScript framework for building AI agents and LLM-powered applications, with workflows, tools, memory, MCP servers, and evals.