Skip to content

Menu

BAML logo

BAML

Published

AI Agents

At a glance

What it is
BAML is a language for writing typed LLM functions, made by Boundary (BoundaryML).
Price from
Open source, paid plans from $250 a month per account, billed annually Details
Best for
Teams that want typed, testable LLM calls across several languages; Extraction jobs such as pulling data from PDFs
Official site
boundaryml.com
Last checked
November 2026
Watch out for
You have to learn a new language and add a code generation step instead of staying in plain Python or TypeScript.

BAML is a language for writing typed LLM functions, made by Boundary (BoundaryML). You declare a function's input types, its output schema and its prompt in .baml files, and BAML generates a client you call from your application code. The project is open source under Apache-2.0 and lives at github.com/BoundaryML/baml. Its docs describe the original BAML as a domain-specific language for getting structured outputs from LLMs.

In practice, developers write their prompts and return types in BAML, test them in the VS Code playground, then call the generated functions from Python, TypeScript or other languages. The repository lists TypeScript, Python, Go, C# and Java as languages that can call BAML functions. Outputs are typed, including partial objects while a response is still streaming, so editors can autocomplete fields. The docs also point to an online playground at promptfiddle.com and include a comparison with Pydantic.

The project is in a transition. The docs on docs.boundaryml.com cover BAML v0, which they call the legacy DSL, and say BAML v1 is a separate language in public beta. The GitHub README now pitches v1 as a general programming language for agents with a static type system, green threads, modules and a built-in test and eval framework. Boundary also runs Boundary Cloud, a paid hosted service for traces and logs from BAML programs.

Key features

Typed LLM functions
You define a function's inputs, output schema and prompt in one place, and BAML generates a typed client for it.
Multi-language clients
BAML functions can be called from TypeScript, Python, Go, C# and Java according to the repository.
Typed streaming
Partial structured outputs stay type-safe while a response streams, so UI code can render fields as they arrive.
VS Code playground
Prompts can be run and previewed inside the editor without setting up a Python environment or a separate service.
Test and eval framework
The v1 language ships with built-in testing and evaluation tools and a standard library for agents.
Model-agnostic design
The docs say BAML works with any LLM and any schema, including open-source models.
Boundary Cloud
An optional hosted service ingests function inputs, outputs, logs and network calls for querying and alerting.

Pricing

As of November 2026, BAML itself is free and open source under the Apache-2.0 license, and local BAML runs on your machine without calling Boundary's servers. Boundary Cloud, the hosted observability service, is in early access. Its Starter plan is $0 a month with 1 GB of included data per month, kept 30 days, and $4 per GB of ingestion past that. The Volume plan is $250 a month, billed annually, with 5 GB a month included, $3 per GB beyond that, and $0.10 per GB per 30 days for longer retention. Both plans include unlimited members, projects, spans and dashboards, and Boundary offers a 60-day money-back guarantee.

Best for

  • Teams that want typed, testable LLM calls across several languages
  • Extraction jobs such as pulling data from PDFs
  • Developers who want to iterate on prompts inside the editor
  • Agent projects that need streaming structured output

Limitations

  • You have to learn a new language and add a code generation step instead of staying in plain Python or TypeScript.
  • The docs split between the legacy v0 DSL and BAML v1, which is still in public beta, so you need to check which one a guide covers.
  • Boundary Cloud is in early access, and features such as usage caps and SSO are marked as coming soon.
  • The Volume plan's $250 monthly price is billed annually, and ingestion past the included data is charged per GB.

Verdict

BAML is a good fit when you want LLM calls treated like typed functions with tests and editor tooling, and you are willing to adopt a separate language for it. The shift from the v0 DSL to the v1 beta adds some churn, so pin versions and read the matching docs. The core is free; the hosted cloud is optional.

Sources

Written from the vendor's own site and documentation, checked November 2026. We have no paid relationship that affects what this page says.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…