BAML
Domain-specific language that turns LLM prompts into typed functions with reliable structured outputs.
About
Prompts become typed functions in BAML, a domain-specific language from BoundaryML in which you declare input parameters, an output schema, and a prompt template, then call the function from application code as if it were native. A Rust-based compiler generates clients for Python, TypeScript, and other languages, and schema-aligned parsing coerces model responses into the declared types even when the raw output is imperfect JSON, which makes structured extraction dependable across models. Because the model is just a configurable client, the same function runs against OpenAI, Anthropic, Google, or any local endpoint including Ollama, and switching providers is a small config change; a VS Code playground renders the exact prompt and lets you test functions without leaving the editor. The core toolchain is Apache-2.0 with no usage fees, while BoundaryML, a Y Combinator company, sells hosted observability on top. Around 8,700 GitHub stars and production adoption for extraction, classification, and agent pipelines have made it the reference implementation of schema-first prompting.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Category
- AI Frameworks & Libraries
- Price
- Freemium
- Platform
- Local/Desktop
- Difficulty
- Intermediate (3/5)
- License
- Apache-2.0
- Added
- Jul 29, 2026
Related Tools
Unified system for large-scale distributed training and inference.
Guidance language for controlling LLM generation with constraints, grammars, and JSON schemas.
Library for easily accessing and processing ML datasets.
JAX neural network library with PyTorch-like module system.
High-level deep learning API supporting JAX, TensorFlow, and PyTorch backends.
Gradient boosting library by Yandex with native categorical feature handling.