A programming language for AI agents, with types that persist at runtime and built-in tests
open coreApache-2.0free
BAML ("Basically A Made-up Language") is a programming language for AI agents from Boundary. It looks like TypeScript, with a Rust-like type system whose types persist at runtime, typed and statically analyzed errors, Go-style green threads, built-in tests and evals and a standard library for agents. It runs standalone or is adopted incrementally by calling BAML functions from TypeScript, Python, Go, C#, Java and other languages through generated SDKs. The language and local toolchain are Apache-2.0 and run without Boundary's servers; Boundary Cloud, in early access, adds hosted tracing, dashboards and queries over BAML programs.
Libraries for BAML
Talira doesn't list any yet.
Problems it solves
- I want LLM calls in my app to return typed, validated structured output instead of parsing JSON by hand
- I need a language for writing AI agents where type errors are caught before the agent runs
- I want to test and evaluate my prompts like code
- I want to add typed LLM functions to an existing Python or TypeScript codebase
Features
- programming language for AI agents that looks like TypeScript
- type system like Rust, with types kept at runtime and no any or unsafe casts
- typed, statically analyzed errors
- green threads and colorless concurrency like Go
- built-in tests and eval framework, and a standard library for agents
- call BAML functions from TypeScript, Python, Go, C#, Java and more through generated SDKs
- Boundary Cloud: hosted spans, profiles, dashboards, alerts and SQL queries over your BAML programs
Ways to run it
BAML
free1
Only in this edition
- the language, local toolchain, SDK generation and local playground, with no calls to Boundary's servers
Boundary Cloud
paid1
Only in this edition
- hosted spans, profiles, dashboards, alerts and SQL queries over BAML programs
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
Alternatives
The same job
These do what BAML does.
- Instructor Structured outputs from LLMs, validated with Pydantic
- Outlines A Python library that guarantees LLM output matches a JSON schema, Pydantic model, regex or grammar
- Pydantic AI How Python does AI: agents, realtime voice, image generation, embeddings, typed end to end
