BAML
Typed programming language for agents and LLM functions, with runtime types, typed errors and structured outputs designed to reduce agent mistakes.
Updated
✨ Try AgentScout's free AI image generator →Good for: writing code, building AI agents
Use cases
About BAML
BAML is listed in our frameworks category and is aimed at builders. Typed programming language for agents and LLM functions, with runtime types, typed errors and structured outputs designed to reduce agent mistakes. Pricing, as the maker states it: Open source. Maturity: Mature. We last checked the official link on 2026-10-20.
What is BAML?
BAML is a programming language from Boundary built for writing agents and LLM functions. It looks like TypeScript but has a strict, Rust-like type system that persists at runtime, typed errors, Go-style concurrency and a built-in test and eval framework, so model outputs are parsed into real types instead of loose strings.
You can run BAML on its own or adopt it gradually, calling BAML functions from TypeScript, Python, Go, C#, Java and other languages, with editor tooling and an agent install command.
Sources: the official README and our directory listing, checked 2026-10-20. Official site: boundaryml.com.
Who is BAML for?
Developers who want structured, type-safe LLM calls and agent logic that plugs into an existing codebase.
BAML at a glance
- Open source: Yes (Apache License 2.0)
- GitHub: BoundaryML/baml · 9,427 stars (as of Oct 21, 2026)
Key features
- Typed language for LLM functions and agents
- Runtime types, typed errors, no unsafe casts
- Built-in tests and evals
- Call from TypeScript, Python, Go, C#, Java and more
- Editor and agent tooling
BAML FAQ
What is BAML?
BAML is a programming language from Boundary built for writing agents and LLM functions. It looks like TypeScript but has a strict, Rust-like type system that persists at runtime, typed errors, Go-style concurrency and a built-in test and eval framework, so model outputs are parsed into real types instead of loose strings.
Who is BAML for?
Developers who want structured, type-safe LLM calls and agent logic that plugs into an existing codebase.
Is BAML free?
BAML's pricing, as the maker states it: Open source. Open-source tools are free to use, though you may still pay for model API usage or a hosted plan. Check the official site for current plans.
Is BAML open source?
Yes. BAML is released under the Apache License 2.0, according to its GitHub repository.
What are alternatives to BAML?
Similar tools include Guidance, Outlines, Instructor, Mirascope, TypeChat and DSPy.
BAML ratings and reviews
Be the first to rate BAML: tap 1 to 5 stars below. A written review is optional.
BAML alternatives
Other frameworks tools in our directory. See all frameworks tools →
Guidance
Programming paradigm for steering language models that constrains output with regex and grammars and interleaves control flow with generation.
Outlines
Library from .txt for structured generation that guarantees LLM output matches a JSON schema, regex or grammar.
Instructor
Library for getting validated structured outputs from any LLM, built on Pydantic with retries and type safety.
Mirascope
Lightweight Python library for calling any LLM with typed outputs and tools through one interface, without a heavy framework.
TypeChat
Microsoft library for building natural-language interfaces by using types to constrain and validate LLM responses.
DSPy
Stanford framework for programming rather than prompting language models, with optimizers that tune prompts and weights for RAG pipelines and agent loops.
Related lists
🏆 See also: AutoGen alternatives · All best-of lists
💲 Estimate API cost: compare per-request and monthly costs for GPT, Claude, Gemini and Grok models.
Badge for makers
Built BAML? Add this badge to your README or site. It links back to this page. About badges